use of org.hl7.fhir.r4b.model.Extension in project cqf-ruler by DBCG.
the class DataRequirements method getModuleDefinitionLibraryDstu3.
public static org.hl7.fhir.dstu3.model.Library getModuleDefinitionLibraryDstu3(LibraryManager libraryManager, TranslatedLibrary translatedLibrary, CqlTranslatorOptions options) {
org.hl7.fhir.r5.model.Library libraryR5 = getModuleDefinitionLibraryR5(libraryManager, translatedLibrary, options);
BaseAdvisor_30_50 baseAdvisor_30_50 = new BaseAdvisor_30_50();
VersionConvertor_30_50 versionConvertor_30_50 = new VersionConvertor_30_50(baseAdvisor_30_50);
org.hl7.fhir.dstu3.model.Library libraryDstu3 = null;
libraryDstu3 = (org.hl7.fhir.dstu3.model.Library) versionConvertor_30_50.convertResource(libraryR5);
// There is no DSTU3 extension to support FHIRQueryPattern representation on a DataRequirement
return libraryDstu3;
}
use of org.hl7.fhir.r4b.model.Extension in project cqf-ruler by DBCG.
the class Session method resolveCdsHooksPlanDefinition.
// For library use
public CarePlan resolveCdsHooksPlanDefinition(RequestDetails theRequest, Context context, PlanDefinition planDefinition, String patientId) {
CarePlanBuilder carePlanBuilder = new CarePlanBuilder();
RequestGroupBuilder requestGroupBuilder = new RequestGroupBuilder().buildStatus().buildIntent();
// links
if (planDefinition.hasRelatedArtifact()) {
List<Extension> extensions = new ArrayList<>();
for (RelatedArtifact relatedArtifact : planDefinition.getRelatedArtifact()) {
AttachmentBuilder attachmentBuilder = new AttachmentBuilder();
ExtensionBuilder extensionBuilder = new ExtensionBuilder();
if (relatedArtifact.hasDisplay()) {
// label
attachmentBuilder.buildTitle(relatedArtifact.getDisplay());
}
if (relatedArtifact.hasUrl()) {
// url
attachmentBuilder.buildUrl(relatedArtifact.getUrl());
}
if (relatedArtifact.hasExtension()) {
// type
attachmentBuilder.buildExtension(relatedArtifact.getExtension());
}
extensionBuilder.buildUrl("http://example.org");
extensionBuilder.buildValue(attachmentBuilder.build());
extensions.add(extensionBuilder.build());
}
requestGroupBuilder.buildExtension(extensions);
}
resolveActions(theRequest, planDefinition, planDefinition.getAction(), context, patientId, requestGroupBuilder, new ArrayList<>());
CarePlanActivityBuilder carePlanActivityBuilder = new CarePlanActivityBuilder();
carePlanActivityBuilder.buildReferenceTarget(requestGroupBuilder.build());
carePlanBuilder.buildActivity(carePlanActivityBuilder.build());
return carePlanBuilder.build();
}
use of org.hl7.fhir.r4b.model.Extension in project cqf-ruler by DBCG.
the class Patients method jane_doe.
public static Patient jane_doe() {
Patient patient = new Patient();
patient.setId("jane-doe");
patient.setName(Arrays.asList(new HumanName().setFamily("Doe").setGiven(Arrays.asList(new StringType("Jane")))));
patient.setBirthDate(new Date());
patient.setGender(AdministrativeGender.FEMALE);
Extension usCoreRace = new Extension();
usCoreRace.setUrl(EXT_URL_US_CORE_RACE).addExtension().setUrl(OMB_CATEGORY).setValue(new Coding().setSystem(URL_SYSTEM_RACE).setCode(OMB_CATEGORY_RACE_BLACK).setDisplay(BLACK_OR_AFRICAN_AMERICAN));
patient.getExtension().add(usCoreRace);
return patient;
}
use of org.hl7.fhir.r4b.model.Extension in project cqf-ruler by DBCG.
the class Patients method john_doe.
public static Patient john_doe() {
Patient patient = new Patient();
patient.setId("john-doe");
patient.setName(Arrays.asList(new HumanName().setFamily("Doe").setGiven(Arrays.asList(new StringType("John")))));
patient.setBirthDate(new Date());
patient.setGender(AdministrativeGender.MALE);
Extension usCoreRace = new Extension();
usCoreRace.setUrl(EXT_URL_US_CORE_RACE).addExtension().setUrl(OMB_CATEGORY).setValue(new Coding().setSystem(URL_SYSTEM_RACE).setCode(OMB_CATEGORY_RACE_BLACK).setDisplay(BLACK_OR_AFRICAN_AMERICAN));
patient.getExtension().add(usCoreRace);
return patient;
}
use of org.hl7.fhir.r4b.model.Extension in project cqf-ruler by DBCG.
the class Patients method john_doe.
public static Patient john_doe() {
Patient patient = new Patient();
patient.setId("john-doe");
patient.setName(Arrays.asList(new HumanName().setFamily("Doe").setGiven(Arrays.asList(new StringType("John")))));
patient.setBirthDate(new Date());
patient.setGender(AdministrativeGender.MALE);
Extension usCoreRace = new Extension();
usCoreRace.setUrl(EXT_URL_US_CORE_RACE).addExtension().setUrl(OMB_CATEGORY).setValue(new Coding().setSystem(URL_SYSTEM_RACE).setCode(OMB_CATEGORY_RACE_BLACK).setDisplay(BLACK_OR_AFRICAN_AMERICAN));
patient.getExtension().add(usCoreRace);
return patient;
}
Aggregations