diff --git a/.gitignore b/.gitignore index e848c21..77ce481 100644 --- a/.gitignore +++ b/.gitignore @@ -22,7 +22,7 @@ sandbox.env config.py config.json -.bluebutton-config.json +.bluebutton-config.json* # Generic *.pyc diff --git a/client/src/App.tsx b/client/src/App.tsx index a0640fd..c95781a 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -2,52 +2,73 @@ import React from 'react'; import Header from '../src/components/header'; import Patient from '../src/components/patient'; import PatientData from './components/patientData'; +import InsuranceCard from './components/c4dic' import Records from './components/records'; import { BrowserRouter as Router} from "react-router-dom"; import { TabPanel, Tabs } from '@cmsgov/design-system'; function App() { - return ( -
-
- - - -

Patient information

-
-
- -
-
- -
-
- {} - - {} -
-
- {} -
+ if (window.location.pathname.endsWith('card_only')) { + return ( +
+ +
+
- - +
+
+ ); + } + else { + return ( +
+ +
+

- Blue Button 2.0 is a standards-based application programming interface (API) that delivers Medicare Part A, B, and D data for over 60 million Medicare beneficiaries. Learn more about Blue Button 2.0 + Blue Button 2.0 is a standards-based application programming interface (API) that delivers Medicare Part A, B, and D data for over 60 million Medicare beneficiaries. Learn more about Blue Button 2.0

- +

- The CMS design system is a set of open source design and front-end development resources - for creating Section 508 compliant, responsive, and consistent websites. It builds on the - U.S. Web Design System and extends it to support additional CSS and React components, - utility classes, and a grid framework to allow teams to quickly prototype and build - accessible, responsive, production-ready websites. Learn more about CMS Design System + The CMS design system is a set of open source design and front-end development resources for creating Section 508 compliant, responsive, and consistent websites. It builds on the U.S. Web Design System and extends it to support additional CSS and React components, utility classes, and a grid framework to allow teams to quickly prototype and build accessible, responsive, production-ready websites. Learn more about CMS Design System

- - - -
- ); +
+ + + +
+ + + + + +
+
+ +
+
+
+ +
+
+
+
+ +
+ +
+
+ + Show in new window +
+ +
+
+
+ +
+ ); + } } export default App; diff --git a/client/src/components/c4dic.tsx b/client/src/components/c4dic.tsx new file mode 100644 index 0000000..0a8e4a3 --- /dev/null +++ b/client/src/components/c4dic.tsx @@ -0,0 +1,265 @@ +import { Table, TableCaption, TableRow, TableCell, TableHead, TableBody } from '@cmsgov/design-system'; +import React, { useEffect, useState } from 'react'; + +// From C4DIC Patient extract: +// 1. identifier mbi, e.g. 1S00EU7JH47 +// 2. name, e.g. Johnie C +// From C4DIC Coverage extract: +// 1. coverage class: by Coverage resource 'class': "Part A" +// 2. status: active or not active +// 3. period, start date: e.g. 2014-02-06 +// 4. payor: CMS +// 5. contract number: e.g. Part D , Part C: ptc_cntrct_id_01...12 +// 6. reference year: e.g. Part A: 2025, Part B: 2025, etc. +// 7. other info such as: DIB, ESRD etc. can be added as needed + +export type CoverageInfo = { + coverageClass: string, + contractId: string, + startDate: string, + endDate: string, + payer: string, + status: string, + medicaidEligibility: string, + referenceYear: string, + entitlementReason: string, + colorPalette: { + foreground: string, + background: string, + highlight: string + }, + logo: string, + addlCardInfo: string, + contacts: string[] +} + +export type InsuranceInfo = { + name: string, + identifier: string, // mbi + coverages: CoverageInfo[] // e.g. Part A, Part B, Part C, Part D +} + +export type ErrorResponse = { + type: string, + content: string, +} + +export default function InsuranceCard() { + const [insInfo, setInsInfo] = useState(); + const [message, setMessage] = useState(); + /* + * DEVELOPER NOTES: + */ + useEffect(() => { + fetch('/api/data/insurance') + .then(res => { + return res.json(); + }).then(insuranceData => { + if (insuranceData.insData) { + const coveragesList: CoverageInfo[] = insuranceData.insData?.coverages.map((c: any) => { + return { + coverageClass: c.coverageClass, + payer: c.payer, + contractId: c.contractId, + startDate: c.startDate, + endDate: c.endDate, + status: c.active, + medicaidEligibility: c.medicaidEligibility, + referenceYear: c.referenceYear, + entitlementReason: c.entitlementReason, + colorPalette: { + foreground: c.colorPalette.foreground, + background: c.colorPalette.background, + highlight: c.colorPalette.highlight + }, + logo: c.logo, + addlCardInfo: c.addlCardInfo, + contacts: c.contacts + } + }); + + setInsInfo( + { + name: insuranceData.insData.name, + identifier: insuranceData.insData.identifier, + coverages: coveragesList + } + ); + } + else { + if (insuranceData.message) { + setMessage({"type": "error", "content": insuranceData.message || "Unknown"}) + } + } + }); + }, []) + + if (message) { + return ( +
+ + Error Response + + + Type + Content + + + + + + {message.type} + + + {message.content} + + + +
+
+ ); + } else { + var backgroundColor = insInfo?.coverages[0]?.colorPalette.background + var highlightColor = insInfo?.coverages[0]?.colorPalette.highlight + var textColor = insInfo?.coverages[0]?.colorPalette.foreground + const root = document.documentElement; + if (backgroundColor != null) { + root.style.setProperty('--c4dic-backgroundColor', backgroundColor); + } + if (highlightColor != null) { + root.style.setProperty('--c4dic-highlightColor', highlightColor); + } + if (textColor != null) { + root.style.setProperty('--c4dic-textColor', textColor); + } + const medicaidEligibility = (insInfo?.coverages[0]?.medicaidEligibility != null) ? + ( +
+ Medicaid Eligibility +
+
+
{insInfo?.coverages[0]?.medicaidEligibility}
+
+
+ ) : null + return ( +
+
+ C4DIC Logo +

{insInfo?.coverages[0]?.payer}

+
+
+
+
+ Name +
+ {insInfo?.name||""} +
+
+
+
+ Medicare Number +
+ {insInfo?.identifier||""} +
+ {medicaidEligibility} +
+
+ +
+
+
Benefits
+ {insInfo?.coverages.map(c => { + const startDateDiv = (c.startDate !== null && c.startDate !== "") ? + ( +
+ Start Date +
+ {c.startDate} +
+ ) : null + switch (c.coverageClass) { + case "Part A": + return ( +
+
+ Coverage +
+ Hospital
{c.coverageClass}
+
+ {startDateDiv} +
+ Entitlement Reason +
+ {c.entitlementReason} +
+
+ ) + case "Part B": + return ( +
+
+ Coverage +
+ Medical
{c.coverageClass}
+
+ {startDateDiv} +
+ ) + case "Part C": + + return ( +
+
+ Coverage +
+ {c.coverageClass} +
+
+ Plan # +
+ {c.contractId} +
+
+ ) + case "Part D": + return ( +
+
+ Coverage +
+ Rx
{c.coverageClass}
+
+ {startDateDiv} +
+ Plan # +
+ {c.contractId} +
+
+ ) + default: + return [] + } + })} +
+
+
+
Contact
+ + Customer Service +
+
+ {insInfo?.coverages[0]?.contacts.map(contact => { + return {contact} + })} +
+
+
+
+ {insInfo?.coverages[0]?.addlCardInfo} +
+
+ ); + } +} diff --git a/client/src/components/header.tsx b/client/src/components/header.tsx index c8b50d2..76be34b 100644 --- a/client/src/components/header.tsx +++ b/client/src/components/header.tsx @@ -9,7 +9,7 @@ export default function Header() {
- Medicare Prescription Drug Claims Data + Medicare Coverage and Prescription Drug Claims Data
diff --git a/client/src/components/patient.tsx b/client/src/components/patient.tsx index 4f41099..1e91c60 100644 --- a/client/src/components/patient.tsx +++ b/client/src/components/patient.tsx @@ -11,7 +11,7 @@ export default function Patient() { return (

Clinic records

-
+
Profile avatar
  • John Doe
  • diff --git a/client/src/components/patientData.tsx b/client/src/components/patientData.tsx index 0708228..3d0fda5 100644 --- a/client/src/components/patientData.tsx +++ b/client/src/components/patientData.tsx @@ -6,7 +6,7 @@ import React, { useState } from 'react'; import * as process from 'process'; export default function PatientData() { - const [header] = useState('Add your Medicare Prescription Drug data'); + const [header] = useState('Fetch your Coverage and Medicare Prescription Drug data'); const [settingsState] = useState({ useDefaultDataButton: false, // Set to true to use hard coded data }); @@ -23,11 +23,15 @@ export default function PatientData() { window.location.href = "/"; }); console.log(authUrlResponseData); - } + } async function goLoadDefaults() { const loadDefaultsData = await axios.get(`/api/bluebutton/loadDefaults`); window.location.href = loadDefaultsData.data || '/'; - } + } + async function goLoadDefaults2() { + const loadDefaultsData = await axios.get(`/api/bluebutton/loadDefaults2`); + window.location.href = loadDefaultsData.data || '/'; + } /* DEVELOPER NOTES: * Here we are hard coding the users information for the sake of saving time @@ -36,11 +40,11 @@ export default function PatientData() { */ return (
    -

    Medicare Prescription Drug Records

    +

    Medicare Coverage and Prescription Drug Records

    Chart icon

    - John, you can now allow Springfield General Hospital access to your Medicare prescription drug records! + You can now allow Springfield General Hospital access to your Coverage and Medicare prescription drug records!

    diff --git a/client/src/styles/index.scss b/client/src/styles/index.scss index caab5ff..679f039 100644 --- a/client/src/styles/index.scss +++ b/client/src/styles/index.scss @@ -9,14 +9,254 @@ $image-path: "~@cmsgov/design-system/dist/images"; @import "@cmsgov/design-system/dist/css/core-theme"; @import "@cmsgov/design-system/dist/css/index"; +.ins-card { + border-radius: 6px; + width: 400px; + height: 250px; + margin: 0 auto; + position: relative; + transition: all .3s; + transform-style: preserve-3d; + box-shadow: 0 1px 0 #F6A440, + 0 3px 0 -1px #F6A440, + 0 4px 0 -2px #F6A440, + 0 30px 50px -10px rgba(0,0,0,.2); +} + +.ins-c4dic-card { + border-radius: 6px; + width: 480px; + margin: 0 auto; + position: relative; + transition: all .3s; + padding: 1rem; + background-color: var(--c4dic-backgroundColor); + color: var(--c4dic-textColor); + ::selection { + background: var(--c4dic-highlightColor); + } +} + +.card-number { + width: 345px; + right: 20px; + left: 20px; + top: 36%; +} + +.card-date-group { + position: absolute; + left: 20px; + bottom: 70px; +} + +.card-date { + position: relative; + font-size: 1.375rem; + width: 70px; +} + +.card-name-group { + position: absolute; + left: 20px; + bottom: 20px; +} + +.card-name { + position: relative; + width: 300px; + font-size: 1.25rem; +} + +::-webkit-input-placeholder { /* Chrome/Opera/Safari */ + color: #E4B0F3; + text-shadow: none; +} +::-moz-placeholder { /* Firefox 19+ */ + color: #E4B0F3; + text-shadow: none; +} +:-ms-input-placeholder { /* IE 10+ */ + color: #E4B0F3; + text-shadow: none; +} + +.credit-card__front, +.credit-card__back { + background-image: + radial-gradient( + circle at top center, + #D6A0E6, + #8241A9 + ); + + border-radius: 6px; + overflow: hidden; + + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + + backface-visibility: hidden; + transform:rotateY(0deg) +} + +input[type=number]::-webkit-inner-spin-button, +input[type=number]::-webkit-outer-spin-button { + -webkit-appearance: none; + margin: 0; +} + +input[type=number]::-webkit-input-placeholder { + color: #BBB; +} + .bb-c-card { background: #fff; border: 1px solid #d6d7d9; border-radius: 0.3rem; } +.bb-c-c4dic-card { + background: #fff; + border: 1px solid #d6d7d9; + border-radius: 0.3rem; + background-color: transparent; + background-size: contain; + background-repeat: no-repeat; + background-position: center; + + .field-label { + font-size: 12px; + font-style: normal; + font-weight: 300; + line-height: normal; + } + + .field-value { + font-family: var(--theme-font-family-body, "Open Sans"); + font-size: var(--theme-font-size-md, 16px); + font-style: normal; + font-weight: var(--theme-font-weight-body-md, 700); + line-height: 150%; /* 24px */ + } + + h6 { + font-family: var(--theme-font-family-body, "Open Sans"); + font-size: var(--theme-font-size-sm, 14px); + font-style: normal; + font-weight: var(--theme-font-weight-body-sm, 700); + line-height: 150%; /* 21px */ + margin: 0px + } + + hr { + border: none; + background-color: var(--c4dic-textColor); + height: 4px; + } +} + +.bb-c-c4dic-card-header { + display: grid; + grid-template-columns: 1fr 8fr; + align-items: center; + gap: 1rem; + text-wrap: pretty; +} + +.bb-c-c4dic-badge-container { + display: flex; + flex-direction: column; + align-items: center; + gap: 5px; +} + +.bb-c-c4dic-badge { + display: flex; + width: fit-content; + padding: 4px 8px; + justify-content: center; + align-items: center; + gap: 10px; + border-radius: 9999px; + border: 0.5px solid; + + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 150%; /* 21px */ +} + +.bb-c-c4dic-card-pii-area { + background-color: transparent; + position: relative; + + .patient-name { + } + + .patient-info { + display: flex; + gap: 15px; + } +} + +.bb-c-c4dic-card-coverages-area { + background-color: transparent; + position: relative; +} + +.bb-c-c4dic-coverage-a { + display: flex; + padding: 8px; + align-items: flex-start; + gap: 24px; + align-self: stretch; +} + +.bb-c-c4dic-coverage-b { + display: flex; + padding: 8px; + align-items: flex-start; + gap: 24px; + align-self: stretch; + border-top: 0.5px solid +} + +.bb-c-c4dic-coverage-c { + display: flex; + padding: 8px; + align-items: flex-start; + gap: 24px; + align-self: stretch; + border-top: 0.5px solid +} + +.bb-c-c4dic-coverage-d { + display: flex; + padding: 8px; + align-items: flex-start; + gap: 24px; + align-self: stretch; + border-top: 0.5px solid +} + +.bb-c-c4dic-card-org-contact { + .contact-list { + white-space: pre-line; + display: grid; + grid-template-columns: 1fr 1fr 1fr; + } +} + +.bb-c-c4dic-card-additional-card-info { + white-space: pre-wrap; + font-size: 8px; +} + .bb-c-card.default-card { - color: #323a45; max-width: 700px; text-decoration: none; margin: 0.5rem; @@ -24,11 +264,23 @@ $image-path: "~@cmsgov/design-system/dist/images"; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); } +.bb-c-c4dic-card.default-card { + text-decoration: none; + margin: 0.5rem; + padding: 1rem 1rem 1rem 1rem; + transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); +} + .bb-c-card.default-card:hover { box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22); color: #000; } +.bb-c-c4dic-card.default-card:hover { + box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22); + color: #000; +} + .full-width-card { max-width: 100%; padding: 1rem; diff --git a/docker-compose.yml b/docker-compose.yml index e8b1a39..ca89790 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,6 +5,8 @@ services: dockerfile: ./Dockerfile args: BUILD_DEVELOPMENT: ${BUILD_DEVELOPMENT} + environment: + HOST_IP: "192.168.0.144" command: bash -c "python -m debugpy --listen 0.0.0.0:10678 app.py" ports: - "3001:3001" diff --git a/server/Dockerfile b/server/Dockerfile index 161dc3b..0e8ac55 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -19,5 +19,10 @@ RUN if [ "$BUILD_DEVELOPMENT" = "True" ]; then \ pip install cms-bluebutton-sdk; \ fi +RUN pip install jsonpath-ng RUN pipenv lock RUN pipenv install --system --deploy --ignore-pipfile + +EXPOSE 3001 + +CMD ["sh", "-c", "python -u -m debugpy --listen 0.0.0.0:10678 app.py"] diff --git a/server/__init__.py b/server/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/server/app.py b/server/app.py index 430ffcd..68d1b83 100644 --- a/server/app.py +++ b/server/app.py @@ -2,18 +2,53 @@ import json from flask import redirect, request, Flask +from jsonpath_ng.ext import parse as ext_parse from cms_bluebutton.cms_bluebutton import BlueButton +from datetime import datetime +C4DIC_COLOR_PALETTE_EXT = "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-ColorPalette-extension" +C4DIC_COLOR_BG = "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-BackgroundColor-extension" +C4DIC_COLOR_FG = "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-ForegroundColor-extension" +C4DIC_COLOR_HI_LT = "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-HighlightColor-extension" +C4DIC_PATIENT_PROFILE = "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Patient" +C4DIC_COVERAGE_PROFILE = "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Coverage" + +C4DIC_LOGO_EXT = "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Logo-extension" +C4DIC_ADDL_CARD_INFO_EXT = "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-AdditionalCardInformation-extension" +CMS_VAR_CREC = "https://bluebutton.cms.gov/resources/variables/crec" +CMS_VAR_REF_YR = "https://bluebutton.cms.gov/resources/variables/rfrnc_yr" BENE_DENIED_ACCESS = "access_denied" FE_MSG_ACCESS_DENIED = "Beneficiary denied app access to their data" -ERR_QUERY_EOB = "Error when querying the patient's EOB!" +ERR_QUERY_DATA = "Error when querying the patient's Data: EOB or Coverage or Patient!" ERR_MISSING_AUTH_CODE = "Response was missing access code!" ERR_MISSING_STATE = "State is required when using PKCE" + +# helper trouble shoot +def print_setting(): + print(f"URL::BlueButton->base_url: {bb.base_url}", flush=True) + print(f"URL::BlueButton->auth_base_url: {bb.auth_base_url}", flush=True) + print(f"URL::BlueButton->auth_token_url: {bb.auth_token_url}", flush=True) + print(f"URL::BlueButton->callback_url: {bb.callback_url}", flush=True) + + app = Flask(__name__) bb = BlueButton() +host_ip = os.environ.get("HOST_IP") + +print_setting() + +if host_ip: + if str(bb.base_url).startswith("http://localhost"): + bb.base_url = str(bb.base_url).replace("http://localhost", f"http://{host_ip}") + if str(bb.auth_base_url).startswith("http://localhost"): + bb.auth_base_url = str(bb.auth_base_url).replace("http://localhost", f"http://{host_ip}") + if str(bb.auth_token_url).startswith("http://localhost"): + bb.auth_token_url = str(bb.auth_token_url).replace("http://localhost", f"http://{host_ip}") + print_setting() + # This is where medicare.gov beneficiary associated # with the current logged in app user, # in real app, this could be the app specific @@ -35,6 +70,7 @@ @app.route('/api/authorize/authurl', methods=['GET']) def get_auth_url(): + print_setting() redirect_url = bb.generate_authorize_url(auth_data) return redirect_url @@ -42,6 +78,7 @@ def get_auth_url(): @app.route('/api/bluebutton/callback/', methods=['GET']) def authorization_callback(): request_query = request.args + print_setting() if (request_query.get('error') == BENE_DENIED_ACCESS): # clear all cached claims eob data since the bene has denied access @@ -77,6 +114,20 @@ def authorization_callback(): try: # search eob (or other fhir resources: patient, coverage, etc.) eob_data = bb.get_explaination_of_benefit_data(config) + auth_token = eob_data['auth_token'] + coverage_data = bb.get_coverage_data(config) + auth_token = coverage_data['auth_token'] + patient_data = bb.get_patient_data(config) + auth_token = patient_data['auth_token'] + + config_clone = dict(config) + config_clone['url'] = f"{bb.base_url}/v2/fhir/Patient?_profile={C4DIC_PATIENT_PROFILE}" + dic_pt_data = bb.get_custom_data(config_clone) + auth_token = dic_pt_data['auth_token'] + + config_clone['url'] = f"{bb.base_url}/v2/fhir/Coverage?_profile={C4DIC_COVERAGE_PROFILE}" + dic_coverage_data = bb.get_custom_data(config_clone) + auth_token = dic_coverage_data['auth_token'] # fhir search response could contain large number of resources, # by default they are chunked into pages of 10 resources each, @@ -89,22 +140,49 @@ def authorization_callback(): auth_token = eob_data['auth_token'] logged_in_user['authToken'] = auth_token logged_in_user['eobData'] = eob_data['response'].json() + logged_in_user['coverageData'] = coverage_data['response'].json() + logged_in_user['patientData'] = patient_data['response'].json() + logged_in_user['dicPatientData'] = dic_pt_data['response'].json() + logged_in_user['dicCoverageData'] = dic_coverage_data['response'].json() except Exception as ex: clear_bb2_data() - logged_in_user.update({'eobData': {'message': ERR_QUERY_EOB}}) - print(ERR_QUERY_EOB) + logged_in_user.update({'eobData': {'message': ERR_QUERY_DATA}}) + print(ERR_QUERY_DATA) print(ex) return redirect(get_fe_redirect_url()) +@app.route('/api/data/benefit', methods=['GET']) +def get_patient_eob(): + """ + * this function is used directly by the front-end to + * retrieve eob data from the logged in user from within the mocked DB + * This would be replaced by a persistence service layer for whatever + * DB you would choose to use + """ + if logged_in_user and logged_in_user.get('eobData'): + return logged_in_user.get('eobData') + else: + return {} + + @app.route('/api/bluebutton/loadDefaults', methods=['GET']) def load_default_data(): - # TODO: add config var or param to detemine dataset + logged_in_user['dicPatientData'] = load_data_file("Dataset 1", "c4dicPatient") + logged_in_user['dicCoverageData'] = load_data_file("Dataset 1", "c4dicCoverage") logged_in_user['eobData'] = load_data_file("Dataset 1", "eobData") return get_fe_redirect_url() +@app.route('/api/bluebutton/loadDefaults2', methods=['GET']) +def load_default_data2(): + logged_in_user['dicPatientData'] = load_data_file("Dataset 2", "c4dicPatient") + logged_in_user['dicCoverageData'] = load_data_file("Dataset 2", "c4dicCoverage") + logged_in_user['eobData'] = load_data_file("Dataset 2", "eobData") + return get_fe_redirect_url() + + def load_data_file(dataset_name, resource_file_name): response_file = open("./default_datasets/{}/{}.json".format(dataset_name, resource_file_name), 'r') resource = json.load(response_file) @@ -112,18 +190,141 @@ def load_data_file(dataset_name, resource_file_name): return resource -@app.route('/api/data/benefit', methods=['GET']) -def get_patient_eob(): +@app.route('/api/data/insurance', methods=['GET']) +def get_patient_insurance(): """ - * this function is used directly by the front-end to - * retrieve eob data from the logged in user from within the mocked DB - * This would be replaced by a persistence service layer for whatever - * DB you would choose to use + * This function is used directly by the front-end to + * retrieve insurance data from the logged in user from within the mocked DB + * + * Insurance info of the bene is extracted from the C4DIC resources Patient, + * Coverage (fetched from the BB2 server and cached in logged_in_user), and + * sent back to FE to render a CMS insurance 'card' """ - if logged_in_user and logged_in_user.get('eobData'): - return logged_in_user.get('eobData') - else: - return {} + print_setting() + + # C4DIC patient and coverage where to extract PII and coverage plans & eligibilities + dic_patient = logged_in_user.get('dicPatientData') + dic_coverage = logged_in_user.get('dicCoverageData') + # a empty insurance response + coverages = [] + insurance = {'coverages': coverages} + # a response + resp = {'insData': insurance} + + if logged_in_user and dic_patient and dic_coverage: + # extract info from C4DIC Patient and Coverage + # and composite into insurance info and response to + # FE for insurance card rendering + # Note, Coverage could be paged, not iterate page here for POC purpose + + # From C4DIC Patient extract: + # 1. identifier mbi, e.g. 1S00EU7JH47 + # 2. name, e.g. Johnie C + # From C4DIC Coverage extract: + # 1. coverage class: by Coverage resource 'class': "Part A" + # 2. status: active or not active + # 3. period, start date: e.g. 2014-02-06 + # 4. payor: CMS + # 5. contract number: e.g. Part D , Part C: ptc_cntrct_id_01...12 + # 6. reference year: e.g. Part A: 2025, Part B: 2025, etc. + # 7. other info such as: DIB, ESRD etc. can be added as needed + pt = dic_patient['entry'] + patient = pt[0] + mbi = lookup_1_and_get("$.resource.identifier[?(@.system=='http://hl7.org/fhir/sid/us-mbi')]", "value", patient) + if len(mbi) == 11: + mbi = mbi[0:4] + '-' + mbi[4:7] + '-' + mbi[7:] + insurance['identifier'] = mbi + # TODO: handle wider variety of given/family names + pt_name = patient['resource']['name'][0]['given'][0] + " " + patient['resource']['name'][0]['family'] + insurance['name'] = pt_name + + coverage_array = dic_coverage['entry'] + + for c in coverage_array: + coverage = {} + c_resource_id = c['resource'].get('id') + c_coverageClass = lookup_1_and_get("$.resource.class[?(@.type.coding[0].code=='plan')]", "value", c) + if c_coverageClass and (c_coverageClass != "Part A" or c_coverageClass != "Part B"): + if "c4dic-part-c" in c_resource_id: + c_coverageClass = "Part C" + elif "c4dic-part-d" in c_resource_id: + c_coverageClass = "Part D" + coverage['coverageClass'] = c_coverageClass if c_coverageClass else "Null" + c_status = c['resource']['status'] + coverage['status'] = c_status + c_medicaidEligibility = "FULL" + coverage['medicaidEligibility'] = c_medicaidEligibility + c_period = c['resource'].get('period') + c_start = c_period.get('start') if c_period else "" + try: + c_start_date = datetime.strptime(c_start, '%Y-%m-%d').date() + c_start = c_start_date.strftime("%b %d, %Y") + except ValueError: + pass # Some room for improvement here, but for now, we'll just use the original value from FHIR + coverage['startDate'] = c_start if c_start else "" + c_end = c_period.get('end') if c_period else "" + coverage['endDate'] = c_end if c_end else "" + c_payer = c['resource']['payor'][0] + c_payer_org = "TO BE RESOLVED" + c_contacts = [] + if c_payer: + # BFD C4DIC Coverage response: payer is a reference to the contained Organization + ref_payer_org = c_payer['reference'] + if ref_payer_org: + ref_payer_org = ref_payer_org[1:] if ref_payer_org.startswith('#') else ref_payer_org + # can also extract more payer details, e.g. contact etc. + c_payer_org = lookup_1_and_get(f"$.resource.contained[?(@.id=='{ref_payer_org}')]", "name", c) + # contacts = lookup_by_path(f"$.resource.contained[?(@.id=='{ref_payer_org}')].contact[0].telecom", c) + contacts = lookup_1_and_get(f"$.resource.contained[?(@.id=='{ref_payer_org}')]", "contact", c) + if contacts[0]: + telecoms = contacts[0]['telecom'] + for t in telecoms: + c_contacts.append(t['value']) + + coverage['payer'] = c_payer_org + coverage['contacts'] = c_contacts + c_contract_id = "" # Part A and Part B does not have contract number + if c_coverageClass == "Part C": + c_contract_id = lookup_1_and_get("$.resource.class[?(@.type.coding[0].code=='plan')]", "value", c) + if c_coverageClass == "Part D": + c_contract_id = lookup_1_and_get("$.resource.class[?(@.type.coding[0].code=='plan')]", "value", c) + coverage['contractId'] = c_contract_id + c_reference_year = lookup_1_and_get(f"$.resource.extension[?(@.url=='{CMS_VAR_REF_YR}')]", "valueDate", c) + coverage['referenceYear'] = c_reference_year + c_entitlement_reason = lookup_1_and_get(f"$.resource.extension[?(@.url=='{CMS_VAR_CREC}')]", "valueCoding", c) + coverage['entitlementReason'] = c_entitlement_reason.get('display') + # color palettes extension + c_color_palette_ext = lookup_by_path(f"$.resource.extension[?(@.url=='{C4DIC_COLOR_PALETTE_EXT}')]", c) + if c_color_palette_ext[0]: + # another layer of extension for color codes per C4DIC profile + palette_ext = c_color_palette_ext[0].value['extension'] + for p in palette_ext: + color_code_url = p['url'] + if color_code_url == C4DIC_COLOR_BG: + c_color_palette_ext_bg = p['valueCoding']['code'] + if color_code_url == C4DIC_COLOR_FG: + c_color_palette_ext_fg = p['valueCoding']['code'] + if color_code_url == C4DIC_COLOR_HI_LT: + c_color_palette_ext_hi_lt = p['valueCoding']['code'] + # set color palette + # fg #F4FEFF Light blue + # bg #092E86 Navy + # hi lt: #3B9BFB sky blue + coverage['colorPalette'] = { + "foreground": c_color_palette_ext_fg, + "background": c_color_palette_ext_bg, + "highlight": c_color_palette_ext_hi_lt, + } + c_logo_ext = lookup_1_and_get(f"$.resource.extension[?(@.url=='{C4DIC_LOGO_EXT}')]", "valueString", c) + coverage['logo'] = c_logo_ext + c_addl_info = lookup_1_and_get(f"$.resource.extension[?(@.url=='{C4DIC_ADDL_CARD_INFO_EXT}')]", "valueAnnotation", c) + coverage['addlCardInfo'] = c_addl_info.get('text') + + coverages.append(coverage) + + insurance['coverages'] = coverages + + return resp def get_fe_redirect_url(): @@ -140,6 +341,21 @@ def clear_bb2_data(): ''' logged_in_user.update({'authToken': None}) logged_in_user.update({'eobData': {}}) + logged_in_user.update({'coverageData': {}}) + logged_in_user.update({'patientData': {}}) + logged_in_user.update({'dicPatientData': {}}) + logged_in_user.update({'dicCoverageData': {}}) + + +def lookup_by_path(expr, json_obj): + jsonpath_expr = ext_parse(expr) + return jsonpath_expr.find(json_obj) + + +def lookup_1_and_get(expr, attribute, json_obj): + r = lookup_by_path(expr, json_obj) + if r and isinstance(r, list): + return r[0].value[attribute] if __name__ == '__main__': diff --git a/server/default_datasets/Dataset 1/c4dicCoverage.json b/server/default_datasets/Dataset 1/c4dicCoverage.json new file mode 100644 index 0000000..87e17b4 --- /dev/null +++ b/server/default_datasets/Dataset 1/c4dicCoverage.json @@ -0,0 +1,1833 @@ +{ + "resourceType": "Bundle", + "id": "d0e5a190-e93a-4d27-b1e7-890561c599f4", + "meta": { + "lastUpdated": "2024-12-04T12:02:49.539+00:00" + }, + "type": "searchset", + "total": 4, + "link": [ + { + "relation": "first", + "url": "http://localhost:8000/v2/fhir/Coverage?_format=application%2Fjson%2Bfhir&startIndex=0&_count=10&beneficiary=Patient%2F-88888888888888&_profile=http%3A%2F%2Fhl7.org%2Ffhir%2Fus%2Finsurance-card%2FStructureDefinition%2FC4DIC-Coverage" + }, + { + "relation": "last", + "url": "http://localhost:8000/v2/fhir/Coverage?_format=application%2Fjson%2Bfhir&startIndex=0&_count=10&beneficiary=Patient%2F-88888888888888&_profile=http%3A%2F%2Fhl7.org%2Ffhir%2Fus%2Finsurance-card%2FStructureDefinition%2FC4DIC-Coverage" + }, + { + "relation": "self", + "url": "http://localhost:8000/v2/fhir/Coverage/?_count=10&_format=application%2Fjson%2Bfhir&_profile=http%3A%2F%2Fhl7.org%2Ffhir%2Fus%2Finsurance-card%2FStructureDefinition%2FC4DIC-Coverage&beneficiary=Patient%2F-88888888888888&startIndex=0" + } + ], + "entry": [ + { + "resource": { + "resourceType": "Coverage", + "id": "c4dic-part-a--88888888888888", + "meta": { + "lastUpdated": "2021-05-05T05:52:30.869+00:00", + "profile": [ + "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Coverage|1.1" + ] + }, + "contained": [ + { + "resourceType": "Organization", + "id": "provider-org", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Organization|1.1" + ] + }, + "active": true, + "name": "Centers for Medicare and Medicaid Services", + "contact": [ + { + "purpose": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/contactentity-type", + "code": "PAYOR", + "display": "Payor" + } + ] + }, + "telecom": [ + { + "system": "phone", + "value": "1-800-MEDICARE\n(1-800-633-4227)" + }, + { + "system": "phone", + "value": "TTY: 1-877-486-2048" + }, + { + "system": "url", + "value": "www.medicare.gov" + } + ] + } + ] + } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-ColorPalette-extension", + "extension": [ + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-ForegroundColor-extension", + "valueCoding": { + "system": "http://terminology.hl7.org/CodeSystem/IECColourManagement", + "code": "#F4FEFF" + } + }, + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-BackgroundColor-extension", + "valueCoding": { + "system": "http://terminology.hl7.org/CodeSystem/IECColourManagement", + "code": "#092E86" + } + }, + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-HighlightColor-extension", + "valueCoding": { + "system": "http://terminology.hl7.org/CodeSystem/IECColourManagement", + "code": "#335097" + } + } + ] + }, + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-AdditionalCardInformation-extension", + "valueAnnotation": { + "text": "You may be asked to show this card when you get health care services. Only give your personal Medicare information to health care providers, or people you trust who work with Medicare on your behalf. WARNING: Intentionally misusing this card may be considered fraud and/or other violation of federal law and is punishable by law.\n\nEs posible que le pidan que muestre esta tarjeta cuando reciba servicios de cuidado médico. Solamente dé su información personal de Medicare a los proveedores de salud, sus aseguradores o personas de su confianza que trabajan con Medicare en su nombre. ¡ADVERTENCIA! El mal uso intencional de esta tarjeta puede ser considerado como fraude y/u otra violación de la ley federal y es sancionada por la ley." + } + }, + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Logo-extension", + "valueString": "https://www.hhs.gov/sites/default/files/logo-white-lg.png" + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ms_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ms_cd", + "code": "10", + "display": "Aged without end-stage renal disease (ESRD)" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/orec", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/orec", + "code": "0", + "display": "Old age and survivor’s insurance (OASI)" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/crec", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/crec", + "code": "0", + "display": "Old age and survivor’s insurance (OASI)" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/esrd_ind", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/esrd_ind", + "code": "0", + "display": "the beneficiary does not have ESRD" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/a_trm_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/a_trm_cd", + "code": "0", + "display": "Not Terminated" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/rfrnc_yr", + "valueDate": "2020" + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/dual_12", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/dual_12", + "code": "AA" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin01", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin01", + "code": "C", + "display": "Part A and Part B state buy-in" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin02", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin02", + "code": "C", + "display": "Part A and Part B state buy-in" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin03", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin03", + "code": "C", + "display": "Part A and Part B state buy-in" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin04", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin04", + "code": "C", + "display": "Part A and Part B state buy-in" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin05", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin05", + "code": "C", + "display": "Part A and Part B state buy-in" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin06", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin06", + "code": "C", + "display": "Part A and Part B state buy-in" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin07", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin07", + "code": "C", + "display": "Part A and Part B state buy-in" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin08", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin08", + "code": "C", + "display": "Part A and Part B state buy-in" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin09", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin09", + "code": "C", + "display": "Part A and Part B state buy-in" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin10", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin10", + "code": "C", + "display": "Part A and Part B state buy-in" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin11", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin11", + "code": "C", + "display": "Part A and Part B state buy-in" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin12", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin12", + "code": "C", + "display": "Part A and Part B state buy-in" + } + } + ], + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "MB", + "display": "Member Number" + } + ] + }, + "system": "http://hl7.org/fhir/sid/us-mbi", + "value": "1S00ABBAA00", + "assigner": { + "reference": "#provider-org" + } + } + ], + "status": "active", + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode", + "code": "SUBSIDIZ" + } + ] + }, + "subscriber": { + "reference": "Patient/-88888888888888" + }, + "subscriberId": "1S00ABBAA00", + "beneficiary": { + "reference": "Patient/-88888888888888" + }, + "relationship": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/subscriber-relationship", + "code": "self", + "display": "Self" + } + ] + }, + "period": { + "start": "1987-09-19" + }, + "payor": [ + { + "reference": "#provider-org" + } + ], + "class": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/coverage-class", + "code": "group", + "display": "Group" + } + ] + }, + "value": "Medicare" + }, + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/coverage-class", + "code": "plan", + "display": "Plan" + } + ] + }, + "value": "Part A" + } + ] + } + }, + { + "resource": { + "resourceType": "Coverage", + "id": "c4dic-part-b--88888888888888", + "meta": { + "lastUpdated": "2021-05-05T05:52:30.869+00:00", + "profile": [ + "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Coverage|1.1" + ] + }, + "contained": [ + { + "resourceType": "Organization", + "id": "provider-org", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Organization|1.1" + ] + }, + "active": true, + "name": "Centers for Medicare and Medicaid Services", + "contact": [ + { + "purpose": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/contactentity-type", + "code": "PAYOR", + "display": "Payor" + } + ] + }, + "telecom": [ + { + "system": "phone", + "value": "1-800-MEDICARE\n(1-800-633-4227)" + }, + { + "system": "phone", + "value": "TTY: 1-877-486-2048" + }, + { + "system": "url", + "value": "www.medicare.gov" + } + ] + } + ] + } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-ColorPalette-extension", + "extension": [ + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-ForegroundColor-extension", + "valueCoding": { + "system": "http://terminology.hl7.org/CodeSystem/IECColourManagement", + "code": "#F4FEFF" + } + }, + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-BackgroundColor-extension", + "valueCoding": { + "system": "http://terminology.hl7.org/CodeSystem/IECColourManagement", + "code": "#092E86" + } + }, + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-HighlightColor-extension", + "valueCoding": { + "system": "http://terminology.hl7.org/CodeSystem/IECColourManagement", + "code": "#335097" + } + } + ] + }, + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-AdditionalCardInformation-extension", + "valueAnnotation": { + "text": "You may be asked to show this card when you get health care services. Only give your personal Medicare information to health care providers, or people you trust who work with Medicare on your behalf. WARNING: Intentionally misusing this card may be considered fraud and/or other violation of federal law and is punishable by law.\n\nEs posible que le pidan que muestre esta tarjeta cuando reciba servicios de cuidado médico. Solamente dé su información personal de Medicare a los proveedores de salud, sus aseguradores o personas de su confianza que trabajan con Medicare en su nombre. ¡ADVERTENCIA! El mal uso intencional de esta tarjeta puede ser considerado como fraude y/u otra violación de la ley federal y es sancionada por la ley." + } + }, + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Logo-extension", + "valueString": "https://www.hhs.gov/sites/default/files/logo-white-lg.png" + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ms_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ms_cd", + "code": "10", + "display": "Aged without end-stage renal disease (ESRD)" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/b_trm_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/b_trm_cd", + "code": "0", + "display": "Not Terminated" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/rfrnc_yr", + "valueDate": "2020" + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/crec", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/crec", + "code": "0", + "display": "Old age and survivor’s insurance (OASI)" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/dual_12", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/dual_12", + "code": "AA" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin01", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin01", + "code": "C", + "display": "Part A and Part B state buy-in" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin02", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin02", + "code": "C", + "display": "Part A and Part B state buy-in" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin03", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin03", + "code": "C", + "display": "Part A and Part B state buy-in" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin04", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin04", + "code": "C", + "display": "Part A and Part B state buy-in" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin05", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin05", + "code": "C", + "display": "Part A and Part B state buy-in" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin06", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin06", + "code": "C", + "display": "Part A and Part B state buy-in" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin07", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin07", + "code": "C", + "display": "Part A and Part B state buy-in" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin08", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin08", + "code": "C", + "display": "Part A and Part B state buy-in" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin09", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin09", + "code": "C", + "display": "Part A and Part B state buy-in" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin10", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin10", + "code": "C", + "display": "Part A and Part B state buy-in" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin11", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin11", + "code": "C", + "display": "Part A and Part B state buy-in" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin12", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin12", + "code": "C", + "display": "Part A and Part B state buy-in" + } + } + ], + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "MB", + "display": "Member Number" + } + ] + }, + "system": "http://hl7.org/fhir/sid/us-mbi", + "value": "1S00ABBAA00", + "assigner": { + "reference": "#provider-org" + } + } + ], + "status": "active", + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode", + "code": "SUBSIDIZ" + } + ] + }, + "subscriber": { + "reference": "Patient/-88888888888888" + }, + "subscriberId": "1S00ABBAA00", + "beneficiary": { + "reference": "Patient/-88888888888888" + }, + "relationship": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/subscriber-relationship", + "code": "self", + "display": "Self" + } + ] + }, + "period": { + "start": "1987-09-19" + }, + "payor": [ + { + "reference": "#provider-org" + } + ], + "class": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/coverage-class", + "code": "group", + "display": "Group" + } + ] + }, + "value": "Medicare" + }, + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/coverage-class", + "code": "plan", + "display": "Plan" + } + ] + }, + "value": "Part B" + } + ] + } + }, + { + "resource": { + "resourceType": "Coverage", + "id": "c4dic-part-c--88888888888888", + "meta": { + "lastUpdated": "2021-05-05T05:52:30.869+00:00", + "profile": [ + "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Coverage|1.1" + ] + }, + "contained": [ + { + "resourceType": "Organization", + "id": "provider-org", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Organization|1.1" + ] + }, + "active": true, + "name": "Centers for Medicare and Medicaid Services", + "contact": [ + { + "purpose": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/contactentity-type", + "code": "PAYOR", + "display": "Payor" + } + ] + }, + "telecom": [ + { + "system": "phone", + "value": "1-800-MEDICARE\n(1-800-633-4227)" + }, + { + "system": "phone", + "value": "TTY: 1-877-486-2048" + }, + { + "system": "url", + "value": "www.medicare.gov" + } + ] + } + ] + } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-ColorPalette-extension", + "extension": [ + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-ForegroundColor-extension", + "valueCoding": { + "system": "http://terminology.hl7.org/CodeSystem/IECColourManagement", + "code": "#F4FEFF" + } + }, + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-BackgroundColor-extension", + "valueCoding": { + "system": "http://terminology.hl7.org/CodeSystem/IECColourManagement", + "code": "#092E86" + } + }, + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-HighlightColor-extension", + "valueCoding": { + "system": "http://terminology.hl7.org/CodeSystem/IECColourManagement", + "code": "#335097" + } + } + ] + }, + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-AdditionalCardInformation-extension", + "valueAnnotation": { + "text": "You may be asked to show this card when you get health care services. Only give your personal Medicare information to health care providers, or people you trust who work with Medicare on your behalf. WARNING: Intentionally misusing this card may be considered fraud and/or other violation of federal law and is punishable by law.\n\nEs posible que le pidan que muestre esta tarjeta cuando reciba servicios de cuidado médico. Solamente dé su información personal de Medicare a los proveedores de salud, sus aseguradores o personas de su confianza que trabajan con Medicare en su nombre. ¡ADVERTENCIA! El mal uso intencional de esta tarjeta puede ser considerado como fraude y/u otra violación de la ley federal y es sancionada por la ley." + } + }, + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Logo-extension", + "valueString": "https://www.hhs.gov/sites/default/files/logo-white-lg.png" + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_cntrct_id_01", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_cntrct_id_01", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_cntrct_id_02", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_cntrct_id_02", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_cntrct_id_03", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_cntrct_id_03", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_cntrct_id_04", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_cntrct_id_04", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_cntrct_id_05", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_cntrct_id_05", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_cntrct_id_06", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_cntrct_id_06", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_cntrct_id_07", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_cntrct_id_07", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_cntrct_id_08", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_cntrct_id_08", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_cntrct_id_09", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_cntrct_id_09", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_cntrct_id_10", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_cntrct_id_10", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_cntrct_id_11", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_cntrct_id_11", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_cntrct_id_12", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_cntrct_id_12", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_pbp_id_01", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_pbp_id_01", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_pbp_id_02", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_pbp_id_02", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_pbp_id_03", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_pbp_id_03", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_pbp_id_04", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_pbp_id_04", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_pbp_id_05", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_pbp_id_05", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_pbp_id_06", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_pbp_id_06", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_pbp_id_07", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_pbp_id_07", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_pbp_id_08", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_pbp_id_08", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_pbp_id_09", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_pbp_id_09", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_pbp_id_10", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_pbp_id_10", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_pbp_id_11", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_pbp_id_11", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_pbp_id_12", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_pbp_id_12", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_plan_type_cd_01", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_plan_type_cd_01", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_plan_type_cd_02", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_plan_type_cd_02", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_plan_type_cd_03", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_plan_type_cd_03", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_plan_type_cd_04", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_plan_type_cd_04", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_plan_type_cd_05", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_plan_type_cd_05", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_plan_type_cd_06", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_plan_type_cd_06", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_plan_type_cd_07", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_plan_type_cd_07", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_plan_type_cd_08", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_plan_type_cd_08", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_plan_type_cd_09", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_plan_type_cd_09", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_plan_type_cd_10", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_plan_type_cd_10", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_plan_type_cd_11", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_plan_type_cd_11", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptc_plan_type_cd_12", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptc_plan_type_cd_12", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/hmo_ind_01", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/hmo_ind_01", + "code": "D" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/hmo_ind_02", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/hmo_ind_02", + "code": "D" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/hmo_ind_03", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/hmo_ind_03", + "code": "D" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/hmo_ind_04", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/hmo_ind_04", + "code": "D" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/hmo_ind_05", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/hmo_ind_05", + "code": "D" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/hmo_ind_06", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/hmo_ind_06", + "code": "D" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/hmo_ind_07", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/hmo_ind_07", + "code": "D" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/hmo_ind_08", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/hmo_ind_08", + "code": "D" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/hmo_ind_09", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/hmo_ind_09", + "code": "D" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/hmo_ind_10", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/hmo_ind_10", + "code": "D" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/hmo_ind_11", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/hmo_ind_11", + "code": "D" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/hmo_ind_12", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/hmo_ind_12", + "code": "D" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/rfrnc_yr", + "valueDate": "2020" + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/dual_12", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/dual_12", + "code": "AA" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/crec", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/crec", + "code": "0", + "display": "Old age and survivor’s insurance (OASI)" + } + } + ], + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "MB", + "display": "Member Number" + } + ] + }, + "system": "http://hl7.org/fhir/sid/us-mbi", + "value": "1S00ABBAA00", + "assigner": { + "reference": "#provider-org" + } + } + ], + "status": "active", + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode", + "code": "SUBSIDIZ" + } + ] + }, + "subscriber": { + "reference": "Patient/-88888888888888" + }, + "subscriberId": "1S00ABBAA00", + "beneficiary": { + "reference": "Patient/-88888888888888" + }, + "relationship": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/subscriber-relationship", + "code": "self", + "display": "Self" + } + ] + }, + "period": { + "start": "1987-09-19" + }, + "payor": [ + { + "reference": "#provider-org" + } + ], + "class": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/coverage-class", + "code": "plan", + "display": "Plan" + } + ] + }, + "value": "C-C" + } + ] + } + }, + { + "resource": { + "resourceType": "Coverage", + "id": "c4dic-part-d--88888888888888", + "meta": { + "lastUpdated": "2021-05-05T05:52:30.869+00:00", + "profile": [ + "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Coverage|1.1" + ] + }, + "contained": [ + { + "resourceType": "Organization", + "id": "provider-org", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Organization|1.1" + ] + }, + "active": true, + "name": "Centers for Medicare and Medicaid Services", + "contact": [ + { + "purpose": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/contactentity-type", + "code": "PAYOR", + "display": "Payor" + } + ] + }, + "telecom": [ + { + "system": "phone", + "value": "1-800-MEDICARE\n(1-800-633-4227)" + }, + { + "system": "phone", + "value": "TTY: 1-877-486-2048" + }, + { + "system": "url", + "value": "www.medicare.gov" + } + ] + } + ] + } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-ColorPalette-extension", + "extension": [ + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-ForegroundColor-extension", + "valueCoding": { + "system": "http://terminology.hl7.org/CodeSystem/IECColourManagement", + "code": "#F4FEFF" + } + }, + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-BackgroundColor-extension", + "valueCoding": { + "system": "http://terminology.hl7.org/CodeSystem/IECColourManagement", + "code": "#092E86" + } + }, + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-HighlightColor-extension", + "valueCoding": { + "system": "http://terminology.hl7.org/CodeSystem/IECColourManagement", + "code": "#335097" + } + } + ] + }, + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-AdditionalCardInformation-extension", + "valueAnnotation": { + "text": "You may be asked to show this card when you get health care services. Only give your personal Medicare information to health care providers, or people you trust who work with Medicare on your behalf. WARNING: Intentionally misusing this card may be considered fraud and/or other violation of federal law and is punishable by law.\n\nEs posible que le pidan que muestre esta tarjeta cuando reciba servicios de cuidado médico. Solamente dé su información personal de Medicare a los proveedores de salud, sus aseguradores o personas de su confianza que trabajan con Medicare en su nombre. ¡ADVERTENCIA! El mal uso intencional de esta tarjeta puede ser considerado como fraude y/u otra violación de la ley federal y es sancionada por la ley." + } + }, + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Logo-extension", + "valueString": "https://www.hhs.gov/sites/default/files/logo-white-lg.png" + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ms_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ms_cd", + "code": "10", + "display": "Aged without end-stage renal disease (ESRD)" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdcntrct01", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdcntrct01", + "code": "Z0000" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdcntrct02", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdcntrct02", + "code": "Z0000" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdcntrct03", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdcntrct03", + "code": "Z0000" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdcntrct04", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdcntrct04", + "code": "Z0000" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdcntrct05", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdcntrct05", + "code": "Z0000" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdcntrct06", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdcntrct06", + "code": "Z0000" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdcntrct07", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdcntrct07", + "code": "Z0000" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdcntrct08", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdcntrct08", + "code": "Z0000" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdcntrct09", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdcntrct09", + "code": "Z0000" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdcntrct10", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdcntrct10", + "code": "Z0000" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdcntrct11", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdcntrct11", + "code": "Z0000" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdcntrct12", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdcntrct12", + "code": "Z0000" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdcntrct01/2020-1", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdcntrct01", + "code": "Z0000" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdcntrct02/2020-2", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdcntrct02", + "code": "Z0000" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdcntrct03/2020-3", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdcntrct03", + "code": "Z0000" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdcntrct04/2020-4", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdcntrct04", + "code": "Z0000" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdcntrct05/2020-5", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdcntrct05", + "code": "Z0000" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdcntrct06/2020-6", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdcntrct06", + "code": "Z0000" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdcntrct07/2020-7", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdcntrct07", + "code": "Z0000" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdcntrct08/2020-8", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdcntrct08", + "code": "Z0000" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdcntrct09/2020-9", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdcntrct09", + "code": "Z0000" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdcntrct10/2020-10", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdcntrct10", + "code": "Z0000" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdcntrct11/2020-11", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdcntrct11", + "code": "Z0000" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdcntrct12/2020-12", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdcntrct12", + "code": "Z0000" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdpbpid01", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdpbpid01", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdpbpid02", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdpbpid02", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdpbpid03", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdpbpid03", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdpbpid04", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdpbpid04", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdpbpid05", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdpbpid05", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdpbpid06", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdpbpid06", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdpbpid07", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdpbpid07", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdpbpid08", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdpbpid08", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdpbpid09", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdpbpid09", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdpbpid10", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdpbpid10", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdpbpid11", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdpbpid11", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ptdpbpid12", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ptdpbpid12", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/sgmtid01", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/sgmtid01", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/sgmtid02", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/sgmtid02", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/sgmtid03", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/sgmtid03", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/sgmtid04", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/sgmtid04", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/sgmtid05", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/sgmtid05", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/sgmtid06", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/sgmtid06", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/sgmtid07", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/sgmtid07", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/sgmtid08", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/sgmtid08", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/sgmtid09", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/sgmtid09", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/sgmtid10", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/sgmtid10", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/sgmtid11", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/sgmtid11", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/sgmtid12", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/sgmtid12", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/cstshr01", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/cstshr01", + "code": "AA" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/cstshr02", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/cstshr02", + "code": "AA" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/cstshr03", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/cstshr03", + "code": "AA" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/cstshr04", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/cstshr04", + "code": "AA" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/cstshr05", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/cstshr05", + "code": "AA" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/cstshr06", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/cstshr06", + "code": "AA" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/cstshr07", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/cstshr07", + "code": "AA" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/cstshr08", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/cstshr08", + "code": "AA" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/cstshr09", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/cstshr09", + "code": "AA" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/cstshr10", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/cstshr10", + "code": "AA" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/cstshr11", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/cstshr11", + "code": "AA" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/cstshr12", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/cstshr12", + "code": "BB" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/rdsind01", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/rdsind01", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/rdsind02", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/rdsind02", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/rdsind03", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/rdsind03", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/rdsind04", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/rdsind04", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/rdsind05", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/rdsind05", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/rdsind06", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/rdsind06", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/rdsind07", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/rdsind07", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/rdsind08", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/rdsind08", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/rdsind09", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/rdsind09", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/rdsind10", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/rdsind10", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/rdsind11", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/rdsind11", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/rdsind12", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/rdsind12", + "code": "C" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/rfrnc_yr", + "valueDate": "2020" + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/dual_12", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/dual_12", + "code": "AA" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/crec", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/crec", + "code": "0", + "display": "Old age and survivor’s insurance (OASI)" + } + } + ], + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "MB", + "display": "Member Number" + } + ] + }, + "system": "http://hl7.org/fhir/sid/us-mbi", + "value": "1S00ABBAA00", + "assigner": { + "reference": "#provider-org" + } + } + ], + "status": "active", + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode", + "code": "SUBSIDIZ" + } + ] + }, + "subscriber": { + "reference": "Patient/-88888888888888" + }, + "subscriberId": "1S00ABBAA00", + "beneficiary": { + "reference": "Patient/-88888888888888" + }, + "relationship": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/subscriber-relationship", + "code": "self", + "display": "Self" + } + ] + }, + "period": { + "start": "1987-09-19" + }, + "payor": [ + { + "reference": "#provider-org" + } + ], + "class": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/coverage-class", + "code": "plan", + "display": "Plan" + } + ] + }, + "value": "Z0000-C" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/server/default_datasets/Dataset 1/c4dicPatient.json b/server/default_datasets/Dataset 1/c4dicPatient.json new file mode 100644 index 0000000..c15908e --- /dev/null +++ b/server/default_datasets/Dataset 1/c4dicPatient.json @@ -0,0 +1,149 @@ +{ + "resourceType": "Bundle", + "id": "51dfb956-aef7-4b2c-bc54-7f63286433b5", + "meta": { + "lastUpdated": "2024-11-27T07:02:46.387-05:00" + }, + "type": "searchset", + "total": 1, + "link": [ + { + "relation": "first", + "url": "https://test.bluebutton.cms.gov/v2/fhir/Patient?_format=application%2Fjson%2Bfhir&startIndex=0&_count=10&_id=-10000010254647" + }, + { + "relation": "last", + "url": "https://test.bluebutton.cms.gov/v2/fhir/Patient?_format=application%2Fjson%2Bfhir&startIndex=0&_count=10&_id=-10000010254647" + }, + { + "relation": "self", + "url": "https://test.bluebutton.cms.gov/v2/fhir/Patient/?_count=10&_format=application%2Fjson%2Bfhir&_id=-10000010254647&startIndex=0" + } + ], + "entry": [ + { + "resource": { + "resourceType": "Patient", + "id": "-10000010254647", + "meta": { + "lastUpdated": "2023-06-14T14:17:07.293-04:00", + "profile": [ + "http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-Patient" + ] + }, + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/race", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/race", + "code": "2", + "display": "Black" + } + }, + { + "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", + "extension": [ + { + "url": "ombCategory", + "valueCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", + "code": "UNK", + "display": "Unknown" + } + }, + { + "url": "text", + "valueString": "Unknown" + } + ] + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/rfrnc_yr", + "valueDate": "2025" + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/dual_01", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/dual_01", + "code": "02", + "display": "QMB and full Medicaid coverage, including prescription drugs" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/dual_02", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/dual_02", + "code": "02", + "display": "QMB and full Medicaid coverage, including prescription drugs" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/dual_03", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/dual_03", + "code": "02", + "display": "QMB and full Medicaid coverage, including prescription drugs" + } + } + ], + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "MB", + "display": "Member Number" + } + ] + }, + "system": "https://bluebutton.cms.gov/resources/variables/bene_id", + "value": "-10000010254647" + }, + { + "type": { + "coding": [ + { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/codesystem/identifier-currency", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/codesystem/identifier-currency", + "code": "current", + "display": "Current" + } + } + ], + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "MC", + "display": "Patient's Medicare number" + } + ] + }, + "system": "http://hl7.org/fhir/sid/us-mbi", + "value": "1S00EU7JH47" + } + ], + "name": [ + { + "use": "usual", + "family": "Ratke343", + "given": [ + "Johnie961", + "C" + ] + } + ], + "gender": "male", + "birthDate": "1990-08-14", + "deceasedBoolean": false, + "address": [ + { + "state": "01", + "postalCode": "35756" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/server/default_datasets/Dataset 2/c4dicCoverage.json b/server/default_datasets/Dataset 2/c4dicCoverage.json new file mode 100644 index 0000000..aa75002 --- /dev/null +++ b/server/default_datasets/Dataset 2/c4dicCoverage.json @@ -0,0 +1,479 @@ +{ + "resourceType": "Bundle", + "id": "89bfef9d-1603-48fb-945d-72a6b3fee76c", + "meta": { + "lastUpdated": "2024-12-11T12:01:20.563+00:00" + }, + "type": "searchset", + "total": 2, + "link": [ + { + "relation": "first", + "url": "http://localhost:8000/v2/fhir/Coverage?_format=application%2Fjson%2Bfhir&startIndex=0&_count=10&beneficiary=Patient%2F-10000010263999&_profile=http%3A%2F%2Fhl7.org%2Ffhir%2Fus%2Finsurance-card%2FStructureDefinition%2FC4DIC-Coverage" + }, + { + "relation": "last", + "url": "http://localhost:8000/v2/fhir/Coverage?_format=application%2Fjson%2Bfhir&startIndex=0&_count=10&beneficiary=Patient%2F-10000010263999&_profile=http%3A%2F%2Fhl7.org%2Ffhir%2Fus%2Finsurance-card%2FStructureDefinition%2FC4DIC-Coverage" + }, + { + "relation": "self", + "url": "http://localhost:8000/v2/fhir/Coverage/?_count=10&_format=application%2Fjson%2Bfhir&_profile=http%3A%2F%2Fhl7.org%2Ffhir%2Fus%2Finsurance-card%2FStructureDefinition%2FC4DIC-Coverage&beneficiary=Patient%2F-10000010263999&startIndex=0" + } + ], + "entry": [ + { + "resource": { + "resourceType": "Coverage", + "id": "c4dic-part-a--10000010263999", + "meta": { + "lastUpdated": "2023-03-03T20:37:56.945+00:00", + "profile": [ + "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Coverage|1.1" + ] + }, + "contained": [ + { + "resourceType": "Organization", + "id": "provider-org", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Organization|1.1" + ] + }, + "active": true, + "name": "Centers for Medicare and Medicaid Services", + "contact": [ + { + "purpose": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/contactentity-type", + "code": "PAYOR", + "display": "Payor" + } + ] + }, + "telecom": [ + { + "system": "phone", + "value": "1-800-MEDICARE\n(1-800-633-4227)" + }, + { + "system": "phone", + "value": "TTY: 1-877-486-2048" + }, + { + "system": "url", + "value": "www.medicare.gov" + } + ] + } + ] + } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-ColorPalette-extension", + "extension": [ + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-ForegroundColor-extension", + "valueCoding": { + "system": "http://terminology.hl7.org/CodeSystem/IECColourManagement", + "code": "#F4FEFF" + } + }, + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-BackgroundColor-extension", + "valueCoding": { + "system": "http://terminology.hl7.org/CodeSystem/IECColourManagement", + "code": "#092E86" + } + }, + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-HighlightColor-extension", + "valueCoding": { + "system": "http://terminology.hl7.org/CodeSystem/IECColourManagement", + "code": "#335097" + } + } + ] + }, + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-AdditionalCardInformation-extension", + "valueAnnotation": { + "text": "You may be asked to show this card when you get health care services. Only give your personal Medicare information to health care providers, or people you trust who work with Medicare on your behalf. WARNING: Intentionally misusing this card may be considered fraud and/or other violation of federal law and is punishable by law.\n\nEs posible que le pidan que muestre esta tarjeta cuando reciba servicios de cuidado médico. Solamente dé su información personal de Medicare a los proveedores de salud, sus aseguradores o personas de su confianza que trabajan con Medicare en su nombre. ¡ADVERTENCIA! El mal uso intencional de esta tarjeta puede ser considerado como fraude y/u otra violación de la ley federal y es sancionada por la ley." + } + }, + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Logo-extension", + "valueString": "https://www.hhs.gov/sites/default/files/logo-white-lg.png" + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ms_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ms_cd", + "code": "10", + "display": "Aged without end-stage renal disease (ESRD)" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/orec", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/orec", + "code": "1", + "display": "Disability insurance benefits (DIB)" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/crec", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/crec", + "code": "0", + "display": "Old age and survivor’s insurance (OASI)" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/esrd_ind", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/esrd_ind", + "code": "0", + "display": "the beneficiary does not have ESRD" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/a_trm_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/a_trm_cd", + "code": "0", + "display": "Not Terminated" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/rfrnc_yr", + "valueDate": "2025" + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin01", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin01", + "code": "3", + "display": "Part A and Part B" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin02", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin02", + "code": "3", + "display": "Part A and Part B" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin03", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin03", + "code": "3", + "display": "Part A and Part B" + } + } + ], + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "MB", + "display": "Member Number" + } + ] + }, + "system": "http://hl7.org/fhir/sid/us-mbi", + "value": "1S00EU7PY99", + "assigner": { + "reference": "#provider-org" + } + } + ], + "status": "active", + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode", + "code": "SUBSIDIZ" + } + ] + }, + "subscriber": { + "reference": "Patient/-10000010263999" + }, + "subscriberId": "1S00EU7PY99", + "beneficiary": { + "reference": "Patient/-10000010263999" + }, + "relationship": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/subscriber-relationship", + "code": "self", + "display": "Self" + } + ] + }, + "period": { + "start": "1987-09-19" + }, + "payor": [ + { + "reference": "#provider-org" + } + ], + "class": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/coverage-class", + "code": "group", + "display": "Group" + } + ] + }, + "value": "Medicare" + }, + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/coverage-class", + "code": "plan", + "display": "Plan" + } + ] + }, + "value": "Part A" + } + ] + } + }, + { + "resource": { + "resourceType": "Coverage", + "id": "c4dic-part-b--10000010263999", + "meta": { + "lastUpdated": "2023-03-03T20:37:56.945+00:00", + "profile": [ + "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Coverage|1.1" + ] + }, + "contained": [ + { + "resourceType": "Organization", + "id": "provider-org", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Organization|1.1" + ] + }, + "active": true, + "name": "Centers for Medicare and Medicaid Services", + "contact": [ + { + "purpose": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/contactentity-type", + "code": "PAYOR", + "display": "Payor" + } + ] + }, + "telecom": [ + { + "system": "phone", + "value": "1-800-MEDICARE\n(1-800-633-4227)" + }, + { + "system": "phone", + "value": "TTY: 1-877-486-2048" + }, + { + "system": "url", + "value": "www.medicare.gov" + } + ] + } + ] + } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-ColorPalette-extension", + "extension": [ + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-ForegroundColor-extension", + "valueCoding": { + "system": "http://terminology.hl7.org/CodeSystem/IECColourManagement", + "code": "#F4FEFF" + } + }, + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-BackgroundColor-extension", + "valueCoding": { + "system": "http://terminology.hl7.org/CodeSystem/IECColourManagement", + "code": "#092E86" + } + }, + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-HighlightColor-extension", + "valueCoding": { + "system": "http://terminology.hl7.org/CodeSystem/IECColourManagement", + "code": "#335097" + } + } + ] + }, + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-AdditionalCardInformation-extension", + "valueAnnotation": { + "text": "You may be asked to show this card when you get health care services. Only give your personal Medicare information to health care providers, or people you trust who work with Medicare on your behalf. WARNING: Intentionally misusing this card may be considered fraud and/or other violation of federal law and is punishable by law.\n\nEs posible que le pidan que muestre esta tarjeta cuando reciba servicios de cuidado médico. Solamente dé su información personal de Medicare a los proveedores de salud, sus aseguradores o personas de su confianza que trabajan con Medicare en su nombre. ¡ADVERTENCIA! El mal uso intencional de esta tarjeta puede ser considerado como fraude y/u otra violación de la ley federal y es sancionada por la ley." + } + }, + { + "url": "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Logo-extension", + "valueString": "https://www.hhs.gov/sites/default/files/logo-white-lg.png" + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/ms_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/ms_cd", + "code": "10", + "display": "Aged without end-stage renal disease (ESRD)" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/b_trm_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/b_trm_cd", + "code": "0", + "display": "Not Terminated" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/rfrnc_yr", + "valueDate": "2025" + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/crec", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/crec", + "code": "0", + "display": "Old age and survivor’s insurance (OASI)" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin01", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin01", + "code": "3", + "display": "Part A and Part B" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin02", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin02", + "code": "3", + "display": "Part A and Part B" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/buyin03", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/buyin03", + "code": "3", + "display": "Part A and Part B" + } + } + ], + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "MB", + "display": "Member Number" + } + ] + }, + "system": "http://hl7.org/fhir/sid/us-mbi", + "value": "1S00EU7PY99", + "assigner": { + "reference": "#provider-org" + } + } + ], + "status": "active", + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode", + "code": "SUBSIDIZ" + } + ] + }, + "subscriber": { + "reference": "Patient/-10000010263999" + }, + "subscriberId": "1S00EU7PY99", + "beneficiary": { + "reference": "Patient/-10000010263999" + }, + "relationship": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/subscriber-relationship", + "code": "self", + "display": "Self" + } + ] + }, + "period": { + "start": "1987-09-19" + }, + "payor": [ + { + "reference": "#provider-org" + } + ], + "class": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/coverage-class", + "code": "group", + "display": "Group" + } + ] + }, + "value": "Medicare" + }, + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/coverage-class", + "code": "plan", + "display": "Plan" + } + ] + }, + "value": "Part B" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/server/default_datasets/Dataset 2/c4dicPatient.json b/server/default_datasets/Dataset 2/c4dicPatient.json new file mode 100644 index 0000000..fd0a264 --- /dev/null +++ b/server/default_datasets/Dataset 2/c4dicPatient.json @@ -0,0 +1,150 @@ +{ + "resourceType": "Bundle", + "id": "1607f9e4-bb6b-4138-b133-7b7d7a8d58a1", + "meta": { + "lastUpdated": "2024-12-11T12:01:20.563+00:00" + }, + "type": "searchset", + "total": 1, + "link": [ + { + "relation": "first", + "url": "http://localhost:8000/v2/fhir/Patient?_format=application%2Fjson%2Bfhir&startIndex=0&_count=10&_id=-10000010263999" + }, + { + "relation": "last", + "url": "http://localhost:8000/v2/fhir/Patient?_format=application%2Fjson%2Bfhir&startIndex=0&_count=10&_id=-10000010263999" + }, + { + "relation": "self", + "url": "http://localhost:8000/v2/fhir/Patient/?_count=10&_format=application%2Fjson%2Bfhir&_id=-10000010263999&startIndex=0" + } + ], + "entry": [ + { + "resource": { + "resourceType": "Patient", + "id": "-10000010263999", + "meta": { + "lastUpdated": "2023-03-03T20:37:56.945+00:00", + "profile": [ + "http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-Patient", + "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Patient|1.1" + ] + }, + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/race", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/race", + "code": "1", + "display": "White" + } + }, + { + "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", + "extension": [ + { + "url": "ombCategory", + "valueCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", + "code": "UNK", + "display": "Unknown" + } + }, + { + "url": "text", + "valueString": "Unknown" + } + ] + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/rfrnc_yr", + "valueDate": "2025" + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/dual_01", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/dual_01", + "code": "NA", + "display": "Non-Medicaid" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/dual_02", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/dual_02", + "code": "NA", + "display": "Non-Medicaid" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/dual_03", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/dual_03", + "code": "NA", + "display": "Non-Medicaid" + } + } + ], + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "MB", + "display": "Member Number" + } + ] + }, + "system": "https://bluebutton.cms.gov/resources/variables/bene_id", + "value": "-10000010263999" + }, + { + "type": { + "coding": [ + { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/codesystem/identifier-currency", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/codesystem/identifier-currency", + "code": "current", + "display": "Current" + } + } + ], + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "MC", + "display": "Patient's Medicare number" + } + ] + }, + "system": "http://hl7.org/fhir/sid/us-mbi", + "value": "1S00EU7PY99" + } + ], + "name": [ + { + "use": "usual", + "family": "Dickinson688", + "given": [ + "Sylvie540", + "M" + ] + } + ], + "gender": "female", + "birthDate": "1953-09-27", + "deceasedBoolean": false, + "address": [ + { + "state": "18", + "postalCode": "40218" + } + ] + } + } + ] +} \ No newline at end of file