Search in sources :

Example 16 with Contract

use of org.hl7.fhir.dstu3.model.Contract in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeContract.

protected void composeContract(Complex parent, String parentType, String name, Contract element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "Contract", name, element, index);
    if (element.hasIdentifier())
        composeIdentifier(t, "Contract", "identifier", element.getIdentifier(), -1);
    if (element.hasIssuedElement())
        composeDateTime(t, "Contract", "issued", element.getIssuedElement(), -1);
    if (element.hasApplies())
        composePeriod(t, "Contract", "applies", element.getApplies(), -1);
    for (int i = 0; i < element.getSubject().size(); i++) composeReference(t, "Contract", "subject", element.getSubject().get(i), i);
    for (int i = 0; i < element.getTopic().size(); i++) composeReference(t, "Contract", "topic", element.getTopic().get(i), i);
    for (int i = 0; i < element.getAuthority().size(); i++) composeReference(t, "Contract", "authority", element.getAuthority().get(i), i);
    for (int i = 0; i < element.getDomain().size(); i++) composeReference(t, "Contract", "domain", element.getDomain().get(i), i);
    if (element.hasType())
        composeCodeableConcept(t, "Contract", "type", element.getType(), -1);
    for (int i = 0; i < element.getSubType().size(); i++) composeCodeableConcept(t, "Contract", "subType", element.getSubType().get(i), i);
    for (int i = 0; i < element.getAction().size(); i++) composeCodeableConcept(t, "Contract", "action", element.getAction().get(i), i);
    for (int i = 0; i < element.getActionReason().size(); i++) composeCodeableConcept(t, "Contract", "actionReason", element.getActionReason().get(i), i);
    for (int i = 0; i < element.getAgent().size(); i++) composeContractAgentComponent(t, "Contract", "agent", element.getAgent().get(i), i);
    for (int i = 0; i < element.getSigner().size(); i++) composeContractSignatoryComponent(t, "Contract", "signer", element.getSigner().get(i), i);
    for (int i = 0; i < element.getValuedItem().size(); i++) composeContractValuedItemComponent(t, "Contract", "valuedItem", element.getValuedItem().get(i), i);
    for (int i = 0; i < element.getTerm().size(); i++) composeContractTermComponent(t, "Contract", "term", element.getTerm().get(i), i);
    if (element.hasBinding())
        composeType(t, "Contract", "binding", element.getBinding(), -1);
    for (int i = 0; i < element.getFriendly().size(); i++) composeContractFriendlyLanguageComponent(t, "Contract", "friendly", element.getFriendly().get(i), i);
    for (int i = 0; i < element.getLegal().size(); i++) composeContractLegalLanguageComponent(t, "Contract", "legal", element.getLegal().get(i), i);
    for (int i = 0; i < element.getRule().size(); i++) composeContractComputableLanguageComponent(t, "Contract", "rule", element.getRule().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 17 with Contract

use of org.hl7.fhir.dstu3.model.Contract in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeContractAgentComponent.

protected void composeContractAgentComponent(Complex parent, String parentType, String name, Contract.AgentComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "agent", name, element, index);
    if (element.hasActor())
        composeReference(t, "Contract", "actor", element.getActor(), -1);
    for (int i = 0; i < element.getRole().size(); i++) composeCodeableConcept(t, "Contract", "role", element.getRole().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 18 with Contract

use of org.hl7.fhir.dstu3.model.Contract in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeContractLegalLanguageComponent.

protected void composeContractLegalLanguageComponent(Complex parent, String parentType, String name, Contract.LegalLanguageComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "legal", name, element, index);
    if (element.hasContent())
        composeType(t, "Contract", "content", element.getContent(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 19 with Contract

use of org.hl7.fhir.dstu3.model.Contract in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeContractValuedItemComponent.

protected void composeContractValuedItemComponent(Complex parent, String parentType, String name, Contract.ValuedItemComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "valuedItem", name, element, index);
    if (element.hasEntity())
        composeType(t, "Contract", "entity", element.getEntity(), -1);
    if (element.hasIdentifier())
        composeIdentifier(t, "Contract", "identifier", element.getIdentifier(), -1);
    if (element.hasEffectiveTimeElement())
        composeDateTime(t, "Contract", "effectiveTime", element.getEffectiveTimeElement(), -1);
    if (element.hasQuantity())
        composeQuantity(t, "Contract", "quantity", element.getQuantity(), -1);
    if (element.hasUnitPrice())
        composeMoney(t, "Contract", "unitPrice", element.getUnitPrice(), -1);
    if (element.hasFactorElement())
        composeDecimal(t, "Contract", "factor", element.getFactorElement(), -1);
    if (element.hasPointsElement())
        composeDecimal(t, "Contract", "points", element.getPointsElement(), -1);
    if (element.hasNet())
        composeMoney(t, "Contract", "net", element.getNet(), -1);
    if (element.hasPaymentElement())
        composeString(t, "Contract", "payment", element.getPaymentElement(), -1);
    if (element.hasPaymentDateElement())
        composeDateTime(t, "Contract", "paymentDate", element.getPaymentDateElement(), -1);
    if (element.hasResponsible())
        composeReference(t, "Contract", "responsible", element.getResponsible(), -1);
    if (element.hasRecipient())
        composeReference(t, "Contract", "recipient", element.getRecipient(), -1);
    for (int i = 0; i < element.getLinkId().size(); i++) composeString(t, "Contract", "linkId", element.getLinkId().get(i), i);
    for (int i = 0; i < element.getSecurityLabelNumber().size(); i++) composeUnsignedInt(t, "Contract", "securityLabelNumber", element.getSecurityLabelNumber().get(i), i);
}
Also used : Complex(org.hl7.fhir.r4.utils.formats.Turtle.Complex)

Example 20 with Contract

use of org.hl7.fhir.dstu3.model.Contract in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeContractComputableLanguageComponent.

protected void composeContractComputableLanguageComponent(Complex parent, String parentType, String name, Contract.ComputableLanguageComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "rule", name, element, index);
    if (element.hasContent())
        composeType(t, "Contract", "content", element.getContent(), -1);
}
Also used : Complex(org.hl7.fhir.r4.utils.formats.Turtle.Complex)

Aggregations

Complex (org.hl7.fhir.r4.utils.formats.Turtle.Complex)17 Complex (org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)12 Complex (org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)12 Timer (com.codahale.metrics.Timer)6 Test (org.junit.jupiter.api.Test)6 ContractDTO (gov.cms.ab2d.common.dto.ContractDTO)4 CoverageMapping (gov.cms.ab2d.coverage.model.CoverageMapping)4 CoverageSearch (gov.cms.ab2d.coverage.model.CoverageSearch)4 ContractToContractCoverageMapping (gov.cms.ab2d.worker.config.ContractToContractCoverageMapping)4 ArrayList (java.util.ArrayList)4 CoveragePeriod (gov.cms.ab2d.coverage.model.CoveragePeriod)3 CoverageSearchEvent (gov.cms.ab2d.coverage.model.CoverageSearchEvent)3 Coverage (org.hl7.fhir.dstu3.model.Coverage)3 Job (gov.cms.ab2d.common.model.Job)2 PdpClient (gov.cms.ab2d.common.model.PdpClient)2 Identifiers (gov.cms.ab2d.coverage.model.Identifiers)2 LogManager (gov.cms.ab2d.eventlogger.LogManager)2 BundleUtils.createPatient (gov.cms.ab2d.worker.processor.BundleUtils.createPatient)2 CcwCodebookVariable (gov.cms.bfd.model.codebook.data.CcwCodebookVariable)2 HashMap (java.util.HashMap)2