Package org.linuxforhealth.fhir.ecqm.r4
Class R4MeasureEvaluation<ST extends DomainResource>
- java.lang.Object
-
- org.linuxforhealth.fhir.ecqm.common.MeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST>
-
- org.linuxforhealth.fhir.ecqm.r4.R4MeasureEvaluation<ST>
-
- Type Parameters:
ST
- Model class for the subject type that will be evaluated (e.g. Patient)
public class R4MeasureEvaluation<ST extends DomainResource> extends MeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST>
Implementation of FHIR Quality Measure Evaluation logic on top of the IBM FHIR Server model.
-
-
Field Summary
-
Fields inherited from class org.linuxforhealth.fhir.ecqm.common.MeasureEvaluation
context, EXT_DAVINCI_POPULATION_REFERENCE, getId, measure, measurementPeriod, packageName, subjectOrPractitionerId, URL_CODESYSTEM_MEASURE_POPULATION
-
-
Constructor Summary
Constructors Constructor Description R4MeasureEvaluation(org.opencds.cqf.cql.engine.execution.Context context, Measure measure, org.opencds.cqf.cql.engine.runtime.Interval measurementPeriod, java.lang.String packageName, java.util.function.Function<DomainResource,java.lang.String> getId)
R4MeasureEvaluation(org.opencds.cqf.cql.engine.execution.Context context, Measure measure, org.opencds.cqf.cql.engine.runtime.Interval measurementPeriod, java.lang.String packageName, java.util.function.Function<DomainResource,java.lang.String> getId, java.lang.String patientOrPractitionerId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addContained(MeasureReport.Builder report, DomainResource resource)
protected void
addEvaluatedResource(MeasureReport.Builder report, DomainResource resource)
protected void
addExtension(Reference.Builder reference, Extension extension)
protected void
addPopulationReport(MeasureReport.Builder report, MeasureReport.Group.Builder group, Measure.Group.Population populationCriteria, int populationCount, java.lang.Iterable<ST> subjectPopulation)
protected void
addReportGroup(MeasureReport.Builder report, MeasureReport.Group.Builder group)
protected Coding
createCoding(java.lang.String text)
protected Extension
createCodingExtension(java.lang.String url, java.lang.String codeSystem, java.lang.String code)
protected List.Entry
createListEntry(Reference.Builder reference)
protected List
createListResource(java.util.Collection<List.Entry> entries)
protected Extension
createMeasureInfoExtension(MeasureInfo measureInfo)
protected MeasureReport.Builder
createMeasureReport(java.lang.String status, MeasureReportType type, org.opencds.cqf.cql.engine.runtime.Interval measurementPeriod, java.util.List<ST> subjects)
protected DomainResource
createPatientObservation(Measure measure, java.lang.String populationId, Coding coding)
protected DomainResource
createPopulationObservation(Measure measure, java.lang.String populationId, Coding coding, java.lang.Integer value)
protected Reference.Builder
createReference(java.lang.String resourceId)
protected MeasureReport.Group.Builder
createReportGroup(java.lang.String id)
protected java.lang.String
getCodingCode(Coding coding)
protected java.lang.String
getCriteriaExpression(Measure.Group.Population population)
protected Coding
getExtensionCoding(ST patient, java.lang.String coreCategory, java.lang.String sdeCode)
Retrieve the coding from an extension that that looks like the following...protected java.lang.Iterable<Measure.Group>
getGroup()
protected java.lang.String
getGroupId(Measure.Group group)
protected MeasureScoring
getMeasureScoring()
protected java.lang.Iterable<Measure.Group.Population>
getPopulation(Measure.Group mgc)
protected MeasurePopulationType
getPopulationType(Measure.Group.Population population)
protected Coding
getSDECoding(Measure.SupplementalData sdeItem)
protected java.lang.String
getSDEExpression(Measure.SupplementalData sdeItem)
protected java.util.List<Measure.SupplementalData>
getSupplementalData(Measure measure)
protected boolean
isCoding(java.lang.Object obj)
protected void
setEvaluatedResources(MeasureReport.Builder report, java.util.Collection<Reference.Builder> evaluatedResources)
protected void
setGroupScore(MeasureReport.Group.Builder group, java.lang.Double score)
-
Methods inherited from class org.linuxforhealth.fhir.ecqm.common.MeasureEvaluation
evaluate, evaluatePatientListMeasure, evaluatePatientMeasure, evaluatePopulationMeasure, evaluateSubjectListMeasure
-
-
-
-
Constructor Detail
-
R4MeasureEvaluation
public R4MeasureEvaluation(org.opencds.cqf.cql.engine.execution.Context context, Measure measure, org.opencds.cqf.cql.engine.runtime.Interval measurementPeriod, java.lang.String packageName, java.util.function.Function<DomainResource,java.lang.String> getId, java.lang.String patientOrPractitionerId)
-
R4MeasureEvaluation
public R4MeasureEvaluation(org.opencds.cqf.cql.engine.execution.Context context, Measure measure, org.opencds.cqf.cql.engine.runtime.Interval measurementPeriod, java.lang.String packageName, java.util.function.Function<DomainResource,java.lang.String> getId)
-
-
Method Detail
-
addPopulationReport
protected void addPopulationReport(MeasureReport.Builder report, MeasureReport.Group.Builder group, Measure.Group.Population populationCriteria, int populationCount, java.lang.Iterable<ST> subjectPopulation)
- Specified by:
addPopulationReport
in classMeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST extends DomainResource>
-
addReportGroup
protected void addReportGroup(MeasureReport.Builder report, MeasureReport.Group.Builder group)
- Specified by:
addReportGroup
in classMeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST extends DomainResource>
-
createMeasureReport
protected MeasureReport.Builder createMeasureReport(java.lang.String status, MeasureReportType type, org.opencds.cqf.cql.engine.runtime.Interval measurementPeriod, java.util.List<ST> subjects)
- Specified by:
createMeasureReport
in classMeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST extends DomainResource>
-
createReportGroup
protected MeasureReport.Group.Builder createReportGroup(java.lang.String id)
- Specified by:
createReportGroup
in classMeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST extends DomainResource>
-
getCriteriaExpression
protected java.lang.String getCriteriaExpression(Measure.Group.Population population)
- Specified by:
getCriteriaExpression
in classMeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST extends DomainResource>
-
getGroup
protected java.lang.Iterable<Measure.Group> getGroup()
- Specified by:
getGroup
in classMeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST extends DomainResource>
-
getGroupId
protected java.lang.String getGroupId(Measure.Group group)
- Specified by:
getGroupId
in classMeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST extends DomainResource>
-
getMeasureScoring
protected MeasureScoring getMeasureScoring()
- Specified by:
getMeasureScoring
in classMeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST extends DomainResource>
-
getPopulation
protected java.lang.Iterable<Measure.Group.Population> getPopulation(Measure.Group mgc)
- Specified by:
getPopulation
in classMeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST extends DomainResource>
-
getPopulationType
protected MeasurePopulationType getPopulationType(Measure.Group.Population population)
- Specified by:
getPopulationType
in classMeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST extends DomainResource>
-
setGroupScore
protected void setGroupScore(MeasureReport.Group.Builder group, java.lang.Double score)
- Specified by:
setGroupScore
in classMeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST extends DomainResource>
-
getSDEExpression
protected java.lang.String getSDEExpression(Measure.SupplementalData sdeItem)
- Specified by:
getSDEExpression
in classMeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST extends DomainResource>
-
getSupplementalData
protected java.util.List<Measure.SupplementalData> getSupplementalData(Measure measure)
- Specified by:
getSupplementalData
in classMeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST extends DomainResource>
-
getSDECoding
protected Coding getSDECoding(Measure.SupplementalData sdeItem)
- Specified by:
getSDECoding
in classMeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST extends DomainResource>
-
isCoding
protected boolean isCoding(java.lang.Object obj)
- Specified by:
isCoding
in classMeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST extends DomainResource>
-
createCoding
protected Coding createCoding(java.lang.String text)
- Specified by:
createCoding
in classMeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST extends DomainResource>
-
getCodingCode
protected java.lang.String getCodingCode(Coding coding)
- Specified by:
getCodingCode
in classMeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST extends DomainResource>
-
createPatientObservation
protected DomainResource createPatientObservation(Measure measure, java.lang.String populationId, Coding coding)
- Specified by:
createPatientObservation
in classMeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST extends DomainResource>
-
createPopulationObservation
protected DomainResource createPopulationObservation(Measure measure, java.lang.String populationId, Coding coding, java.lang.Integer value)
- Specified by:
createPopulationObservation
in classMeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST extends DomainResource>
-
createMeasureInfoExtension
protected Extension createMeasureInfoExtension(MeasureInfo measureInfo)
-
addEvaluatedResource
protected void addEvaluatedResource(MeasureReport.Builder report, DomainResource resource)
- Specified by:
addEvaluatedResource
in classMeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST extends DomainResource>
-
addContained
protected void addContained(MeasureReport.Builder report, DomainResource resource)
- Specified by:
addContained
in classMeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST extends DomainResource>
-
getExtensionCoding
protected Coding getExtensionCoding(ST patient, java.lang.String coreCategory, java.lang.String sdeCode)
Description copied from class:MeasureEvaluation
Retrieve the coding from an extension that that looks like the following... { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "extension": [ { "url": "ombCategory", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "2054-5", "display": "Black or African American" } } ] }- Specified by:
getExtensionCoding
in classMeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST extends DomainResource>
-
createCodingExtension
protected Extension createCodingExtension(java.lang.String url, java.lang.String codeSystem, java.lang.String code)
- Specified by:
createCodingExtension
in classMeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST extends DomainResource>
-
createReference
protected Reference.Builder createReference(java.lang.String resourceId)
- Specified by:
createReference
in classMeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST extends DomainResource>
-
createListResource
protected List createListResource(java.util.Collection<List.Entry> entries)
- Specified by:
createListResource
in classMeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST extends DomainResource>
-
createListEntry
protected List.Entry createListEntry(Reference.Builder reference)
- Specified by:
createListEntry
in classMeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST extends DomainResource>
-
addExtension
protected void addExtension(Reference.Builder reference, Extension extension)
- Specified by:
addExtension
in classMeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST extends DomainResource>
-
setEvaluatedResources
protected void setEvaluatedResources(MeasureReport.Builder report, java.util.Collection<Reference.Builder> evaluatedResources)
- Specified by:
setEvaluatedResources
in classMeasureEvaluation<java.lang.Object,Measure,Measure.Group,Measure.Group.Population,Measure.SupplementalData,MeasureReport.Builder,MeasureReport.Group.Builder,MeasureReport.Group.Population.Builder,Coding,Extension,Reference.Builder,List,List.Entry,DomainResource,ST extends DomainResource>
-
-