Search in sources :

Example 1 with DataRequirementsProcessor

use of org.cqframework.cql.elm.requirements.fhir.DataRequirementsProcessor in project cqf-ruler by DBCG.

the class DataRequirements method getModuleDefinitionLibraryR5.

public static org.hl7.fhir.r5.model.Library getModuleDefinitionLibraryR5(org.hl7.fhir.r5.model.Measure measureToUse, LibraryManager libraryManager, TranslatedLibrary translatedLibrary, CqlTranslatorOptions options) {
    Set<String> expressionList = getExpressions(measureToUse);
    DataRequirementsProcessor dqReqTrans = new DataRequirementsProcessor();
    return dqReqTrans.gatherDataRequirements(libraryManager, translatedLibrary, options, expressionList, true);
}
Also used : DataRequirementsProcessor(org.cqframework.cql.elm.requirements.fhir.DataRequirementsProcessor)

Example 2 with DataRequirementsProcessor

use of org.cqframework.cql.elm.requirements.fhir.DataRequirementsProcessor in project cqf-ruler by DBCG.

the class DataRequirements method getModuleDefinitionLibraryR4.

public static org.hl7.fhir.r4.model.Library getModuleDefinitionLibraryR4(org.hl7.fhir.r4.model.Measure measureToUse, LibraryManager libraryManager, TranslatedLibrary translatedLibrary, CqlTranslatorOptions options, SearchParameterResolver searchParameterResolver, TerminologyProvider terminologyProvider, ModelResolver modelResolver, IBaseConformance capStatement) {
    VersionConvertor_40_50 versionConvertor_40_50 = new VersionConvertor_40_50(new BaseAdvisor_40_50());
    org.hl7.fhir.r5.model.Measure r5Measure = (org.hl7.fhir.r5.model.Measure) versionConvertor_40_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.r4.model.Library r4EffectiveDataRequirements = (org.hl7.fhir.r4.model.Library) versionConvertor_40_50.convertResource(effectiveDataRequirements);
    r4EffectiveDataRequirements = addDataRequirementFhirQueries(r4EffectiveDataRequirements, searchParameterResolver, terminologyProvider, modelResolver, capStatement);
    return r4EffectiveDataRequirements;
}
Also used : BaseAdvisor_40_50(org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_40_50) VersionConvertor_40_50(org.hl7.fhir.convertors.conv40_50.VersionConvertor_40_50) Measure(org.hl7.fhir.r5.model.Measure) Measure(org.hl7.fhir.r5.model.Measure) DataRequirementsProcessor(org.cqframework.cql.elm.requirements.fhir.DataRequirementsProcessor) TranslatedLibrary(org.cqframework.cql.cql2elm.model.TranslatedLibrary)

Example 3 with DataRequirementsProcessor

use of org.cqframework.cql.elm.requirements.fhir.DataRequirementsProcessor 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

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