Search in sources :

Example 91 with Measure

use of org.hl7.fhir.r4b.model.Measure in project quality-measure-and-cohort-service by Alvearie.

the class SHA256NameVersionIdStrategyTest method same_input_multiple_times___always_same_output.

@Test
public void same_input_multiple_times___always_same_output() throws Exception {
    String name = "COL-Denominator";
    String version = "1.1.0";
    MetadataResource resource = new Measure();
    resource.setName(name);
    resource.setVersion(version);
    Set<String> ids = new HashSet<>();
    for (int i = 0; i < 1000; i++) {
        ids.add(strategy.generateId(resource));
    }
    assertEquals(1, ids.size());
}
Also used : MetadataResource(org.hl7.fhir.r4.model.MetadataResource) Measure(org.hl7.fhir.r4.model.Measure) HashSet(java.util.HashSet) Test(org.junit.Test)

Example 92 with Measure

use of org.hl7.fhir.r4b.model.Measure in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeMeasure.

protected void composeMeasure(Complex parent, String parentType, String name, Measure element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "Measure", name, element, index);
    if (element.hasModuleMetadata())
        composeModuleMetadata(t, "Measure", "moduleMetadata", element.getModuleMetadata(), -1);
    for (int i = 0; i < element.getLibrary().size(); i++) composeReference(t, "Measure", "library", element.getLibrary().get(i), i);
    if (element.hasDisclaimerElement())
        composeMarkdown(t, "Measure", "disclaimer", element.getDisclaimerElement(), -1);
    if (element.hasScoringElement())
        composeEnum(t, "Measure", "scoring", element.getScoringElement(), -1);
    for (int i = 0; i < element.getType().size(); i++) composeEnum(t, "Measure", "type", element.getType().get(i), i);
    if (element.hasRiskAdjustmentElement())
        composeString(t, "Measure", "riskAdjustment", element.getRiskAdjustmentElement(), -1);
    if (element.hasRateAggregationElement())
        composeString(t, "Measure", "rateAggregation", element.getRateAggregationElement(), -1);
    if (element.hasRationaleElement())
        composeMarkdown(t, "Measure", "rationale", element.getRationaleElement(), -1);
    if (element.hasClinicalRecommendationStatementElement())
        composeMarkdown(t, "Measure", "clinicalRecommendationStatement", element.getClinicalRecommendationStatementElement(), -1);
    if (element.hasImprovementNotationElement())
        composeString(t, "Measure", "improvementNotation", element.getImprovementNotationElement(), -1);
    if (element.hasDefinitionElement())
        composeMarkdown(t, "Measure", "definition", element.getDefinitionElement(), -1);
    if (element.hasGuidanceElement())
        composeMarkdown(t, "Measure", "guidance", element.getGuidanceElement(), -1);
    if (element.hasSetElement())
        composeString(t, "Measure", "set", element.getSetElement(), -1);
    for (int i = 0; i < element.getGroup().size(); i++) composeMeasureMeasureGroupComponent(t, "Measure", "group", element.getGroup().get(i), i);
    for (int i = 0; i < element.getSupplementalData().size(); i++) composeMeasureMeasureSupplementalDataComponent(t, "Measure", "supplementalData", element.getSupplementalData().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 93 with Measure

use of org.hl7.fhir.r4b.model.Measure in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeMeasureMeasureSupplementalDataComponent.

protected void composeMeasureMeasureSupplementalDataComponent(Complex parent, String parentType, String name, Measure.MeasureSupplementalDataComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "supplementalData", name, element, index);
    if (element.hasIdentifier())
        composeIdentifier(t, "Measure", "identifier", element.getIdentifier(), -1);
    for (int i = 0; i < element.getUsage().size(); i++) composeEnum(t, "Measure", "usage", element.getUsage().get(i), i);
    if (element.hasCriteriaElement())
        composeString(t, "Measure", "criteria", element.getCriteriaElement(), -1);
    if (element.hasPathElement())
        composeString(t, "Measure", "path", element.getPathElement(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 94 with Measure

use of org.hl7.fhir.r4b.model.Measure in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeMeasureMeasureGroupPopulationComponent.

protected void composeMeasureMeasureGroupPopulationComponent(Complex parent, String parentType, String name, Measure.MeasureGroupPopulationComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "population", name, element, index);
    if (element.hasIdentifier())
        composeIdentifier(t, "Measure", "identifier", element.getIdentifier(), -1);
    if (element.hasCode())
        composeCodeableConcept(t, "Measure", "code", element.getCode(), -1);
    if (element.hasNameElement())
        composeString(t, "Measure", "name", element.getNameElement(), -1);
    if (element.hasDescriptionElement())
        composeString(t, "Measure", "description", element.getDescriptionElement(), -1);
    if (element.hasCriteriaElement())
        composeString(t, "Measure", "criteria", element.getCriteriaElement(), -1);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 95 with Measure

use of org.hl7.fhir.r4b.model.Measure in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeMeasureMeasureSupplementalDataComponent.

protected void composeMeasureMeasureSupplementalDataComponent(Complex parent, String parentType, String name, Measure.MeasureSupplementalDataComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "supplementalData", name, element, index);
    if (element.hasIdentifier())
        composeIdentifier(t, "Measure", "identifier", element.getIdentifier(), -1);
    for (int i = 0; i < element.getUsage().size(); i++) composeCodeableConcept(t, "Measure", "usage", element.getUsage().get(i), i);
    if (element.hasCriteriaElement())
        composeString(t, "Measure", "criteria", element.getCriteriaElement(), -1);
    if (element.hasPathElement())
        composeString(t, "Measure", "path", element.getPathElement(), -1);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Aggregations

Measure (org.hl7.fhir.r4.model.Measure)119 Test (org.junit.Test)97 Library (org.hl7.fhir.r4.model.Library)61 Patient (org.hl7.fhir.r4.model.Patient)45 MeasureReport (org.hl7.fhir.r4.model.MeasureReport)44 HashMap (java.util.HashMap)24 ArrayList (java.util.ArrayList)23 DateParameter (com.ibm.cohort.cql.evaluation.parameters.DateParameter)22 IntervalParameter (com.ibm.cohort.cql.evaluation.parameters.IntervalParameter)22 Parameter (com.ibm.cohort.cql.evaluation.parameters.Parameter)22 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)21 ByteArrayOutputStream (java.io.ByteArrayOutputStream)21 MeasureEvidenceOptions (com.ibm.cohort.engine.measure.evidence.MeasureEvidenceOptions)20 CapabilityStatement (org.hl7.fhir.r4.model.CapabilityStatement)20 Test (org.junit.jupiter.api.Test)18 Extension (org.hl7.fhir.r4.model.Extension)15 StringType (org.hl7.fhir.r4.model.StringType)15 DatetimeParameter (com.ibm.cohort.cql.evaluation.parameters.DatetimeParameter)14 CanonicalType (org.hl7.fhir.r4.model.CanonicalType)14 CodeableConcept (org.hl7.fhir.r4.model.CodeableConcept)14