Search in sources :

Example 11 with CodeableConcept

use of org.hl7.fhir.dstu2016may.model.CodeableConcept in project beneficiary-fhir-data by CMSgov.

the class TransformerUtilsV2 method createAdjudicationCategory.

/**
 * @param ccwVariable the {@link CcwCodebookInterface} being mapped
 * @return the {@link AdjudicationComponent#getCategory()} {@link CodeableConcept} to use for the
 *     specified {@link CcwCodebookInterface}
 */
static CodeableConcept createAdjudicationCategory(CcwCodebookInterface ccwVariable, String carinAdjuCode, String carinAdjuCodeDisplay) {
    /*
     * Adjudication.category is mapped a bit differently than other Codings/CodeableConcepts: they
     * all share the same Coding.system and use the CcwCodebookInterface reference URL as their
     * Coding.code. This looks weird, but makes it easy for API developers to find more information
     * about what the specific adjudication they're looking at means.
     */
    String conceptCode = CCWUtils.calculateVariableReferenceUrl(ccwVariable);
    CodeableConcept categoryConcept = createCodeableConcept(TransformerConstants.CODING_CCW_ADJUDICATION_CATEGORY, conceptCode);
    categoryConcept.getCodingFirstRep().setDisplay(ccwVariable.getVariable().getLabel());
    categoryConcept.addCoding().setSystem(C4BBAdjudication.SUBMITTED.getSystem()).setCode(carinAdjuCode).setDisplay(carinAdjuCodeDisplay);
    return categoryConcept;
}
Also used : CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept)

Example 12 with CodeableConcept

use of org.hl7.fhir.dstu2016may.model.CodeableConcept in project beneficiary-fhir-data by CMSgov.

the class FissClaimTransformerV2 method getContainedProvider.

private static Resource getContainedProvider(PreAdjFissClaim claimGroup) {
    Organization organization = new Organization();
    if (claimGroup.getMedaProv_6() != null) {
        organization.getIdentifier().add(new Identifier().setType(new CodeableConcept(new Coding(C4BBOrganizationIdentifierType.PRN.getSystem(), C4BBOrganizationIdentifierType.PRN.toCode(), C4BBOrganizationIdentifierType.PRN.getDisplay()))).setSystem(BBCodingSystems.PROVIDER_NUM).setValue(claimGroup.getMedaProv_6()));
    }
    if (claimGroup.getFedTaxNumber() != null) {
        organization.getIdentifier().add(new Identifier().setType(new CodeableConcept(new Coding(C4BBOrganizationIdentifierType.TAX.getSystem(), C4BBOrganizationIdentifierType.TAX.toCode(), C4BBOrganizationIdentifierType.TAX.getDisplay()))).setSystem(BBCodingSystems.FISS.TAX_NUM).setValue(claimGroup.getFedTaxNumber()));
    }
    if (claimGroup.getNpiNumber() != null) {
        organization.getIdentifier().add(new Identifier().setType(new CodeableConcept(new Coding(C4BBIdentifierType.NPI.getSystem(), C4BBIdentifierType.NPI.toCode(), C4BBIdentifierType.NPI.getDisplay()))).setSystem(TransformerConstants.CODING_NPI_US).setValue(claimGroup.getNpiNumber()));
    }
    organization.setId("provider-org");
    return organization;
}
Also used : Organization(org.hl7.fhir.r4.model.Organization) Identifier(org.hl7.fhir.r4.model.Identifier) Coding(org.hl7.fhir.r4.model.Coding) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept)

Example 13 with CodeableConcept

use of org.hl7.fhir.dstu2016may.model.CodeableConcept in project beneficiary-fhir-data by CMSgov.

the class McsClaimTransformerV2 method getContainedProvider.

private static Resource getContainedProvider(PreAdjMcsClaim claimGroup) {
    Organization organization = new Organization();
    if (claimGroup.getIdrBillProvType() != null) {
        organization.getExtension().add(new Extension(BBCodingSystems.MCS.BILL_PROV_TYPE).setValue(new Coding(BBCodingSystems.MCS.BILL_PROV_TYPE, claimGroup.getIdrBillProvType(), null)));
    }
    if (claimGroup.getIdrBillProvSpec() != null) {
        organization.getExtension().add(new Extension(BBCodingSystems.MCS.BILL_PROV_SPEC).setValue(new Coding(BBCodingSystems.MCS.BILL_PROV_SPEC, claimGroup.getIdrBillProvSpec(), null)));
    }
    if (claimGroup.getIdrBillProvEin() != null) {
        organization.getIdentifier().add(new Identifier().setType(new CodeableConcept(new Coding(C4BBOrganizationIdentifierType.TAX.getSystem(), C4BBOrganizationIdentifierType.TAX.toCode(), C4BBOrganizationIdentifierType.TAX.getDisplay()))).setSystem(BBCodingSystems.MCS.BILL_PROV_EIN).setValue(claimGroup.getIdrBillProvEin()));
    }
    if (claimGroup.getIdrBillProvNum() != null) {
        organization.getIdentifier().add(new Identifier().setType(new CodeableConcept(new Coding(C4BBIdentifierType.NPI.getSystem(), C4BBIdentifierType.NPI.toCode(), C4BBIdentifierType.NPI.getDisplay()))).setSystem(TransformerConstants.CODING_NPI_US).setValue(claimGroup.getIdrBillProvNpi()));
    }
    organization.setId("provider-org");
    return organization;
}
Also used : Extension(org.hl7.fhir.r4.model.Extension) Organization(org.hl7.fhir.r4.model.Organization) Identifier(org.hl7.fhir.r4.model.Identifier) Coding(org.hl7.fhir.r4.model.Coding) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept)

Example 14 with CodeableConcept

use of org.hl7.fhir.dstu2016may.model.CodeableConcept in project beneficiary-fhir-data by CMSgov.

the class TransformerUtils method createCodeableConcept.

/**
 * @param rootResource the root FHIR {@link IAnyResource} that the resultant {@link
 *     CodeableConcept} will be contained in
 * @param ccwVariable the {@link CcwCodebookInterface} being coded
 * @param code the value to use for {@link Coding#getCode()} for the resulting (single) {@link
 *     Coding}, wrapped within the resulting {@link CodeableConcept}
 * @return the output {@link CodeableConcept} for the specified input values
 */
static CodeableConcept createCodeableConcept(IAnyResource rootResource, CcwCodebookInterface ccwVariable, Optional<?> code) {
    if (!code.isPresent())
        throw new IllegalArgumentException();
    Coding coding = createCoding(rootResource, ccwVariable, code.get());
    CodeableConcept concept = new CodeableConcept();
    concept.addCoding(coding);
    return concept;
}
Also used : Coding(org.hl7.fhir.dstu3.model.Coding) CodeableConcept(org.hl7.fhir.dstu3.model.CodeableConcept)

Example 15 with CodeableConcept

use of org.hl7.fhir.dstu2016may.model.CodeableConcept in project beneficiary-fhir-data by CMSgov.

the class TransformerUtils method createCodeableConcept.

/**
 * @param codingSystem the {@link Coding#getSystem()} to use
 * @param codingVersion the {@link Coding#getVersion()} to use
 * @param codingDisplay the {@link Coding#getDisplay()} to use
 * @param codingCode the {@link Coding#getCode()} to use
 * @return a {@link CodeableConcept} with the specified {@link Coding}
 */
static CodeableConcept createCodeableConcept(String codingSystem, String codingVersion, String codingDisplay, String codingCode) {
    CodeableConcept codeableConcept = new CodeableConcept();
    Coding coding = codeableConcept.addCoding().setSystem(codingSystem).setCode(codingCode);
    if (codingVersion != null)
        coding.setVersion(codingVersion);
    if (codingDisplay != null)
        coding.setDisplay(codingDisplay);
    return codeableConcept;
}
Also used : Coding(org.hl7.fhir.dstu3.model.Coding) CodeableConcept(org.hl7.fhir.dstu3.model.CodeableConcept)

Aggregations

CodeableConcept (org.hl7.fhir.r4.model.CodeableConcept)566 Coding (org.hl7.fhir.r4.model.Coding)368 Test (org.junit.jupiter.api.Test)260 Test (org.junit.Test)155 CodeableConcept (org.hl7.fhir.dstu3.model.CodeableConcept)152 ArrayList (java.util.ArrayList)126 Money (org.hl7.fhir.r4.model.Money)122 Coding (org.hl7.fhir.dstu3.model.Coding)71 Date (java.util.Date)70 AdjudicationComponent (org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent)67 Reference (org.hl7.fhir.r4.model.Reference)64 Identifier (org.hl7.fhir.r4.model.Identifier)61 BenefitComponent (org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitComponent)60 BundleEntryComponent (org.hl7.fhir.r4.model.Bundle.BundleEntryComponent)50 CodeableConcept (org.hl7.fhir.r5.model.CodeableConcept)47 DecimalType (org.hl7.fhir.r4.model.DecimalType)44 Concept (org.openmrs.Concept)42 Extension (org.hl7.fhir.r4.model.Extension)38 Resource (org.hl7.fhir.r4.model.Resource)38 List (java.util.List)37