Search in sources :

Example 11 with DetectedIssue

use of org.hl7.fhir.r4.model.DetectedIssue in project org.hl7.fhir.core by hapifhir.

the class TurtleTests method test_detectedissue_example_dup.

@Test
public void test_detectedissue_example_dup() throws FileNotFoundException, IOException, Exception {
    System.out.println("detectedissue-example-dup.ttl");
    new Turtle().parse(TextFile.fileToString("C:\\work\\org.hl7.fhir\\build\\publish\\detectedissue-example-dup.ttl"));
}
Also used : Turtle(org.hl7.fhir.dstu3.utils.formats.Turtle) Test(org.junit.jupiter.api.Test)

Example 12 with DetectedIssue

use of org.hl7.fhir.r4.model.DetectedIssue in project cqf-ruler by DBCG.

the class CareGapsProvider method addBundleEntries.

private Bundle addBundleEntries(String serverBase, Composition composition, List<DetectedIssue> detectedIssues, List<MeasureReport> reports, Map<String, Resource> evaluatedResources) {
    Bundle reportBundle = getBundle();
    reportBundle.addEntry(getBundleEntry(serverBase, composition));
    reports.forEach(report -> reportBundle.addEntry(getBundleEntry(serverBase, report)));
    detectedIssues.forEach(detectedIssue -> reportBundle.addEntry(getBundleEntry(serverBase, detectedIssue)));
    configuredResources.values().forEach(resource -> reportBundle.addEntry(getBundleEntry(serverBase, resource)));
    evaluatedResources.values().forEach(resource -> reportBundle.addEntry(getBundleEntry(serverBase, resource)));
    return reportBundle;
}
Also used : Bundle(org.hl7.fhir.r4.model.Bundle)

Example 13 with DetectedIssue

use of org.hl7.fhir.r4.model.DetectedIssue in project cqf-ruler by DBCG.

the class CareGapsProvider method getReports.

// warning for greater than 7 parameters
@SuppressWarnings("squid:S00107")
private List<MeasureReport> getReports(RequestDetails requestDetails, String periodStart, String periodEnd, Patient patient, List<String> status, List<Measure> measures, Composition composition, List<DetectedIssue> detectedIssues, Map<String, Resource> evaluatedResources) {
    List<MeasureReport> reports = new ArrayList<>();
    MeasureReport report = null;
    for (Measure measure : measures) {
        report = measureEvaluateProvider.evaluateMeasure(requestDetails, measure.getIdElement(), periodStart, periodEnd, "patient", Ids.simple(patient), null, null, null, null);
        if (!report.hasGroup()) {
            ourLog.info("Report does not include a group so skipping.\nSubject: {}\nMeasure: {}", Ids.simple(patient), Ids.simplePart(measure));
            continue;
        }
        initializeReport(report);
        CareGapsStatusCode gapStatus = getGapStatus(measure, report);
        if (!status.contains(gapStatus.toString())) {
            continue;
        }
        DetectedIssue detectedIssue = getDetectedIssue(patient, report, gapStatus);
        detectedIssues.add(detectedIssue);
        composition.addSection(getSection(measure, report, detectedIssue, gapStatus));
        getEvaluatedResources(report, evaluatedResources);
        reports.add(report);
    }
    return reports;
}
Also used : DetectedIssue(org.hl7.fhir.r4.model.DetectedIssue) ArrayList(java.util.ArrayList) Measure(org.hl7.fhir.r4.model.Measure) MeasureReport(org.hl7.fhir.r4.model.MeasureReport)

Example 14 with DetectedIssue

use of org.hl7.fhir.r4.model.DetectedIssue in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeDetectedIssue.

protected void composeDetectedIssue(Complex parent, String parentType, String name, DetectedIssue element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "DetectedIssue", name, element, index);
    if (element.hasIdentifier())
        composeIdentifier(t, "DetectedIssue", "identifier", element.getIdentifier(), -1);
    if (element.hasStatusElement())
        composeEnum(t, "DetectedIssue", "status", element.getStatusElement(), -1);
    if (element.hasCategory())
        composeCodeableConcept(t, "DetectedIssue", "category", element.getCategory(), -1);
    if (element.hasSeverityElement())
        composeEnum(t, "DetectedIssue", "severity", element.getSeverityElement(), -1);
    if (element.hasPatient())
        composeReference(t, "DetectedIssue", "patient", element.getPatient(), -1);
    if (element.hasDateElement())
        composeDateTime(t, "DetectedIssue", "date", element.getDateElement(), -1);
    if (element.hasAuthor())
        composeReference(t, "DetectedIssue", "author", element.getAuthor(), -1);
    for (int i = 0; i < element.getImplicated().size(); i++) composeReference(t, "DetectedIssue", "implicated", element.getImplicated().get(i), i);
    if (element.hasDetailElement())
        composeString(t, "DetectedIssue", "detail", element.getDetailElement(), -1);
    if (element.hasReferenceElement())
        composeUri(t, "DetectedIssue", "reference", element.getReferenceElement(), -1);
    for (int i = 0; i < element.getMitigation().size(); i++) composeDetectedIssueDetectedIssueMitigationComponent(t, "DetectedIssue", "mitigation", element.getMitigation().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 15 with DetectedIssue

use of org.hl7.fhir.r4.model.DetectedIssue in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeDetectedIssueDetectedIssueMitigationComponent.

protected void composeDetectedIssueDetectedIssueMitigationComponent(Complex parent, String parentType, String name, DetectedIssue.DetectedIssueMitigationComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "mitigation", name, element, index);
    if (element.hasAction())
        composeCodeableConcept(t, "DetectedIssue", "action", element.getAction(), -1);
    if (element.hasDateElement())
        composeDateTime(t, "DetectedIssue", "date", element.getDateElement(), -1);
    if (element.hasAuthor())
        composeReference(t, "DetectedIssue", "author", element.getAuthor(), -1);
}
Also used : Complex(org.hl7.fhir.r4.utils.formats.Turtle.Complex)

Aggregations

Complex (org.hl7.fhir.r4.utils.formats.Turtle.Complex)5 Turtle (org.hl7.fhir.dstu3.utils.formats.Turtle)4 Complex (org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)4 Test (org.junit.jupiter.api.Test)4 ArrayList (java.util.ArrayList)3 Complex (org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)2 Identifier (org.hl7.fhir.dstu2016may.model.Identifier)2 DetectedIssue (org.hl7.fhir.r4.model.DetectedIssue)2 MeasureReport (org.hl7.fhir.r4.model.MeasureReport)2 HashMap (java.util.HashMap)1 Reference (org.hl7.fhir.dstu2016may.model.Reference)1 Bundle (org.hl7.fhir.r4.model.Bundle)1 CodeableConcept (org.hl7.fhir.r4.model.CodeableConcept)1 Coding (org.hl7.fhir.r4.model.Coding)1 Composition (org.hl7.fhir.r4.model.Composition)1 DetectedIssueEvidenceComponent (org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueEvidenceComponent)1 Measure (org.hl7.fhir.r4.model.Measure)1 Resource (org.hl7.fhir.r4.model.Resource)1