Search in sources :

Example 36 with ClaimResponse

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

the class RdfParser method composeClaimResponseAdjudicationComponent.

protected void composeClaimResponseAdjudicationComponent(Complex parent, String parentType, String name, ClaimResponse.AdjudicationComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "adjudication", name, element, index);
    if (element.hasCategory())
        composeCodeableConcept(t, "ClaimResponse", "category", element.getCategory(), -1);
    if (element.hasReason())
        composeCodeableConcept(t, "ClaimResponse", "reason", element.getReason(), -1);
    if (element.hasAmount())
        composeMoney(t, "ClaimResponse", "amount", element.getAmount(), -1);
    if (element.hasValueElement())
        composeDecimal(t, "ClaimResponse", "value", element.getValueElement(), -1);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 37 with ClaimResponse

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

the class RdfParser method composeClaimResponseAddedItemSubDetailComponent.

protected void composeClaimResponseAddedItemSubDetailComponent(Complex parent, String parentType, String name, ClaimResponse.AddedItemSubDetailComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "subDetail", name, element, index);
    if (element.hasProductOrService())
        composeCodeableConcept(t, "ClaimResponse", "productOrService", element.getProductOrService(), -1);
    for (int i = 0; i < element.getModifier().size(); i++) composeCodeableConcept(t, "ClaimResponse", "modifier", element.getModifier().get(i), i);
    if (element.hasQuantity())
        composeQuantity(t, "ClaimResponse", "quantity", element.getQuantity(), -1);
    if (element.hasUnitPrice())
        composeMoney(t, "ClaimResponse", "unitPrice", element.getUnitPrice(), -1);
    if (element.hasFactorElement())
        composeDecimal(t, "ClaimResponse", "factor", element.getFactorElement(), -1);
    if (element.hasNet())
        composeMoney(t, "ClaimResponse", "net", element.getNet(), -1);
    for (int i = 0; i < element.getNoteNumber().size(); i++) composePositiveInt(t, "ClaimResponse", "noteNumber", element.getNoteNumber().get(i), i);
    for (int i = 0; i < element.getAdjudication().size(); i++) composeClaimResponseAdjudicationComponent(t, "ClaimResponse", "adjudication", element.getAdjudication().get(i), i);
}
Also used : Complex(org.hl7.fhir.r4.utils.formats.Turtle.Complex)

Example 38 with ClaimResponse

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

the class RdfParser method composeClaimResponseItemDetailComponent.

protected void composeClaimResponseItemDetailComponent(Complex parent, String parentType, String name, ClaimResponse.ItemDetailComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "detail", name, element, index);
    if (element.hasDetailSequenceElement())
        composePositiveInt(t, "ClaimResponse", "detailSequence", element.getDetailSequenceElement(), -1);
    for (int i = 0; i < element.getNoteNumber().size(); i++) composePositiveInt(t, "ClaimResponse", "noteNumber", element.getNoteNumber().get(i), i);
    for (int i = 0; i < element.getAdjudication().size(); i++) composeClaimResponseAdjudicationComponent(t, "ClaimResponse", "adjudication", element.getAdjudication().get(i), i);
    for (int i = 0; i < element.getSubDetail().size(); i++) composeClaimResponseSubDetailComponent(t, "ClaimResponse", "subDetail", element.getSubDetail().get(i), i);
}
Also used : Complex(org.hl7.fhir.r4.utils.formats.Turtle.Complex)

Example 39 with ClaimResponse

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

the class RdfParser method composeClaimResponseSubDetailComponent.

protected void composeClaimResponseSubDetailComponent(Complex parent, String parentType, String name, ClaimResponse.SubDetailComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "subDetail", name, element, index);
    if (element.hasSubDetailSequenceElement())
        composePositiveInt(t, "ClaimResponse", "subDetailSequence", element.getSubDetailSequenceElement(), -1);
    for (int i = 0; i < element.getNoteNumber().size(); i++) composePositiveInt(t, "ClaimResponse", "noteNumber", element.getNoteNumber().get(i), i);
    for (int i = 0; i < element.getAdjudication().size(); i++) composeClaimResponseAdjudicationComponent(t, "ClaimResponse", "adjudication", element.getAdjudication().get(i), i);
}
Also used : Complex(org.hl7.fhir.r4.utils.formats.Turtle.Complex)

Example 40 with ClaimResponse

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

the class TurtleTests method test_claimresponse_example.

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

Aggregations

Complex (org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)16 Complex (org.hl7.fhir.r4.utils.formats.Turtle.Complex)15 Complex (org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)13 ClaimResponse (org.hl7.fhir.r4.model.ClaimResponse)4 Test (org.junit.jupiter.api.Test)3 IGenericClient (ca.uhn.fhir.rest.client.api.IGenericClient)2 Date (java.util.Date)2 Identifier (org.hl7.fhir.r4.model.Identifier)2 Meta (org.hl7.fhir.r4.model.Meta)2 Reference (org.hl7.fhir.r4.model.Reference)2 FhirResource (org.hl7.davinci.endpoint.database.FhirResource)1 Turtle (org.hl7.fhir.dstu3.utils.formats.Turtle)1 IBaseResource (org.hl7.fhir.instance.model.api.IBaseResource)1