Search in sources :

Example 1 with BaseAdvisor_30_50

use of org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_30_50 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;
}
Also used : BaseAdvisor_30_50(org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_30_50) VersionConvertor_30_50(org.hl7.fhir.convertors.conv30_50.VersionConvertor_30_50)

Example 2 with BaseAdvisor_30_50

use of org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_30_50 in project cqf-ruler by DBCG.

the class DataRequirements method getModuleDefinitionLibraryDstu3.

public static org.hl7.fhir.dstu3.model.Library getModuleDefinitionLibraryDstu3(org.hl7.fhir.dstu3.model.Measure measureToUse, LibraryManager libraryManager, TranslatedLibrary translatedLibrary, CqlTranslatorOptions options) {
    VersionConvertor_30_50 versionConvertor_30_50 = new VersionConvertor_30_50(new BaseAdvisor_30_50());
    org.hl7.fhir.r5.model.Measure r5Measure = (org.hl7.fhir.r5.model.Measure) versionConvertor_30_50.convertResource(measureToUse);
    Set<String> expressionList = getExpressions(r5Measure);
    DataRequirementsProcessor dqReqTrans = new DataRequirementsProcessor();
    org.hl7.fhir.r5.model.Library effectiveDataRequirements = dqReqTrans.gatherDataRequirements(libraryManager, translatedLibrary, options, expressionList, true);
    org.hl7.fhir.dstu3.model.Library stu3EffectiveDataRequirements = (org.hl7.fhir.dstu3.model.Library) versionConvertor_30_50.convertResource(effectiveDataRequirements);
    // TODO: Support dataRequirementFhirQueries in STU3
    return stu3EffectiveDataRequirements;
}
Also used : Measure(org.hl7.fhir.r5.model.Measure) BaseAdvisor_30_50(org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_30_50) VersionConvertor_30_50(org.hl7.fhir.convertors.conv30_50.VersionConvertor_30_50) Measure(org.hl7.fhir.r5.model.Measure) DataRequirementsProcessor(org.cqframework.cql.elm.requirements.fhir.DataRequirementsProcessor) TranslatedLibrary(org.cqframework.cql.cql2elm.model.TranslatedLibrary)

Aggregations

BaseAdvisor_30_50 (org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_30_50)2 VersionConvertor_30_50 (org.hl7.fhir.convertors.conv30_50.VersionConvertor_30_50)2 TranslatedLibrary (org.cqframework.cql.cql2elm.model.TranslatedLibrary)1 DataRequirementsProcessor (org.cqframework.cql.elm.requirements.fhir.DataRequirementsProcessor)1 Measure (org.hl7.fhir.r5.model.Measure)1