{
"resourceType": "ViewDefinition",
"name": "flat-file-eob-institutional",
"title": "Institutional Claims",
"status": "active",
"resource": "ExplanationOfBenefit",
"select": [
{
"column": [
{ "name": "resource_id", "path": "id" },
{ "name": "endpointId", "path": "meta.tag.where(system=\"https://fhir.flexpa.com/identifiers/EndpointId\").first().code" },
{ "name": "unique_claim_id", "path": "identifier.where(type.coding.code=\"uc\").first().value" },
{ "name": "patient", "path": "patient.reference" },
{ "name": "type", "path": "type.coding.first().code" },
{ "name": "subType_code", "path": "subType.first().coding.first().code" },
{ "name": "status", "path": "status" },
{ "name": "disposition", "path": "disposition" },
{ "name": "item_productOrService_system", "path": "item.productOrService.coding.first().system", "collection": true },
{ "name": "item_productOrService_code", "path": "item.productOrService.coding.first().code", "collection": true },
{ "name": "item_productOrService_display", "path": "item.productOrService.coding.first().display", "collection": true },
{ "name": "total_submitted", "path": "total.where(category.coding.code=\"submitted\").first().amount.value" },
{ "name": "total_benefit", "path": "total.where(category.coding.code=\"benefit\").first().amount.value" },
{ "name": "total_discount", "path": "adjudication.where(category.coding.code=\"discount\").first().amount.value" },
{ "name": "total_memberliability", "path": "total.where(category.coding.code=\"memberliability\").first().amount.value" },
{ "name": "total_deductible", "path": "total.where(category.coding.code=\"deductible\").first().amount.value" },
{ "name": "billablePeriod_start", "path": "billablePeriod.start" },
{ "name": "billablePeriod_end", "path": "billablePeriod.end" },
{ "name": "item_revenue_code", "path": "item.revenue.coding.first().code", "collection": true },
{ "name": "item_revenue_display", "path": "item.revenue.coding.first().display", "collection": true },
{ "name": "provider", "path": "provider.reference" },
{ "name": "careTeam_role_code", "path": "careTeam.role.coding.first().code", "collection": true },
{ "name": "careTeam_provider_reference", "path": "careTeam.provider.reference", "collection": true },
{ "name": "admissionperiod_timingPeriod", "path": "supportingInfo.where(category.coding.code=\"admissionperiod\").first().timingPeriod" },
{ "name": "clmrecvddate_timeDate", "path": "supportingInfo.where(category.coding.code=\"clmrecvddate\").first().timingDate" },
{ "name": "typeofbill_system", "path": "supportingInfo.where(category.coding.code=\"typeofbill\").first().code.coding.first().system" },
{ "name": "typeofbill_code", "path": "supportingInfo.where(category.coding.code=\"typeofbill\").first().code.coding.first().code" },
{ "name": "typeofbill_expansion", "path": "supportingInfo.where(category.coding.code=\"typeofbill\").first().code.coding.first().display" },
{ "name": "pointoforigin_system", "path": "supportingInfo.where(category.coding.code=\"pointoforigin\").first().code.coding.first().system" },
{ "name": "pointoforigin_code", "path": "supportingInfo.where(category.coding.code=\"pointoforigin\").first().code.coding.first().code" },
{ "name": "pointoforigin_display", "path": "supportingInfo.where(category.coding.code=\"pointoforigin\").first().code.coding.first().display" },
{ "name": "admtype_system", "path": "supportingInfo.where(category.coding.code=\"admtype\").first().code.coding.first().system" },
{ "name": "admtype_code", "path": "supportingInfo.where(category.coding.code=\"admtype\").first().code.coding.first().code" },
{ "name": "admtype_display", "path": "supportingInfo.where(category.coding.code=\"admtype\").first().code.coding.first().display" },
{ "name": "discharge_status_system", "path": "supportingInfo.where(category.coding.code=\"discharge-status\").first().code.coding.first().system" },
{ "name": "discharge_status_code", "path": "supportingInfo.where(category.coding.code=\"discharge-status\").first().code.coding.first().code" },
{ "name": "discharge_status_display", "path": "supportingInfo.where(category.coding.code=\"discharge-status\").first().code.coding.first().display" },
{ "name": "diagnosis_type_code", "path": "diagnosis.type.coding.first().code", "collection": true },
{ "name": "diagnosis_system", "path": "diagnosis.diagnosisCodeableConcept.coding.first().system", "collection": true },
{ "name": "diagnosis_code", "path": "diagnosis.diagnosisCodeableConcept.coding.first().code", "collection": true },
{ "name": "diagnosis_display", "path": "diagnosis.diagnosisCodeableConcept.coding.first().display", "collection": true },
{ "name": "procedure_date", "path": "procedure.date", "collection": true },
{ "name": "procedure_type_code", "path": "procedure.type.coding.first().code", "collection": true },
{ "name": "procedure_system", "path": "procedure.procedureCodeableConcept.coding.first().system", "collection": true },
{ "name": "procedure_code", "path": "procedure.procedureCodeableConcept.coding.first().code", "collection": true },
{ "name": "procedure_display", "path": "procedure.procedureCodeableConcept.coding.first().display", "collection": true },
{ "name": "payment_type_code", "path": "payment.type.coding.first().code" },
{ "name": "payment_date", "path": "payment.date" }
]
}
],
"where": [
{ "path": "type.coding.where(system='http://terminology.hl7.org/CodeSystem/claim-type').code = 'institutional'" }
]
}