use of org.hl7.fhir.r4b.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;
}
use of org.hl7.fhir.r4b.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;
}
use of org.hl7.fhir.r4b.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;
}
use of org.hl7.fhir.r4b.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;
}
use of org.hl7.fhir.r4b.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;
}
Aggregations