ca.uhn.fhir.model.dstu2.valueset.ConditionClinicalStatusCodesEnum Java Examples

The following examples show how to use ca.uhn.fhir.model.dstu2.valueset.ConditionClinicalStatusCodesEnum. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: QueryRulesJUnitTest.java    From drools-workshop with Apache License 2.0 5 votes vote down vote up
private List<Condition> createSnomedConditions(int number, Patient patient) {

        List<Condition> conditions = new ArrayList<>();
        for (int i = 0; i < number; i++) {

            String code = null;
            switch (random.nextInt(3)) {
                case 0:
                    code = "195967001"; //Asthma (disorder)
                    break;
                case 1:
                    code = "73211009"; //Diabetes mellitus (disorder)
                    break;
                case 2:
                    code = "8098009"; //Sexually transmitted infectious disease (disorder)
                    break;
            }

            conditions.add((Condition) new Condition()
                .setCode(new CodeableConceptDt("http://snomed.info/sct", code))
                .setClinicalStatus(ConditionClinicalStatusCodesEnum.ACTIVE)
                .setVerificationStatus(ConditionVerificationStatusEnum.CONFIRMED)
                .setPatient(new ResourceReferenceDt(patient))
                .setId("Condition/"+(i+1)));
        }

        return conditions;
    }
 
Example #2
Source File: SimpleInferenceRulesJUnitTest.java    From drools-workshop with Apache License 2.0 5 votes vote down vote up
private Condition createAsthmaCondition(Patient patient, String id, Severity severity ){
    return (Condition) new Condition()
        .setCode(new CodeableConceptDt("http://snomed.info/sct", "195967001"))
        .setClinicalStatus(ConditionClinicalStatusCodesEnum.ACTIVE)
        .setVerificationStatus(ConditionVerificationStatusEnum.CONFIRMED)
        .setSeverity(new CodeableConceptDt("http://snomed.info/sct", severity.code))
        .setPatient(new ResourceReferenceDt(patient))
        .setId(id);
}
 
Example #3
Source File: UsingGlobalsRulesJUnitTest.java    From drools-workshop with Apache License 2.0 5 votes vote down vote up
private Condition createAsthmaCondition(Patient patient, String id) {
    return (Condition) new Condition()
        .setCode(new CodeableConceptDt("http://snomed.info/sct", "195967001")) //Asthma (disorder)
        .setClinicalStatus(ConditionClinicalStatusCodesEnum.ACTIVE)
        .setVerificationStatus(ConditionVerificationStatusEnum.CONFIRMED)
        .setPatient(new ResourceReferenceDt(patient))
        .setId(id);
}
 
Example #4
Source File: UsingGlobalsRulesJUnitTest.java    From drools-workshop with Apache License 2.0 5 votes vote down vote up
private Condition createDiabetesCondition(Patient patient, String id) {
    return (Condition) new Condition()
        .setCode(new CodeableConceptDt("http://snomed.info/sct", "73211009")) //Diabetes mellitus (disorder)
        .setClinicalStatus(ConditionClinicalStatusCodesEnum.ACTIVE)
        .setVerificationStatus(ConditionVerificationStatusEnum.CONFIRMED)
        .setPatient(new ResourceReferenceDt(patient))
        .setId(id);
}