From 8c1a10a998691fa83933ea2262a58be9a79c25ea Mon Sep 17 00:00:00 2001 From: MahiFentaye <168698136+MahiFentaye@users.noreply.github.com> Date: Thu, 23 Jan 2025 11:54:57 -0500 Subject: [PATCH] BFD-3665 adding Samhsa test coverage BFD-3665 adding Samhsa test coverage some refactor --- .../war/commons/SecurityTagManager.java | 12 +- .../war/commons/TransformerConstants.java | 8 +- .../war/EndpointJsonComparatorBase.java | 44 +- .../EndpointJsonResponseComparatorV2E2E.java | 24 + .../EndpointJsonResponseComparatorE2E.java | 23 + .../providers/SecurityTagManagerTest.java | 1 - .../v1/eobByPatientIdAllWithSamhsa.json | 1042 +++++++++++++ .../v2/eobReadByPatientWithSamhsa.json | 1371 +++++++++++++++++ .../java/gov/cms/bfd/sharedutils/TagCode.java | 16 +- 9 files changed, 2521 insertions(+), 20 deletions(-) create mode 100644 apps/bfd-server/bfd-server-war/src/test/resources/endpoint-responses/v1/eobByPatientIdAllWithSamhsa.json create mode 100644 apps/bfd-server/bfd-server-war/src/test/resources/endpoint-responses/v2/eobReadByPatientWithSamhsa.json diff --git a/apps/bfd-server/bfd-server-war/src/main/java/gov/cms/bfd/server/war/commons/SecurityTagManager.java b/apps/bfd-server/bfd-server-war/src/main/java/gov/cms/bfd/server/war/commons/SecurityTagManager.java index 8082ecf185..4016899bff 100644 --- a/apps/bfd-server/bfd-server-war/src/main/java/gov/cms/bfd/server/war/commons/SecurityTagManager.java +++ b/apps/bfd-server/bfd-server-war/src/main/java/gov/cms/bfd/server/war/commons/SecurityTagManager.java @@ -66,7 +66,7 @@ public List getClaimSecurityLevel(String claimId, Class tagClass) { if (securityTags.isEmpty()) { Coding coding = new Coding(); coding - .setSystem("http://terminology.hl7.org/CodeSystem/v3-Confidentiality") + .setSystem(TransformerConstants.SAMHSA_CONFIDENTIALITY_CODE_SYSTEM_URL) .setCode("N") .setDisplay("Normal"); securityTagCoding.add(coding); @@ -83,20 +83,14 @@ public List getClaimSecurityLevel(String claimId, Class tagClass) { coding .setSystem(TransformerConstants.SAMHSA_CONFIDENTIALITY_CODE_SYSTEM_URL) .setCode(TagCode.R.toString()) - .setDisplay("Restricted"); + .setDisplay(TagCode.R.getDisplayName()); break; case _42CFRPart2: coding .setSystem(TransformerConstants.SAMHSA_ACT_CODE_SYSTEM_URL) .setCode(TagCode._42CFRPart2.toString()) - .setDisplay("42 CFR Part 2"); + .setDisplay(TagCode._42CFRPart2.getDisplayName()); break; - - default: - coding - .setSystem(TransformerConstants.SAMHSA_CONFIDENTIALITY_CODE_SYSTEM_URL) - .setCode("N") // Default to 'Normal' if unrecognized - .setDisplay("Normal"); } } securityTagCoding.add(coding); diff --git a/apps/bfd-server/bfd-server-war/src/main/java/gov/cms/bfd/server/war/commons/TransformerConstants.java b/apps/bfd-server/bfd-server-war/src/main/java/gov/cms/bfd/server/war/commons/TransformerConstants.java index 0a5d787bb0..7b496df935 100644 --- a/apps/bfd-server/bfd-server-war/src/main/java/gov/cms/bfd/server/war/commons/TransformerConstants.java +++ b/apps/bfd-server/bfd-server-war/src/main/java/gov/cms/bfd/server/war/commons/TransformerConstants.java @@ -705,15 +705,15 @@ public enum CurrencyIdentifier { "https://www.hhs.gov/sites/default/files/logo-white-lg.png"; /** - * URL for C4DIC Logo C4DIC - * Logo . + * HL7 CodeSystem v3-Confidentiality CodeSystem: . */ public static final String SAMHSA_CONFIDENTIALITY_CODE_SYSTEM_URL = "http://terminology.hl7.org/CodeSystem/v3-Confidentiality"; /** - * URL for C4DIC Logo C4DIC - * Logo . + * HL7 CodeSystem v3-ConfidentialityCodeSystem: . */ public static final String SAMHSA_ACT_CODE_SYSTEM_URL = "http://terminology.hl7.org/CodeSystem/v3-ActCode"; diff --git a/apps/bfd-server/bfd-server-war/src/test/java/gov/cms/bfd/server/war/EndpointJsonComparatorBase.java b/apps/bfd-server/bfd-server-war/src/test/java/gov/cms/bfd/server/war/EndpointJsonComparatorBase.java index 79a998754a..6e511f9e01 100644 --- a/apps/bfd-server/bfd-server-war/src/test/java/gov/cms/bfd/server/war/EndpointJsonComparatorBase.java +++ b/apps/bfd-server/bfd-server-war/src/test/java/gov/cms/bfd/server/war/EndpointJsonComparatorBase.java @@ -11,6 +11,7 @@ import gov.cms.bfd.model.rif.samples.StaticRifResourceGroup; import io.restassured.http.Header; import io.restassured.http.Headers; +import io.restassured.specification.RequestSpecification; import java.io.IOException; import java.io.UncheckedIOException; import java.nio.file.Path; @@ -78,16 +79,34 @@ protected static String getJsonResponseFor(String requestString) { requestString, new Headers(new Header("Content-Type", "application/json+fhir"))); } + /** + * Gets the json response for the specified endpoint request string and default content type json + * header. + * + * @param requestString the request string + * @param requestSpec the request Spec + * @return the json response for + */ + protected static String getJsonResponseFor( + String requestString, RequestSpecification requestSpec) { + return getJsonResponseFor( + requestString, + new Headers(new Header("Content-Type", "application/json+fhir")), + requestSpec); + } + /** * Gets the json response for the specified endpoint request string and specified headers. * * @param requestString the request string * @param headers the headers for the request + * @param requestSpec the request Specification * @return the json response for */ - protected static String getJsonResponseFor(String requestString, Headers headers) { + protected static String getJsonResponseFor( + String requestString, Headers headers, RequestSpecification requestSpec) { return given() - .spec(requestAuth) + .spec(requestSpec) .headers(headers) .expect() .log() @@ -101,6 +120,17 @@ protected static String getJsonResponseFor(String requestString, Headers headers .asString(); } + /** + * Gets the json response for the specified endpoint request string and specified headers. + * + * @param requestString the request string + * @param headers the headers for the request + * @return the json response for + */ + protected static String getJsonResponseFor(String requestString, Headers headers) { + return getJsonResponseFor(requestString, headers, requestAuth); + } + /** * Gets the expected json response directory. These are generated as a point in time comparison * when we know the responses are in a good state so that the json response tests can regression @@ -207,6 +237,16 @@ protected static Beneficiary getSampleABene() { return ServerTestUtils.get().getFirstBeneficiary(loadedRecords); } + /** + * Gets the first sample A beneficiary. + * + * @return the first sample A beneficiary + */ + protected static Beneficiary getSampleABeneSamhsa() { + List loadedRecords = ServerTestUtils.get().loadSampleASamhsaData(); + return ServerTestUtils.get().getFirstBeneficiary(loadedRecords); + } + /** * Gets the first sample A beneficiary. * diff --git a/apps/bfd-server/bfd-server-war/src/test/java/gov/cms/bfd/server/war/r4/providers/EndpointJsonResponseComparatorV2E2E.java b/apps/bfd-server/bfd-server-war/src/test/java/gov/cms/bfd/server/war/r4/providers/EndpointJsonResponseComparatorV2E2E.java index 96ec7b0860..bfbc32fb7d 100644 --- a/apps/bfd-server/bfd-server-war/src/test/java/gov/cms/bfd/server/war/r4/providers/EndpointJsonResponseComparatorV2E2E.java +++ b/apps/bfd-server/bfd-server-war/src/test/java/gov/cms/bfd/server/war/r4/providers/EndpointJsonResponseComparatorV2E2E.java @@ -130,6 +130,9 @@ public static Stream data() { arguments( "eobReadInpatient", (Supplier) EndpointJsonResponseComparatorV2E2E::eobReadInpatient), + arguments( + "eobReadByPatientWithSamhsa", + (Supplier) EndpointJsonResponseComparatorV2E2E::eobReadByPatientWithSamhsa), arguments( "eobReadOutpatient", (Supplier) EndpointJsonResponseComparatorV2E2E::eobReadOutpatient), @@ -769,6 +772,27 @@ public static String eobReadInpatient() { return getJsonResponseFor(baseServerUrl + "/v2/fhir/ExplanationOfBenefit/" + eobId); } + /** + * Executes a search against the EOB endpoint using an inpatient claim id (based on the sample a + * data) and returns the sorted results. + * + * @return the sorted results + */ + public static String eobReadByPatientWithSamhsa() { + Beneficiary bene = getSampleABeneSamhsa(); + + String url = + baseServerUrl + + "/v2/fhir/ExplanationOfBenefit/?patient=" + + bene.getBeneficiaryId() + + "&_count=" + + 2 + + "&_page=" + + (6); + + return getJsonResponseFor(url + bene.getBeneficiaryId(), getRequestAuth(SAMHSA_KEYSTORE)); + } + /** * Executes a search against the EOB endpoint using an outpatient claim id (based on the sample a * data) and returns the sorted results. diff --git a/apps/bfd-server/bfd-server-war/src/test/java/gov/cms/bfd/server/war/stu3/providers/EndpointJsonResponseComparatorE2E.java b/apps/bfd-server/bfd-server-war/src/test/java/gov/cms/bfd/server/war/stu3/providers/EndpointJsonResponseComparatorE2E.java index db692bda5c..59c3512bc7 100644 --- a/apps/bfd-server/bfd-server-war/src/test/java/gov/cms/bfd/server/war/stu3/providers/EndpointJsonResponseComparatorE2E.java +++ b/apps/bfd-server/bfd-server-war/src/test/java/gov/cms/bfd/server/war/stu3/providers/EndpointJsonResponseComparatorE2E.java @@ -104,6 +104,9 @@ public static Stream data() { arguments( "eobByPatientIdAll", (Supplier) EndpointJsonResponseComparatorE2E::eobByPatientIdAll), + arguments( + "eobByPatientIdAllWithSamhsa", + (Supplier) EndpointJsonResponseComparatorE2E::eobByPatientIdAllWithSamhsa), arguments( "eobByPatientIdPaged", (Supplier) EndpointJsonResponseComparatorE2E::eobByPatientIdPaged), @@ -575,6 +578,26 @@ public static String eobByPatientIdAll() { return sortDiagnosisTypes(response, "/entry/3/resource/diagnosis/7/type"); } + /** + * Executes a search against the EOB endpoint using the sample A bene id and returns the sorted + * results. + * + * @return the sorted results + */ + public static String eobByPatientIdAllWithSamhsa() { + Beneficiary beneficiary = getSampleABeneSamhsa(); + + String url = + baseServerUrl + + "/v1/fhir/ExplanationOfBenefit/?patient=" + + beneficiary.getBeneficiaryId() + + "&_count=" + + 2 + + "&_page=" + + (6); + return getJsonResponseFor(url, getRequestAuth(SAMHSA_KEYSTORE)); + } + /** * Executes a search against the EOB endpoint using the sample A bene id and returns the sorted * results with paging. diff --git a/apps/bfd-server/bfd-server-war/src/test/java/gov/cms/bfd/server/war/stu3/providers/SecurityTagManagerTest.java b/apps/bfd-server/bfd-server-war/src/test/java/gov/cms/bfd/server/war/stu3/providers/SecurityTagManagerTest.java index d6bac75bff..c6c5d7ccda 100644 --- a/apps/bfd-server/bfd-server-war/src/test/java/gov/cms/bfd/server/war/stu3/providers/SecurityTagManagerTest.java +++ b/apps/bfd-server/bfd-server-war/src/test/java/gov/cms/bfd/server/war/stu3/providers/SecurityTagManagerTest.java @@ -63,7 +63,6 @@ void testGetClaimSecurityLevelOutpatient() { type.addCoding().setCode("OUT"); Set mockTags = new HashSet<>(); - mockTags.add("NormalTag"); when(entityManager.createQuery(anyString())).thenReturn(query); when(query.getResultList()).thenReturn(new java.util.ArrayList<>(mockTags)); diff --git a/apps/bfd-server/bfd-server-war/src/test/resources/endpoint-responses/v1/eobByPatientIdAllWithSamhsa.json b/apps/bfd-server/bfd-server-war/src/test/resources/endpoint-responses/v1/eobByPatientIdAllWithSamhsa.json new file mode 100644 index 0000000000..fb233701f7 --- /dev/null +++ b/apps/bfd-server/bfd-server-war/src/test/resources/endpoint-responses/v1/eobByPatientIdAllWithSamhsa.json @@ -0,0 +1,1042 @@ +{ + "resourceType" : "Bundle", + "id" : "IGNORED_FIELD", + "meta" : { + "lastUpdated" : "IGNORED_FIELD" + }, + "type" : "searchset", + "total" : 4462, + "link" : [ { + "relation" : "first", + "url" : "https://localhost:IGNORED_FIELD/v1/fhir/ExplanationOfBenefit?_page=6&startIndex=0&_count=2&patient=567834" + }, { + "relation" : "next", + "url" : "https://localhost:IGNORED_FIELD/v1/fhir/ExplanationOfBenefit?_page=6&startIndex=2&_count=2&patient=567834" + }, { + "relation" : "last", + "url" : "https://localhost:IGNORED_FIELD/v1/fhir/ExplanationOfBenefit?_page=6&startIndex=4460&_count=2&patient=567834" + }, { + "relation" : "self", + "url" : "https://localhost:IGNORED_FIELD/v1/fhir/ExplanationOfBenefit/?_count=2&_page=6&patient=567834" + } ], + "entry" : [ { + "resource" : { + "resourceType" : "ExplanationOfBenefit", + "id" : "pde-89", + "meta" : { + "lastUpdated" : "IGNORED_FIELD" + }, + "identifier" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/pde_id", + "value" : "89" + }, { + "system" : "https://bluebutton.cms.gov/resources/identifier/claim-group", + "value" : "900" + }, { + "system" : "https://bluebutton.cms.gov/resources/variables/rx_srvc_rfrnc_num", + "value" : "799999" + } ], + "status" : "active", + "type" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/eob-type", + "code" : "PDE" + }, { + "system" : "http://hl7.org/fhir/ex-claimtype", + "code" : "pharmacy", + "display" : "Pharmacy" + } ] + }, + "patient" : { + "reference" : "Patient/567834" + }, + "billablePeriod" : { + "start" : "2015-05-12", + "end" : "2015-05-12" + }, + "organization" : { + "identifier" : { + "type" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/sid/us-npi", + "code" : "NPI", + "display" : "National Provider Identifier" + } ] + }, + "system" : "http://hl7.org/fhir/sid/us-npi", + "value" : "1023011079" + }, + "display" : "ADVANTAGE HOME HEALTH CARE, INC." + }, + "facility" : { + "extension" : [ { + "url" : "https://bluebutton.cms.gov/resources/variables/phrmcy_srvc_type_cd", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/phrmcy_srvc_type_cd", + "code" : "01", + "display" : "Community/retail pharmacy" + } + } ], + "identifier" : { + "type" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/sid/us-npi", + "code" : "NPI", + "display" : "National Provider Identifier" + } ] + }, + "system" : "http://hl7.org/fhir/sid/us-npi", + "value" : "1023011079" + }, + "display" : "ADVANTAGE HOME HEALTH CARE, INC." + }, + "information" : [ { + "sequence" : 1, + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/information", + "code" : "https://bluebutton.cms.gov/resources/variables/daw_prod_slctn_cd", + "display" : "Dispense as Written (DAW) Product Selection Code" + } ] + }, + "code" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/daw_prod_slctn_cd", + "code" : "0", + "display" : "No Product Selection Indicated (may also have missing values)" + } ] + } + }, { + "sequence" : 2, + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/information", + "code" : "https://bluebutton.cms.gov/resources/variables/dspnsng_stus_cd", + "display" : "Dispensing Status Code" + } ] + }, + "code" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/dspnsng_stus_cd", + "code" : "P", + "display" : "Partial fill" + } ] + } + }, { + "sequence" : 3, + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/information", + "code" : "https://bluebutton.cms.gov/resources/variables/drug_cvrg_stus_cd", + "display" : "Drug Coverage Status Code" + } ] + }, + "code" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/drug_cvrg_stus_cd", + "code" : "C", + "display" : "Covered" + } ] + } + }, { + "sequence" : 4, + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/information", + "code" : "https://bluebutton.cms.gov/resources/variables/adjstmt_dltn_cd", + "display" : "Adjustment Deletion Code" + } ] + }, + "code" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/adjstmt_dltn_cd", + "code" : "A", + "display" : "Adjustment" + } ] + } + }, { + "sequence" : 5, + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/information", + "code" : "https://bluebutton.cms.gov/resources/variables/nstd_frmt_cd", + "display" : "Non-Standard Format Code" + } ] + }, + "code" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/nstd_frmt_cd", + "code" : "X", + "display" : "X12 837" + } ] + } + }, { + "sequence" : 6, + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/information", + "code" : "https://bluebutton.cms.gov/resources/variables/prcng_excptn_cd", + "display" : "Pricing Exception Code" + } ] + }, + "code" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/prcng_excptn_cd", + "code" : "M", + "display" : "Medicare is a secondary payer (MSP)" + } ] + } + }, { + "sequence" : 7, + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/information", + "code" : "https://bluebutton.cms.gov/resources/variables/ctstrphc_cvrg_cd", + "display" : "Catastrophic Coverage Code" + } ] + }, + "code" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/ctstrphc_cvrg_cd", + "code" : "C", + "display" : "Above attachment point" + } ] + } + }, { + "sequence" : 8, + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/information", + "code" : "https://bluebutton.cms.gov/resources/variables/rx_orgn_cd", + "display" : "Prescription Origination Code" + } ] + }, + "code" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/rx_orgn_cd", + "code" : "3", + "display" : "Electronic" + } ] + } + }, { + "sequence" : 9, + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/information", + "code" : "https://bluebutton.cms.gov/resources/variables/brnd_gnrc_cd", + "display" : "Brand-Generic Code Reported by Submitting Plan" + } ] + }, + "code" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/brnd_gnrc_cd", + "code" : "G", + "display" : "Generic Null/missing" + } ] + } + }, { + "sequence" : 10, + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/information", + "code" : "https://bluebutton.cms.gov/resources/variables/phrmcy_srvc_type_cd", + "display" : "Pharmacy service type code" + } ] + }, + "code" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/phrmcy_srvc_type_cd", + "code" : "01", + "display" : "Community/retail pharmacy" + } ] + } + }, { + "sequence" : 11, + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/information", + "code" : "https://bluebutton.cms.gov/resources/variables/ptnt_rsdnc_cd", + "display" : "Patient Residence Code" + } ] + }, + "code" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/ptnt_rsdnc_cd", + "code" : "02", + "display" : "Skilled Nursing Facility" + } ] + } + }, { + "sequence" : 12, + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/information", + "code" : "https://bluebutton.cms.gov/resources/variables/submsn_clr_cd", + "display" : "Submission clarification code" + } ] + }, + "code" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/submsn_clr_cd", + "code" : "08", + "display" : "Process compound for approved ingredients" + } ] + } + } ], + "careTeam" : [ { + "sequence" : 2, + "provider" : { + "identifier" : { + "system" : "http://hl7.org/fhir/sid/us-npi", + "value" : "1750384806" + }, + "display" : "DR. ROBERT BISBEE MD" + }, + "role" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/claimcareteamrole", + "code" : "primary", + "display" : "Primary provider" + } ] + } + } ], + "insurance" : { + "coverage" : { + "extension" : [ { + "url" : "https://bluebutton.cms.gov/resources/variables/plan_cntrct_rec_id", + "valueIdentifier" : { + "system" : "https://bluebutton.cms.gov/resources/variables/plan_cntrct_rec_id", + "value" : "H9999" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/plan_pbp_rec_num", + "valueIdentifier" : { + "system" : "https://bluebutton.cms.gov/resources/variables/plan_pbp_rec_num", + "value" : "020" + } + } ], + "reference" : "Coverage/part-d-567834" + } + }, + "item" : [ { + "sequence" : 1, + "careTeamLinkId" : [ 2 ], + "service" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/sid/ndc", + "code" : "000000000", + "display" : "Fake Diluent - WATER" + } ] + }, + "servicedDate" : "2015-05-12", + "quantity" : { + "extension" : [ { + "url" : "https://bluebutton.cms.gov/resources/variables/fill_num", + "valueQuantity" : { + "value" : 3 + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/days_suply_num", + "valueQuantity" : { + "value" : 30 + } + } ], + "value" : 60.0 + }, + "adjudication" : [ { + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/cvrd_d_plan_pd_amt", + "display" : "Amount paid by Part D plan for the PDE (drug is covered by Part D)" + } ] + }, + "reason" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/drug_cvrg_stus_cd", + "code" : "C", + "display" : "Covered" + } ] + }, + "amount" : { + "value" : 126.99, + "system" : "urn:iso:std:iso:4217", + "code" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/gdc_blw_oopt_amt", + "display" : "Gross Drug Cost Below Part D Out-of-Pocket Threshold (GDCB)" + } ] + }, + "amount" : { + "value" : 995.34, + "system" : "urn:iso:std:iso:4217", + "code" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/gdc_abv_oopt_amt", + "display" : "Gross Drug Cost Above Part D Out-of-Pocket Threshold (GDCA)" + } ] + }, + "amount" : { + "value" : 15.25, + "system" : "urn:iso:std:iso:4217", + "code" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/ptnt_pay_amt", + "display" : "Amount Paid by Patient" + } ] + }, + "amount" : { + "value" : 235.85, + "system" : "urn:iso:std:iso:4217", + "code" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/othr_troop_amt", + "display" : "Other True Out-of-Pocket (TrOOP) Amount" + } ] + }, + "amount" : { + "value" : 17.3, + "system" : "urn:iso:std:iso:4217", + "code" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/lics_amt", + "display" : "Amount paid for the PDE by Part D low income subsidy" + } ] + }, + "amount" : { + "value" : 122.23, + "system" : "urn:iso:std:iso:4217", + "code" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/plro_amt", + "display" : "Reduction in patient liability due to payments by other payers (PLRO)" + } ] + }, + "amount" : { + "value" : 42.42, + "system" : "urn:iso:std:iso:4217", + "code" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/tot_rx_cst_amt", + "display" : "Total drug cost (Part D)" + } ] + }, + "amount" : { + "value" : 550.0, + "system" : "urn:iso:std:iso:4217", + "code" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/rptd_gap_dscnt_num", + "display" : "Gap Discount Amount" + } ] + }, + "amount" : { + "value" : 317.22, + "system" : "urn:iso:std:iso:4217", + "code" : "USD" + } + } ], + "detail" : [ { + "type" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/v3/ActCode", + "code" : "RXDINV", + "display" : "Rx dispense invoice" + } ] + } + } ] + } ], + "payment" : { + "date" : "2015-05-27" + } + } + }, { + "resource" : { + "resourceType" : "ExplanationOfBenefit", + "id" : "carrier-9991831000", + "meta" : { + "lastUpdated" : "IGNORED_FIELD", + "security" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v3-Confidentiality", + "code" : "42CFRPart2", + "display" : "42 CFR Part 2" + }, { + "system" : "http://terminology.hl7.org/CodeSystem/v3-Confidentiality", + "code" : "R", + "display" : "Restricted" + } ] + }, + "contained" : [ { + "resourceType" : "ReferralRequest", + "id" : "IGNORED_FIELD", + "status" : "completed", + "subject" : { + "reference" : "Patient/567834" + }, + "requester" : { + "agent" : { + "identifier" : { + "system" : "http://hl7.org/fhir/sid/us-npi", + "value" : "8765676" + } + } + }, + "recipient" : [ { + "identifier" : { + "system" : "http://hl7.org/fhir/sid/us-npi", + "value" : "8765676" + } + } ] + }, { + "resourceType" : "Observation", + "id" : "IGNORED_FIELD", + "status" : "unknown", + "code" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_type_cd", + "code" : "R1", + "display" : "Hemoglobin Test" + } ] + }, + "valueQuantity" : { + "value" : 42.0 + } + } ], + "extension" : [ { + "url" : "https://bluebutton.cms.gov/resources/variables/prpayamt", + "valueMoney" : { + "value" : 0.0, + "system" : "urn:iso:std:iso:4217", + "code" : "USD" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/carr_num", + "valueIdentifier" : { + "system" : "https://bluebutton.cms.gov/resources/variables/carr_num", + "value" : "61026" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/carr_clm_cntl_num", + "valueIdentifier" : { + "system" : "https://bluebutton.cms.gov/resources/variables/carr_clm_cntl_num", + "value" : "74655592568216" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/carr_clm_pmt_dnl_cd", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/carr_clm_pmt_dnl_cd", + "code" : "1", + "display" : "Physician/supplier" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/asgmntcd", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/asgmntcd", + "code" : "A", + "display" : "Assigned claim" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/clm_clncl_tril_num", + "valueIdentifier" : { + "system" : "https://bluebutton.cms.gov/resources/variables/clm_clncl_tril_num", + "value" : "0" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/carr_clm_cash_ddctbl_apld_amt", + "valueMoney" : { + "value" : 777.0, + "system" : "urn:iso:std:iso:4217", + "code" : "USD" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/nch_clm_prvdr_pmt_amt", + "valueMoney" : { + "value" : 123.45, + "system" : "urn:iso:std:iso:4217", + "code" : "USD" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/nch_clm_bene_pmt_amt", + "valueMoney" : { + "value" : 888.0, + "system" : "urn:iso:std:iso:4217", + "code" : "USD" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/nch_carr_clm_sbmtd_chrg_amt", + "valueMoney" : { + "value" : 245.04, + "system" : "urn:iso:std:iso:4217", + "code" : "USD" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/nch_carr_clm_alowd_amt", + "valueMoney" : { + "value" : 166.23, + "system" : "urn:iso:std:iso:4217", + "code" : "USD" + } + } ], + "identifier" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/clm_id", + "value" : "9991831000" + }, { + "system" : "https://bluebutton.cms.gov/resources/identifier/claim-group", + "value" : "900" + } ], + "status" : "active", + "type" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/nch_clm_type_cd", + "code" : "71", + "display" : "Local carrier non-durable medical equipment, prosthetics, orthotics, and supplies (DMEPOS) claim" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/eob-type", + "code" : "CARRIER" + }, { + "system" : "http://hl7.org/fhir/ex-claimtype", + "code" : "professional", + "display" : "Professional" + }, { + "system" : "https://bluebutton.cms.gov/resources/variables/nch_near_line_rec_ident_cd", + "code" : "O", + "display" : "Part B physician/supplier claim record (processed by local carriers; can include DMEPOS services)" + } ] + }, + "patient" : { + "reference" : "Patient/567834" + }, + "billablePeriod" : { + "start" : "1999-10-27", + "end" : "1999-10-27" + }, + "referral" : { + "reference" : "IGNORED_FIELD" + }, + "disposition" : "1", + "information" : [ { + "sequence" : 1, + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/information", + "code" : "https://bluebutton.cms.gov/resources/variables/nch_wkly_proc_dt", + "display" : "NCH Weekly Claim Processing Date" + } ] + }, + "timingDate" : "1999-11-06" + } ], + "careTeam" : [ { + "extension" : [ { + "url" : "https://bluebutton.cms.gov/resources/variables/carr_line_prvdr_type_cd", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/carr_line_prvdr_type_cd", + "code" : "0" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/prtcptng_ind_cd", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/prtcptng_ind_cd", + "code" : "1", + "display" : "Participating" + } + }, { + "url" : "http://hl7.org/fhir/sid/us-npi", + "valueCoding" : { + "system" : "http://hl7.org/fhir/sid/us-npi", + "code" : "0000000000", + "display" : "Fake ORG Name" + } + } ], + "sequence" : 2, + "provider" : { + "identifier" : { + "system" : "http://hl7.org/fhir/sid/us-npi", + "value" : "1923124" + } + }, + "responsible" : true, + "role" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/claimcareteamrole", + "code" : "primary", + "display" : "Primary provider" + } ] + }, + "qualification" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/prvdr_spclty", + "code" : "41", + "display" : "Optometrist" + } ] + } + } ], + "diagnosis" : [ { + "sequence" : 1, + "diagnosisCodeableConcept" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/sid/icd-9-cm", + "code" : "291" + } ] + }, + "type" : [ { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/diagnosis-type", + "code" : "principal", + "display" : "The single medical diagnosis that is most relevant to the patient's chief complaint or need for treatment." + } ] + } ] + }, { + "sequence" : 2, + "diagnosisCodeableConcept" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/sid/icd-10", + "code" : "A02", + "display" : "OTHER SALMONELLA INFECTIONS" + } ] + }, + "type" : [ { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/diagnosis-type", + "code" : "principal", + "display" : "The single medical diagnosis that is most relevant to the patient's chief complaint or need for treatment." + } ] + } ] + }, { + "sequence" : 3, + "diagnosisCodeableConcept" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/sid/icd-9-cm", + "code" : "A05", + "display" : "\"OTH BACTERIAL FOODBORNE INTOXICATIONS, NEC\"" + } ] + } + }, { + "sequence" : 4, + "diagnosisCodeableConcept" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/sid/icd-10", + "code" : "B04", + "display" : "MONKEYPOX" + } ] + } + }, { + "sequence" : 5, + "diagnosisCodeableConcept" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/sid/icd-10", + "code" : "B05", + "display" : "MEASLES" + } ] + } + }, { + "sequence" : 6, + "diagnosisCodeableConcept" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/sid/icd-10", + "code" : "A52", + "display" : "LATE SYPHILIS" + } ] + } + } ], + "insurance" : { + "coverage" : { + "reference" : "Coverage/part-b-567834" + } + }, + "item" : [ { + "extension" : [ { + "url" : "https://bluebutton.cms.gov/resources/variables/carr_line_mtus_cd", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/carr_line_mtus_cd", + "code" : "3", + "display" : "Services" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/carr_line_mtus_cnt", + "valueQuantity" : { + "value" : 1 + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/betos_cd", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/betos_cd", + "code" : "T2D", + "display" : "Other tests - other" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd", + "code" : "E", + "display" : "Workers' compensation" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/line_service_deductible", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/line_service_deductible", + "code" : "0", + "display" : "Service Subject to Deductible" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_rslt_num", + "valueReference" : { + "reference" : "IGNORED_FIELD" + } + }, { + "url" : "http://hl7.org/fhir/sid/ndc", + "valueCoding" : { + "system" : "http://hl7.org/fhir/sid/ndc", + "code" : "000000000", + "display" : "Fake Diluent - WATER" + } + } ], + "sequence" : 6, + "careTeamLinkId" : [ 2 ], + "diagnosisLinkId" : [ 6 ], + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/line_cms_type_srvc_cd", + "code" : "1", + "display" : "Medical care" + } ] + }, + "service" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/hcpcs", + "version" : "5", + "code" : "92999" + } ] + }, + "modifier" : [ { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/hcpcs", + "version" : "5", + "code" : "LT" + } ] + } ], + "servicedPeriod" : { + "start" : "1999-10-27", + "end" : "1999-10-27" + }, + "locationCodeableConcept" : { + "extension" : [ { + "url" : "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "code" : "IL" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "code" : "555558202" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "code" : "15", + "display" : "CONNECTICUT" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/carr_line_clia_lab_num", + "valueIdentifier" : { + "system" : "https://bluebutton.cms.gov/resources/variables/carr_line_clia_lab_num", + "value" : "BB889999AA" + } + } ], + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/line_place_of_srvc_cd", + "code" : "11", + "display" : "Office. Location, other than a hospital, skilled nursing facility (SNF), military treatment facility, community health center, State or local public health clinic, or intermediate care facility (ICF), where the health professional routinely provides health examinations, diagnosis, and treatment of illness or injury on an ambulatory basis." + } ] + }, + "quantity" : { + "value" : 1.0 + }, + "adjudication" : [ { + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/carr_line_rdcd_pmt_phys_astn_c", + "display" : "Carrier Line Reduced Payment Physician Assistant Code" + } ] + }, + "reason" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/carr_line_rdcd_pmt_phys_astn_c", + "code" : "0", + "display" : "N/A" + } ] + } + }, { + "extension" : [ { + "url" : "https://bluebutton.cms.gov/resources/variables/line_pmt_80_100_cd", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/line_pmt_80_100_cd", + "code" : "0", + "display" : "80%" + } + } ], + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/line_nch_pmt_amt", + "display" : "Line NCH Medicare Payment Amount" + } ] + }, + "amount" : { + "value" : 37.5, + "system" : "urn:iso:std:iso:4217", + "code" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/line_bene_pmt_amt", + "display" : "Line Payment Amount to Beneficiary" + } ] + }, + "amount" : { + "value" : 0.0, + "system" : "urn:iso:std:iso:4217", + "code" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/line_prvdr_pmt_amt", + "display" : "Line Provider Payment Amount" + } ] + }, + "amount" : { + "value" : 37.5, + "system" : "urn:iso:std:iso:4217", + "code" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/line_bene_ptb_ddctbl_amt", + "display" : "Line Beneficiary Part B Deductible Amount" + } ] + }, + "amount" : { + "value" : 0.0, + "system" : "urn:iso:std:iso:4217", + "code" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_pd_amt", + "display" : "Line Primary Payer (if not Medicare) Paid Amount" + } ] + }, + "amount" : { + "value" : 0.0, + "system" : "urn:iso:std:iso:4217", + "code" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/line_coinsrnc_amt", + "display" : "Line Beneficiary Coinsurance Amount" + } ] + }, + "amount" : { + "value" : 9.57, + "system" : "urn:iso:std:iso:4217", + "code" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/line_sbmtd_chrg_amt", + "display" : "Line Submitted Charge Amount" + } ] + }, + "amount" : { + "value" : 75.0, + "system" : "urn:iso:std:iso:4217", + "code" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/line_alowd_chrg_amt", + "display" : "Line Allowed Charge Amount" + } ] + }, + "amount" : { + "value" : 47.84, + "system" : "urn:iso:std:iso:4217", + "code" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "display" : "Line Processing Indicator Code" + } ] + }, + "reason" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "code" : "A", + "display" : "Allowed" + } ] + } + } ] + } ], + "payment" : { + "amount" : { + "value" : 199.99, + "system" : "urn:iso:std:iso:4217", + "code" : "USD" + } + } + } + } ] +} \ No newline at end of file diff --git a/apps/bfd-server/bfd-server-war/src/test/resources/endpoint-responses/v2/eobReadByPatientWithSamhsa.json b/apps/bfd-server/bfd-server-war/src/test/resources/endpoint-responses/v2/eobReadByPatientWithSamhsa.json new file mode 100644 index 0000000000..7b8efef150 --- /dev/null +++ b/apps/bfd-server/bfd-server-war/src/test/resources/endpoint-responses/v2/eobReadByPatientWithSamhsa.json @@ -0,0 +1,1371 @@ +{ + "resourceType" : "Bundle", + "id" : "IGNORED_FIELD", + "meta" : { + "lastUpdated" : "IGNORED_FIELD" + }, + "type" : "searchset", + "total" : 4462, + "link" : [ { + "relation" : "first", + "url" : "https://localhost:IGNORED_FIELD/v2/fhir/ExplanationOfBenefit?_page=6567834&startIndex=0&_count=2&patient=567834" + }, { + "relation" : "next", + "url" : "https://localhost:IGNORED_FIELD/v2/fhir/ExplanationOfBenefit?_page=6567834&startIndex=2&_count=2&patient=567834" + }, { + "relation" : "last", + "url" : "https://localhost:IGNORED_FIELD/v2/fhir/ExplanationOfBenefit?_page=6567834&startIndex=4460&_count=2&patient=567834" + }, { + "relation" : "self", + "url" : "https://localhost:IGNORED_FIELD/v2/fhir/ExplanationOfBenefit/?_count=2&_page=6567834&patient=567834" + } ], + "entry" : [ { + "resource" : { + "resourceType" : "ExplanationOfBenefit", + "id" : "pde-89", + "meta" : { + "lastUpdated" : "IGNORED_FIELD", + "profile" : [ "http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-ExplanationOfBenefit-Pharmacy" ] + }, + "identifier" : [ { + "type" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType", + "code" : "uc", + "display" : "Unique Claim ID" + } ] + }, + "system" : "https://bluebutton.cms.gov/resources/variables/pde_id", + "value" : "89" + }, { + "type" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType", + "code" : "uc", + "display" : "Unique Claim ID" + } ] + }, + "system" : "https://bluebutton.cms.gov/resources/identifier/claim-group", + "value" : "900" + }, { + "type" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType", + "code" : "uc", + "display" : "Unique Claim ID" + } ] + }, + "system" : "https://bluebutton.cms.gov/resources/variables/rx_srvc_rfrnc_num", + "value" : "799999" + } ], + "status" : "active", + "type" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/eob-type", + "code" : "PDE" + }, { + "system" : "http://terminology.hl7.org/CodeSystem/claim-type", + "code" : "pharmacy", + "display" : "Pharmacy" + } ] + }, + "use" : "claim", + "patient" : { + "reference" : "Patient/567834" + }, + "billablePeriod" : { + "start" : "2015-05-12", + "end" : "2015-05-12" + }, + "created" : "IGNORED_FIELD", + "insurer" : { + "identifier" : { + "value" : "CMS" + } + }, + "provider" : { + "identifier" : { + "system" : "https://bluebutton.cms.gov/resources/variables/prvdr_num", + "value" : "1023011079" + } + }, + "facility" : { + "extension" : [ { + "url" : "https://bluebutton.cms.gov/resources/variables/phrmcy_srvc_type_cd", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/phrmcy_srvc_type_cd", + "code" : "01", + "display" : "Community/retail pharmacy" + } + } ], + "identifier" : { + "type" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType", + "code" : "npi" + } ] + }, + "value" : "1023011079" + }, + "display" : "ADVANTAGE HOME HEALTH CARE, INC." + }, + "outcome" : "complete", + "careTeam" : [ { + "sequence" : 1, + "provider" : { + "identifier" : { + "type" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType", + "code" : "npi", + "display" : "National Provider Identifier" + } ] + }, + "value" : "1750384806" + }, + "display" : "DR. ROBERT BISBEE MD" + }, + "role" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", + "code" : "prescribing", + "display" : "Prescribing provider" + } ] + } + } ], + "supportingInfo" : [ { + "sequence" : 1, + "category" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType", + "code" : "compoundcode", + "display" : "Compound Code" + } ] + }, + "code" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v3-ActCode", + "code" : "RXDINV", + "display" : "Rx dispense invoice" + } ] + } + }, { + "sequence" : 2, + "category" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType", + "code" : "refillnum", + "display" : "Refill Number" + } ] + }, + "valueQuantity" : { + "value" : 3 + } + }, { + "sequence" : 3, + "category" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType", + "code" : "dayssupply", + "display" : "Days Supply" + } ] + }, + "valueQuantity" : { + "value" : 30 + } + }, { + "sequence" : 4, + "category" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code" : "info", + "display" : "Information" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/information", + "code" : "https://bluebutton.cms.gov/resources/variables/drug_cvrg_stus_cd", + "display" : "Drug Coverage Status Code" + } ] + }, + "code" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/drug_cvrg_stus_cd", + "code" : "C", + "display" : "Covered" + } ] + } + }, { + "sequence" : 5, + "category" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code" : "info", + "display" : "Information" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/information", + "code" : "https://bluebutton.cms.gov/resources/variables/daw_prod_slctn_cd", + "display" : "Dispense as Written (DAW) Product Selection Code" + } ] + }, + "code" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/daw_prod_slctn_cd", + "code" : "0", + "display" : "No Product Selection Indicated (may also have missing values)" + } ] + } + }, { + "sequence" : 6, + "category" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code" : "info", + "display" : "Information" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/information", + "code" : "https://bluebutton.cms.gov/resources/variables/dspnsng_stus_cd", + "display" : "Dispensing Status Code" + } ] + }, + "code" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/dspnsng_stus_cd", + "code" : "P", + "display" : "Partial fill" + } ] + } + }, { + "sequence" : 7, + "category" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code" : "info", + "display" : "Information" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/information", + "code" : "https://bluebutton.cms.gov/resources/variables/adjstmt_dltn_cd", + "display" : "Adjustment Deletion Code" + } ] + }, + "code" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/adjstmt_dltn_cd", + "code" : "A", + "display" : "Adjustment" + } ] + } + }, { + "sequence" : 8, + "category" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code" : "info", + "display" : "Information" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/information", + "code" : "https://bluebutton.cms.gov/resources/variables/nstd_frmt_cd", + "display" : "Non-Standard Format Code" + } ] + }, + "code" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/nstd_frmt_cd", + "code" : "X", + "display" : "X12 837" + } ] + } + }, { + "sequence" : 9, + "category" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code" : "info", + "display" : "Information" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/information", + "code" : "https://bluebutton.cms.gov/resources/variables/prcng_excptn_cd", + "display" : "Pricing Exception Code" + } ] + }, + "code" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/prcng_excptn_cd", + "code" : "M", + "display" : "Medicare is a secondary payer (MSP)" + } ] + } + }, { + "sequence" : 10, + "category" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code" : "info", + "display" : "Information" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/information", + "code" : "https://bluebutton.cms.gov/resources/variables/ctstrphc_cvrg_cd", + "display" : "Catastrophic Coverage Code" + } ] + }, + "code" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/ctstrphc_cvrg_cd", + "code" : "C", + "display" : "Above attachment point" + } ] + } + }, { + "sequence" : 11, + "category" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType", + "code" : "rxorigincode", + "display" : "Rx Origin Code" + } ] + }, + "code" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/rx_orgn_cd", + "code" : "3", + "display" : "Electronic" + } ] + } + }, { + "sequence" : 12, + "category" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType", + "code" : "brandgenericcode", + "display" : "Brand Generic Code" + } ] + }, + "code" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/brnd_gnrc_cd", + "code" : "G", + "display" : "Generic Null/missing" + } ] + } + }, { + "sequence" : 13, + "category" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code" : "info", + "display" : "Information" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/information", + "code" : "https://bluebutton.cms.gov/resources/variables/ptnt_rsdnc_cd", + "display" : "Patient Residence Code" + } ] + }, + "code" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/ptnt_rsdnc_cd", + "code" : "02", + "display" : "Skilled Nursing Facility" + } ] + } + }, { + "sequence" : 14, + "category" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code" : "info", + "display" : "Information" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/information", + "code" : "https://bluebutton.cms.gov/resources/variables/submsn_clr_cd", + "display" : "Submission clarification code" + } ] + }, + "code" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/submsn_clr_cd", + "code" : "08", + "display" : "Process compound for approved ingredients" + } ] + } + } ], + "insurance" : [ { + "focal" : true, + "coverage" : { + "extension" : [ { + "url" : "https://bluebutton.cms.gov/resources/variables/plan_cntrct_rec_id", + "valueIdentifier" : { + "system" : "https://bluebutton.cms.gov/resources/variables/plan_cntrct_rec_id", + "value" : "H9999" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/plan_pbp_rec_num", + "valueIdentifier" : { + "system" : "https://bluebutton.cms.gov/resources/variables/plan_pbp_rec_num", + "value" : "020" + } + } ], + "reference" : "Coverage/part-d-567834" + } + } ], + "item" : [ { + "sequence" : 1, + "careTeamSequence" : [ 1 ], + "productOrService" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/sid/ndc", + "code" : "000000000", + "display" : "Fake Diluent - WATER" + } ] + }, + "servicedDate" : "2015-05-12", + "quantity" : { + "value" : 60.0 + }, + "adjudication" : [ { + "category" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/adjudication", + "code" : "benefit", + "display" : "Benefit Amount" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/cvrd_d_plan_pd_amt", + "display" : "Amount paid by Part D plan for the PDE (drug is covered by Part D)" + } ] + }, + "amount" : { + "value" : 126.99, + "currency" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code" : "coinsurance", + "display" : "Co-insurance" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/gdc_blw_oopt_amt", + "display" : "Gross Drug Cost Below Part D Out-of-Pocket Threshold (GDCB)" + } ] + }, + "amount" : { + "value" : 995.34, + "currency" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code" : "coinsurance", + "display" : "Co-insurance" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/gdc_abv_oopt_amt", + "display" : "Gross Drug Cost Above Part D Out-of-Pocket Threshold (GDCA)" + } ] + }, + "amount" : { + "value" : 15.25, + "currency" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code" : "paidbypatient", + "display" : "Paid by patient" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/ptnt_pay_amt", + "display" : "Amount Paid by Patient" + } ] + }, + "amount" : { + "value" : 235.85, + "currency" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code" : "priorpayerpaid", + "display" : "Prior payer paid" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/othr_troop_amt", + "display" : "Other True Out-of-Pocket (TrOOP) Amount" + } ] + }, + "amount" : { + "value" : 17.3, + "currency" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code" : "discount", + "display" : "Discount" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/lics_amt", + "display" : "Amount paid for the PDE by Part D low income subsidy" + } ] + }, + "amount" : { + "value" : 122.23, + "currency" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code" : "priorpayerpaid", + "display" : "Prior payer paid" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/plro_amt", + "display" : "Reduction in patient liability due to payments by other payers (PLRO)" + } ] + }, + "amount" : { + "value" : 42.42, + "currency" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code" : "drugcost", + "display" : "Drug Cost" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/tot_rx_cst_amt", + "display" : "Total drug cost (Part D)" + } ] + }, + "amount" : { + "value" : 550.0, + "currency" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code" : "discount", + "display" : "Discount" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/rptd_gap_dscnt_num", + "display" : "Gap Discount Amount" + } ] + }, + "amount" : { + "value" : 317.22, + "currency" : "USD" + } + } ] + } ], + "total" : [ { + "category" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code" : "drugcost", + "display" : "Drug Cost" + } ] + }, + "amount" : { + "value" : 550.0, + "currency" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBPayerAdjudicationStatus", + "code" : "other", + "display" : "Other" + } ] + }, + "amount" : { + "value" : 0, + "currency" : "USD" + } + } ], + "payment" : { + "date" : "2015-05-27" + } + } + }, { + "resource" : { + "resourceType" : "ExplanationOfBenefit", + "id" : "carrier-9991831000", + "meta" : { + "lastUpdated" : "IGNORED_FIELD", + "profile" : [ "http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-ExplanationOfBenefit-Professional-NonClinician" ], + "security" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v3-ActCode", + "code" : "42CFRPart2", + "display" : "42 CFR Part 2" + }, { + "system" : "http://terminology.hl7.org/CodeSystem/v3-Confidentiality", + "code" : "R", + "display" : "Restricted" + } ] + }, + "contained" : [ { + "resourceType" : "Observation", + "id" : "line-observation-6", + "status" : "unknown", + "code" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_type_cd", + "code" : "R1", + "display" : "Hemoglobin Test" + } ] + }, + "valueQuantity" : { + "value" : 42.0 + } + } ], + "extension" : [ { + "url" : "https://bluebutton.cms.gov/resources/variables/nch_near_line_rec_ident_cd", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/nch_near_line_rec_ident_cd", + "code" : "O", + "display" : "Part B physician/supplier claim record (processed by local carriers; can include DMEPOS services)" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/carr_num", + "valueIdentifier" : { + "system" : "https://bluebutton.cms.gov/resources/variables/carr_num", + "value" : "61026" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/carr_clm_cntl_num", + "valueIdentifier" : { + "system" : "https://bluebutton.cms.gov/resources/variables/carr_clm_cntl_num", + "value" : "74655592568216" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/carr_clm_pmt_dnl_cd", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/carr_clm_pmt_dnl_cd", + "code" : "1", + "display" : "Physician/supplier" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/asgmntcd", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/asgmntcd", + "code" : "A", + "display" : "Assigned claim" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/clm_clncl_tril_num", + "valueIdentifier" : { + "system" : "https://bluebutton.cms.gov/resources/variables/clm_clncl_tril_num", + "value" : "0" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/carr_clm_entry_cd", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/carr_clm_entry_cd", + "code" : "1", + "display" : "Original debit; void of original debit (If CLM_DISP_CD = 3, code 1 means voided original debit)" + } + } ], + "identifier" : [ { + "type" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType", + "code" : "uc", + "display" : "Unique Claim ID" + } ] + }, + "system" : "https://bluebutton.cms.gov/resources/variables/clm_id", + "value" : "9991831000" + }, { + "type" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType", + "code" : "uc", + "display" : "Unique Claim ID" + } ] + }, + "system" : "https://bluebutton.cms.gov/resources/identifier/claim-group", + "value" : "900" + } ], + "status" : "active", + "type" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/nch_clm_type_cd", + "code" : "71", + "display" : "Local carrier non-durable medical equipment, prosthetics, orthotics, and supplies (DMEPOS) claim" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/eob-type", + "code" : "CARRIER" + }, { + "system" : "http://terminology.hl7.org/CodeSystem/claim-type", + "code" : "professional", + "display" : "Professional" + } ] + }, + "use" : "claim", + "patient" : { + "reference" : "Patient/567834" + }, + "billablePeriod" : { + "start" : "1999-10-27", + "end" : "1999-10-27" + }, + "created" : "IGNORED_FIELD", + "insurer" : { + "identifier" : { + "value" : "CMS" + } + }, + "provider" : { + "identifier" : { + "system" : "https://bluebutton.cms.gov/resources/variables/carr_clm_blg_npi_num", + "value" : "1234567890" + } + }, + "referral" : { + "identifier" : { + "type" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType", + "code" : "npi", + "display" : "National Provider Identifier" + } ] + }, + "value" : "8765676" + } + }, + "outcome" : "complete", + "disposition" : "1", + "careTeam" : [ { + "sequence" : 1, + "provider" : { + "identifier" : { + "type" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType", + "code" : "npi", + "display" : "National Provider Identifier" + } ] + }, + "value" : "8765676" + } + }, + "role" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", + "code" : "referring", + "display" : "Referring" + } ] + } + }, { + "sequence" : 2, + "provider" : { + "identifier" : { + "type" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType", + "code" : "npi", + "display" : "National Provider Identifier" + } ] + }, + "value" : "K25852" + } + }, + "role" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", + "code" : "referring", + "display" : "Referring" + } ] + } + }, { + "extension" : [ { + "url" : "https://bluebutton.cms.gov/resources/variables/carr_line_prvdr_type_cd", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/carr_line_prvdr_type_cd", + "code" : "0" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/prtcptng_ind_cd", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/prtcptng_ind_cd", + "code" : "1", + "display" : "Participating" + } + } ], + "sequence" : 3, + "provider" : { + "identifier" : { + "type" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType", + "code" : "npi", + "display" : "National Provider Identifier" + } ] + }, + "value" : "1923124" + } + }, + "responsible" : true, + "role" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", + "code" : "performing", + "display" : "Performing provider" + } ] + }, + "qualification" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/prvdr_spclty", + "code" : "41", + "display" : "Optometrist" + } ] + } + }, { + "sequence" : 4, + "provider" : { + "identifier" : { + "type" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType", + "code" : "npi", + "display" : "National Provider Identifier" + } ] + }, + "value" : "0000000000" + }, + "display" : "Fake ORG Name" + }, + "role" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/claimcareteamrole", + "code" : "primary", + "display" : "Primary provider" + } ] + } + } ], + "supportingInfo" : [ { + "sequence" : 1, + "category" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType", + "code" : "clmrecvddate", + "display" : "Claim Received Date" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/information", + "code" : "https://bluebutton.cms.gov/resources/variables/nch_wkly_proc_dt", + "display" : "NCH Weekly Claim Processing Date" + } ] + }, + "timingDate" : "1999-11-06" + }, { + "sequence" : 2, + "category" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code" : "info", + "display" : "Information" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/information", + "code" : "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_rslt_num", + "display" : "Hematocrit / Hemoglobin Test Results" + } ] + }, + "valueReference" : { + "reference" : "#line-observation-6" + } + } ], + "diagnosis" : [ { + "sequence" : 1, + "diagnosisCodeableConcept" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/sid/icd-9-cm", + "code" : "291" + } ] + }, + "type" : [ { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/ex-diagnosistype", + "code" : "principal", + "display" : "principal" + } ] + } ] + }, { + "sequence" : 2, + "diagnosisCodeableConcept" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/sid/icd-10-cm", + "code" : "A02", + "display" : "OTHER SALMONELLA INFECTIONS" + }, { + "system" : "http://hl7.org/fhir/sid/icd-10", + "code" : "A02", + "display" : "OTHER SALMONELLA INFECTIONS" + } ] + }, + "type" : [ { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/ex-diagnosistype", + "code" : "principal", + "display" : "principal" + } ] + } ] + }, { + "sequence" : 3, + "diagnosisCodeableConcept" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/sid/icd-9-cm", + "code" : "A05", + "display" : "\"OTH BACTERIAL FOODBORNE INTOXICATIONS, NEC\"" + } ] + }, + "type" : [ { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", + "code" : "secondary", + "display" : "Secondary" + } ] + } ] + }, { + "sequence" : 4, + "diagnosisCodeableConcept" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/sid/icd-10-cm", + "code" : "B04", + "display" : "MONKEYPOX" + }, { + "system" : "http://hl7.org/fhir/sid/icd-10", + "code" : "B04", + "display" : "MONKEYPOX" + } ] + }, + "type" : [ { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", + "code" : "secondary", + "display" : "Secondary" + } ] + } ] + }, { + "sequence" : 5, + "diagnosisCodeableConcept" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/sid/icd-10-cm", + "code" : "B05", + "display" : "MEASLES" + }, { + "system" : "http://hl7.org/fhir/sid/icd-10", + "code" : "B05", + "display" : "MEASLES" + } ] + }, + "type" : [ { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", + "code" : "secondary", + "display" : "Secondary" + } ] + } ] + }, { + "sequence" : 6, + "diagnosisCodeableConcept" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/sid/icd-10-cm", + "code" : "A52", + "display" : "LATE SYPHILIS" + }, { + "system" : "http://hl7.org/fhir/sid/icd-10", + "code" : "A52", + "display" : "LATE SYPHILIS" + } ] + }, + "type" : [ { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", + "code" : "secondary", + "display" : "Secondary" + } ] + } ] + } ], + "insurance" : [ { + "focal" : true, + "coverage" : { + "reference" : "Coverage/part-b-567834" + } + } ], + "item" : [ { + "extension" : [ { + "url" : "https://bluebutton.cms.gov/resources/variables/carr_line_mtus_cnt", + "valueQuantity" : { + "value" : 1 + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/carr_line_mtus_cnt", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/carr_line_mtus_cnt", + "code" : "3" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/carr_line_mtus_cd", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/carr_line_mtus_cd", + "code" : "3", + "display" : "Services" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/betos_cd", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/betos_cd", + "code" : "T2D", + "display" : "Other tests - other" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd", + "code" : "E", + "display" : "Workers' compensation" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "code" : "A", + "display" : "Allowed" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/line_service_deductible", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/line_service_deductible", + "code" : "0", + "display" : "Service Subject to Deductible" + } + } ], + "sequence" : 6, + "careTeamSequence" : [ 3, 4 ], + "diagnosisSequence" : [ 6 ], + "informationSequence" : [ 2 ], + "category" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/line_cms_type_srvc_cd", + "code" : "1", + "display" : "Medical care" + } ] + }, + "productOrService" : { + "extension" : [ { + "url" : "http://hl7.org/fhir/sid/ndc", + "valueCoding" : { + "system" : "http://hl7.org/fhir/sid/ndc", + "code" : "000000000", + "display" : "Fake Diluent - WATER" + } + } ], + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/hcpcs", + "code" : "92999" + } ] + }, + "modifier" : [ { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/hcpcs", + "version" : "5", + "code" : "LT" + } ] + } ], + "servicedPeriod" : { + "start" : "1999-10-27", + "end" : "1999-10-27" + }, + "locationCodeableConcept" : { + "extension" : [ { + "url" : "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "code" : "IL" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "code" : "555558202" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "code" : "15", + "display" : "CONNECTICUT" + } + }, { + "url" : "https://bluebutton.cms.gov/resources/variables/carr_line_clia_lab_num", + "valueIdentifier" : { + "system" : "https://bluebutton.cms.gov/resources/variables/carr_line_clia_lab_num", + "value" : "BB889999AA" + } + } ], + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/line_place_of_srvc_cd", + "code" : "11", + "display" : "Office. Location, other than a hospital, skilled nursing facility (SNF), military treatment facility, community health center, State or local public health clinic, or intermediate care facility (ICF), where the health professional routinely provides health examinations, diagnosis, and treatment of illness or injury on an ambulatory basis." + } ] + }, + "quantity" : { + "value" : 1.0 + }, + "adjudication" : [ { + "category" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator", + "code" : "denialreason", + "display" : "Denial Reason" + } ] + }, + "reason" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/variables/carr_line_rdcd_pmt_phys_astn_c", + "code" : "0", + "display" : "N/A" + } ] + } + }, { + "extension" : [ { + "url" : "https://bluebutton.cms.gov/resources/variables/line_pmt_80_100_cd", + "valueCoding" : { + "system" : "https://bluebutton.cms.gov/resources/variables/line_pmt_80_100_cd", + "code" : "0", + "display" : "80%" + } + } ], + "category" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/adjudication", + "code" : "benefit", + "display" : "Benefit Amount" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/line_nch_pmt_amt", + "display" : "Line NCH Medicare Payment Amount" + } ] + }, + "amount" : { + "value" : 37.5, + "currency" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code" : "paidtopatient", + "display" : "Paid to patient" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/line_bene_pmt_amt", + "display" : "Line Payment Amount to Beneficiary" + } ] + }, + "amount" : { + "value" : 0.0, + "currency" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code" : "paidtoprovider", + "display" : "Paid to provider" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/line_prvdr_pmt_amt", + "display" : "Line Provider Payment Amount" + } ] + }, + "amount" : { + "value" : 37.5, + "currency" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/adjudication", + "code" : "deductible", + "display" : "Deductible" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/line_bene_ptb_ddctbl_amt", + "display" : "Line Beneficiary Part B Deductible Amount" + } ] + }, + "amount" : { + "value" : 0.0, + "currency" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code" : "priorpayerpaid", + "display" : "Prior payer paid" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_pd_amt", + "display" : "Line Primary Payer (if not Medicare) Paid Amount" + } ] + }, + "amount" : { + "value" : 0.0, + "currency" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code" : "coinsurance", + "display" : "Co-insurance" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/line_coinsrnc_amt", + "display" : "Line Beneficiary Coinsurance Amount" + } ] + }, + "amount" : { + "value" : 9.57, + "currency" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/adjudication", + "code" : "submitted", + "display" : "Submitted Amount" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/line_sbmtd_chrg_amt", + "display" : "Line Submitted Charge Amount" + } ] + }, + "amount" : { + "value" : 75.0, + "currency" : "USD" + } + }, { + "category" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/adjudication", + "code" : "eligible", + "display" : "Eligible Amount" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/line_alowd_chrg_amt", + "display" : "Line Allowed Charge Amount" + } ] + }, + "amount" : { + "value" : 47.84, + "currency" : "USD" + } + } ] + } ], + "total" : [ { + "category" : { + "coding" : [ { + "system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code" : "priorpayerpaid", + "display" : "Prior payer paid" + }, { + "system" : "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code" : "https://bluebutton.cms.gov/resources/variables/clm_tot_chrg_amt", + "display" : "Claim Total Charge Amount" + } ] + }, + "amount" : { + "value" : 0.0, + "currency" : "USD" + } + } ], + "payment" : { + "amount" : { + "value" : 199.99, + "currency" : "USD" + } + }, + "benefitBalance" : [ { + "category" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/ex-benefitcategory", + "code" : "1", + "display" : "Medical Care" + } ] + }, + "financial" : [ { + "type" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/benefit-balance", + "code" : "https://bluebutton.cms.gov/resources/variables/carr_clm_cash_ddctbl_apld_amt", + "display" : "Carrier Claim Cash Deductible Applied Amount (sum of all line-level deductible amounts)" + } ] + }, + "usedMoney" : { + "value" : 777.0, + "currency" : "USD" + } + }, { + "type" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/benefit-balance", + "code" : "https://bluebutton.cms.gov/resources/variables/nch_clm_prvdr_pmt_amt", + "display" : "NCH Claim Provider Payment Amount" + } ] + }, + "usedMoney" : { + "value" : 123.45, + "currency" : "USD" + } + }, { + "type" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/benefit-balance", + "code" : "https://bluebutton.cms.gov/resources/variables/nch_clm_bene_pmt_amt", + "display" : "NCH Claim Payment Amount to Beneficiary" + } ] + }, + "usedMoney" : { + "value" : 888.0, + "currency" : "USD" + } + }, { + "type" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/benefit-balance", + "code" : "https://bluebutton.cms.gov/resources/variables/nch_carr_clm_sbmtd_chrg_amt", + "display" : "NCH Carrier Claim Submitted Charge Amount (sum of all line-level submitted charges)" + } ] + }, + "usedMoney" : { + "value" : 245.04, + "currency" : "USD" + } + }, { + "type" : { + "coding" : [ { + "system" : "https://bluebutton.cms.gov/resources/codesystem/benefit-balance", + "code" : "https://bluebutton.cms.gov/resources/variables/nch_carr_clm_alowd_amt", + "display" : "NCH Carrier Claim Allowed Charge Amount (sum of all line-level allowed charges)" + } ] + }, + "usedMoney" : { + "value" : 166.23, + "currency" : "USD" + } + } ] + } ] + } + } ] +} \ No newline at end of file diff --git a/apps/bfd-shared-utils/src/main/java/gov/cms/bfd/sharedutils/TagCode.java b/apps/bfd-shared-utils/src/main/java/gov/cms/bfd/sharedutils/TagCode.java index 05cfbb862e..d0a39be73e 100644 --- a/apps/bfd-shared-utils/src/main/java/gov/cms/bfd/sharedutils/TagCode.java +++ b/apps/bfd-shared-utils/src/main/java/gov/cms/bfd/sharedutils/TagCode.java @@ -1,22 +1,30 @@ package gov.cms.bfd.sharedutils; +import lombok.Getter; + /** ENUM of TAG codes. */ +@Getter public enum TagCode { /** Tag Code R. */ - R("R"), + R("R", "Restricted"), /** Tag Code 42CFRPart2. */ - _42CFRPart2("42CFRPart2"); + _42CFRPart2("42CFRPart2", "42 CFR Part 2"); /** Name of the enum in the DB. */ - private String dbName; + private final String dbName; + + /** Display name. */ + private final String displayName; /** * Constructor. * * @param dbName Sets the DB name of the enum. + * @param displayName Sets display name of the enum. */ - TagCode(String dbName) { + TagCode(String dbName, String displayName) { this.dbName = dbName; + this.displayName = displayName; } @Override