use of org.hl7.gravity.refimpl.sdohexchange.fhir.ConditionVerificationStatusCodes in project Gravity-SDOH-Exchange-RI by FHIR.
the class ConditionBundleFactory method createCondition.
protected Condition createCondition() {
Condition healthConcern = new Condition();
healthConcern.getMeta().addProfile(SDOHProfiles.CONDITION);
ConditionClinicalStatusCodes clinicalStatus = ConditionClinicalStatusCodes.ACTIVE;
healthConcern.setClinicalStatus(new CodeableConcept().addCoding(new Coding().setCode(clinicalStatus.toCode()).setSystem(clinicalStatus.getSystem()).setDisplay(clinicalStatus.getDisplay())));
ConditionVerificationStatusCodes verificationStatus = ConditionVerificationStatusCodes.UNCONFIRMED;
healthConcern.setVerificationStatus(new CodeableConcept().addCoding(new Coding().setCode(verificationStatus.toCode()).setSystem(verificationStatus.getSystem()).setDisplay(verificationStatus.getDisplay())));
healthConcern.addCategory().addCoding(category);
healthConcern.addCategory().addCoding(new Coding().setSystem(conditionType.getSystem()).setCode(conditionType.toCode()).setDisplay(conditionType.getDisplay()));
healthConcern.getCode().setText(name);
healthConcern.getCode().addCoding(icdCode);
healthConcern.getCode().addCoding(snomedCode);
healthConcern.setSubject(getPatientReference());
healthConcern.setAsserter(getPatientReference());
healthConcern.setRecorder(FhirUtil.toReference(Patient.class, practitioner.getIdElement().getIdPart(), practitioner.getNameFirstRep().getNameAsSingleString()));
healthConcern.getEvidenceFirstRep().getCodeFirstRep().setText(basedOnText);
return healthConcern;
}
Aggregations