Data Summarization (Lens)
Not only is clinical data messy, it is also often duplicated and not tailored to the questions a clinician needs to answer. Zus Lenses offer a summarized view of clinical data that are most relevant to a patient’s care team.
What is a Lens?
A Zus Lens is a set of FHIR resources derived from a patient’s raw resources that have been structurally normalized, de-duplicated, summarized, and tagged. Alongside Zus Data Enrichment, a Lens helps you extract signal quickly from raw data with just one API call.
Deduplication: Clinical data are aligned based on their appropriate Zus-enriched codings and a single resource is written per unique data type based on the patient’s history.
Structural Normalization: Zus helps reduce noisy data by normalizing clinical data into single FHIR resources representing unique data or events.
Medications
Medication data comes from four different FHIR resources: MedicationStatement, MedicationRequest, MedicationDispense, and MedicationAdministration. Zus aligns these various resources together based on their Zus-enriched codings and writes a single MedicationStatement per unique medication based on the Patient’s history.
Episodes of Care
Data from Admissions, Discharges, and Transfers (ADT) is transformed into Encounter resources. In addition, Zus gets ADT data from Continuity of Care Documents (CCDs) that can provide contextual information such as notes, administered medications, and completed procedures, among others. Zus creates a single unique EpisodeofCare for each unique hospitalization based on these data.
Summarization: Zus summarizes the history for each data type in a single resource, so you have one source for answering questions such as: “what was the last activity for this medication?” or “what is the current status?” Additionally, you may just want to present what is currently applicable and active for the patient today. Lenses help with both of these scenarios and you can access them simply by specifying the related tag of the Lens you want (see below).
Lens resources are created after Zus enriches newly created resources and are rewritten every time a new relevant resource is created with no work or intervention needed by you.
How Are Lenses Represented?
Zus-Derived Lens Resources
Lens resources are aggregated, summarized versions of Builder-generated and third party resources in the Zus Aggregated Profile (ZAP). You can identify a Lens resource by the presence of a “Lens Tag,” which is a meta tag generated by Zus.
Lens Tag example:
"meta": {
"tag": [
{
"system": "https://zusapi.com/lens",
"code": "ActiveMedications"
}
]
}
Lens Permissions
Builder users and app clients are NOT permitted to create, modify, or delete Lens resources. Any attempt to do so will result in a 403 error.
Medication Lenses
Summary Lens
The medication resources for a patient (i.e., MedicationStatement, MedicationRequest, MedicationDispense, and MedicationAdministration), are aligned and de-duplicated by common RxNorm (or their available CodeSystem if mapping to RxNorm was not possible). Zus then writes new Lens MedicationStatement resources with a specific tag for easy identification:
"meta": {
"tag": [
{
"system": "https://zusapi.com/summary",
"code": "Common"
}
]
}
You can query for a patient's Medication Summary Lens resources by filtering on the tag, as shown below:
{{fhir_url}}/MedicationStatement?_tag=https://zusapi.com/summary|Common&patient.identifier=https://zusapi.com/fhir/identifier/universal-id|{{universal_patient_id}}
Zus determines the value for each field in the summarized resource primarily based on the value on the raw resource with the latest real-world event date. This latest real-world event date is then used to populate the DateAsserted field of the summarized resource. The derivedFrom property on the Summary Lens resource references the resources the Summary Lens was compiled from. The status field is set to active for any Summary Lens that has activity within the last 180 days or 365 days into the future, and where the latest status among the raw resources is not one of: completed, entered-in-error, stopped, or not-taken.
Active Medication Lens
Active Medication Lenses are a subset of Summary Lenses that have a status of Active. The status is set to active for any Summary Lens that has activity within the last 180 days or 365 days into the future, and where the latest status among the raw resources is not completed, entered-in-error, stopped, or not-taken. This Lens helps answer the question: “What medications is this patient most likely on currently?”
Active Medication Lenses have the following tag:
"meta": {
"tag": [
{
"system": "https://zusapi.com/lens",
"code": "ActiveMedications"
}
]
}
Because Active Medication Lens resources are a subset of Summary Lenses, they also contain the summary tag.
You can query for a patient's Active Medication Lens resources by filtering on the tag, as shown below:
{{fhir_url}}/MedicationStatement?_tag=https://zusapi.com/lens|ActiveMedications&patient.identifier=https://zusapi.com/fhir/identifier/universal-id|{{universal_patient_id}}
Condition Lenses
Summary Lens
The Condition resources of a patient are aligned and de-duplicated by common SNOMED CT (or the available CodeSystem if mapping to SNOMED CT is not available). Zus creates these new, de-duplicated Conditions Summary resources with the following tag:
"meta": {
"tag": [
{
"system": "https://zusapi.com/summary",
"code": "Common"
}
]
}
You can query for a patient's Condition Summary Lens resources by filtering on the tag, as shown below:
{{fhir_url}}/Condition?_tag=https://zusapi.com/summary|Common&patient.identifier=https://zusapi.com/fhir/identifier/universal-id|{{universal_patient_id}}
Zus determines the value for each field in the Summary Lens resource primarily based on the value on the raw resource with the latest real-world event date.
Chronic Conditions Lens
Chronic Conditions are a subset of Conditions Summary Lenses that have an enriched Chronic Conditions Indicator (CCI) value of “Chronic”, “Both”, or null (i.e., if there is no mapping from the coding to CCI value). This Lens informs care team users about what chronic problems their patients are most likely currently dealing with. You can find the enriched CCI value in a Condition resource codeable concept in the following extension:
{
"extension": [
{
"url": "<https://zusapi.com/terminology/enrichment>",
"valueString": "CCI"
}
],
"system": "<http://www.hcupus.ahrq.gov/toolssoftware/chronic_icd10/chronic_icd10.jsp>",
"code": "C",
"display": "Chronic",
"userSelected": false
}
Chronic Conditions Lens resources have the following tag:
"meta": {
"tag": [
{
"system": "https://zusapi.com/lens",
"code": "ChronicConditions"
}
]
}
Since Condition Lens resources are a subset of Summary Lenses, they also contain the summary tag
You can query for a patient's Chronic Conditions Lens resources by filtering on the tag, as shown below:
{{fhir_url}}/Condition?_tag=https://zusapi.com/lens|ChronicConditions&patient.identifier=https://zusapi.com/fhir/identifier/universal-id|{{universal_patient_id}}
Transition of Care Lens
The Transitions of Care Lens aggregates and summarizes Encounter FHIR resources for each patient into EpisodeOfCare FHIR resources. Inpatient, emergency, observation, and preadmit encounters that have matching visit IDs and/or any encounters that occur near each other temporally (within 36 hours) for a given patient will be grouped together and summarized into a Zus created and managed EpisodeOfCare resource.
Grouping Logic
First, Zus groups all encounters with the same visit ID together. Then we create temporal windows of these groups, collecting all encounters that occur within 36 hours of the previous encounter. These windows are then summarized into an EpisodeOfCare lens output resource.
Data Model
The output of the Transitions of Care Lens are EpisodeOfCare FHIR resources which Zus creates and manages.
Field | Note |
---|---|
resource.meta.tag | All transitions of care lens output resources will include this tag:{ "system": "https://zusapi.com/summary", "code": "TransitionsOfCare" } |
resource.extension with "url": "https://zusapi.com/lens/extension/aggregatedFrom" | The Zus aggregated from extension lists the Encounter resources that were used to generate this output resource. |
resource.extension with "url": "https://zusapi.com/lens/extension/dischargeDisposition" | The Zus discharge disposition extension denotes the most recent discharge disposition for the episode. |
resource.extension with "url": "https://zusapi.com/lens/extension/dischargeLocation" | The Zus discharge location extension denotes the location of the most recent inpatient encounter in the episode. |
resource.extension with "url": "https://zusapi.com/lens/extension/admittingLocation" | The Zus admitting location extension denotes the location of the most recent emergency encounter in the episode. |
resource.extension with "url": "https://zusapi.com/lens/extension/encounterClass" | The Zus encounter class extension denotes the most recent “encounter class” in the episode. Expected codes are:EMER (emergency), IMP (inpatient), OBSENC (observation), and PRENC (preadmit). |
resource.extension with "url": "https://zusapi.com/lens/extension/dischargeNarrative" | The Zus discharge narrative extension is a list of references to Binarys that have a discharge narrative for the episode. The preferredDischargeNarrative nested extension noted by "url": "https://zusapi.com/lens/extension/preferredDischargeNarrative" indicates which document will provide the most valuable content relating to that episode of care. Zus is matching codes based on the Commonwell/Carequality document standardization project. |
resource.extension with "url": "<https://zusapi.com/lens/extension/adtMessage"> | The ADT Message extension provides information about the triggering events received in the HL7 message for the ADT event. This includes the Message Type, Effective Time, and and the associated DocumentReference . |
resource.extension with "url":"<https://zusapi.com/lens/extension/adtMessageType"> | The ADT Message Type extension includes the ADT trigger event code. |
resource.extension with "url":"<https://zusapi.com/lens/extension/adtMessageEffectiveTime"> | The date and time of the received ADT Message Type. |
resource.diagnosis | The diagnosis field includes all diagnoses from all encounters that are part of this episode. Diagnoses from emergency encounters will have an admitting diagnosis extension on them. Diagnoses from all other encounters will have a discharge diagnosis extension on them. |
resource.period | The period will begin at the start of the first occurring encounter that is part of this episode. The period will end at the end of the last occurring encounter that is part of this episode. Null values are possible if the supporting encounters do not have a start or end period. |
resource.patient | The patient will be the Zus Universal Patient. |
resource.status | The status is inherited from the most recent Encounter that is part of the EpisodeOfCare . |
Here is a mocked example of a single EpisodeOfCare for a single patient created by the Transitions of Care Lens in JSON format:
{
"id": "a5025641-d5a0-4ca0-80ef-67a9557ef0f6",
"resourceType": "EpisodeOfCare",
"status": "finished",
"patient": {
"reference": "Patient/72d35656-9f86-42b1-b5d8-73608ea0da1f",
"type": "Patient"
},
"period": {
"end": "2024-10-20T07:23:00Z",
"extension": [
{
"url": "https://zusapi.com/lens/extension/highestPrecisionStart",
"valueDateTime": "2024-10-20T03:50:00Z"
},
{
"url": "https://zusapi.com/lens/extension/highestPrecisionEnd",
"valueDateTime": "2024-10-20T07:23:00Z"
}
],
"start": "2024-10-20T03:50:00Z"
},
"diagnosis": [
{
"condition": {
"reference": "Condition/be8a53ee-bc8f-455c-886f-36cd64578ff4"
},
"role": {
"coding": [
{
"code": "AD",
"display": "Admitting diagnosis",
"system": "http://terminology.hl7.org/CodeSystem/diagnosis-role"
}
]
}
},
{
"condition": {
"reference": "Condition/2d9a12b3-f6b5-49d9-a795-22fab37453ac"
},
"role": {
"coding": [
{
"code": "AD",
"display": "Admitting diagnosis",
"system": "http://terminology.hl7.org/CodeSystem/diagnosis-role"
}
]
}
},
{
"condition": {
"reference": "Condition/1ea50100-5392-4358-a39d-1abfa4fecd63"
},
"role": {
"coding": [
{
"code": "AD",
"display": "Admitting diagnosis",
"system": "http://terminology.hl7.org/CodeSystem/diagnosis-role"
}
]
}
},
{
"condition": {
"reference": "Condition/2769ab47-beb5-4cf1-bc89-d1b75402996e"
},
"role": {
"coding": [
{
"code": "AD",
"display": "Admitting diagnosis",
"system": "http://terminology.hl7.org/CodeSystem/diagnosis-role"
}
]
}
}
],
"extension": [
{
"extension": [
{
"url": "https://zusapi.com/lens/extension/aggregatedFrom",
"valueReference": {
"reference": "Encounter/5d3032db-4148-4e63-86d3-89e0412707f0",
"type": "Encounter"
}
},
{
"url": "https://zusapi.com/lens/extension/aggregatedFrom",
"valueReference": {
"reference": "Encounter/e891cbae-bf28-4f74-9f03-93b4f8f2e2d0",
"type": "Encounter"
}
},
{
"url": "https://zusapi.com/lens/extension/aggregatedFrom",
"valueReference": {
"reference": "Encounter/f5c8b067-e95b-4b9a-8bd6-8f8678b3c1bc",
"type": "Encounter"
}
}
],
"url": "https://zusapi.com/lens/extension/aggregatedFrom"
},
{
"url": "https://zusapi.com/lens/extension/dischargeDisposition",
"valueCodeableConcept": {
"coding": [
{
"code": "HOM"
},
{
"code": "1",
"display": "DISCHARGED - HOME/SELF CARE (ROUTINE DISCHARGE)",
"system": "http://experian.com/membermatch/hl7/v06132023"
}
]
}
},
{
"url": "https://zusapi.com/lens/extension/admittingLocation",
"valueReference": {
"display": "REGIONAL MEDICAL CENTER",
"reference": "Location/8d72aeb1-e35d-4cd9-9bd9-76496420ab59",
"type": "Location"
}
},
{
"extension": [
{
"extension": [
{
"url": "https://zusapi.com/lens/extension/adtMessageType",
"valueString": "A08"
},
{
"url": "https://zusapi.com/lens/extension/documentReference",
"valueReference": {
"reference": "DocumentReference/400f4404-4c51-4132-a1fe-4dab8b53accb",
"type": "DocumentReference"
}
},
{
"url": "https://zusapi.com/lens/extension/adtMessageEffectiveTime",
"valueDateTime": "2024-10-20T03:50:00Z"
}
],
"url": "https://zusapi.com/lens/extension/adtMessage"
},
{
"extension": [
{
"url": "https://zusapi.com/lens/extension/adtMessageType",
"valueString": "A04"
},
{
"url": "https://zusapi.com/lens/extension/documentReference",
"valueReference": {
"reference": "DocumentReference/53fee7f0-2741-47e0-814f-ec4a23d187d0",
"type": "DocumentReference"
}
},
{
"url": "https://zusapi.com/lens/extension/adtMessageEffectiveTime",
"valueInstant": "2024-10-20T08:13:06Z"
}
],
"url": "https://zusapi.com/lens/extension/adtMessage"
},
{
"extension": [
{
"url": "https://zusapi.com/lens/extension/adtMessageType",
"valueString": "A03"
},
{
"url": "https://zusapi.com/lens/extension/documentReference",
"valueReference": {
"reference": "DocumentReference/fc610160-1625-4c51-8b9c-e25ee21443a5",
"type": "DocumentReference"
}
},
{
"url": "https://zusapi.com/lens/extension/adtMessageEffectiveTime",
"valueInstant": "2024-10-20T11:34:40Z"
}
],
"url": "https://zusapi.com/lens/extension/adtMessage"
}
],
"url": "https://zusapi.com/lens/extension/adtMessages"
},
{
"url": "https://zusapi.com/lens/extension/encounterClass",
"valueCoding": {
"code": "EMER",
"display": "emergency",
"system": "https://terminology.hl7.org/2.1.0/ValueSet-v3-ActEncounterCode.html",
"userSelected": false
}
},
{
"url": "https://zusapi.com/lens/id",
"valueString": "3a862761-a631-4b37-bdea-648b0ec8b5f7"
},
{
"url": "https://zusapi.com/fhir/identifier/universal-id",
"valueString": "95c1d5c0-affa-4a67-872f-ab4f19e3dc25"
}
],
"meta": {
"extension": [
{
"url": "https://zusapi.com/stream",
"valueString": "zus"
},
{
"url": "https://zusapi.com/created-at",
"valueInstant": "2024-10-20T08:17:20.898+00:00"
}
],
"lastUpdated": "2024-11-17T00:46:07.574+00:00",
"tag": [
{
"code": "TransitionsOfCare",
"system": "https://zusapi.com/summary"
},
{
"code": "builder/a6e6aa23-bb4d-4111-9509-57b719356d4d",
"system": "https://zusapi.com/accesscontrol/owner"
}
],
"versionId": "38"
}
}
Encounter Lens
The Encounter resources for a patient are deduplicated by date and enriched encounter class. The Encounter class is added by Zus Enrichment and ensures that Encounters are properly categorized as Ambulatory, Inpatient, Emergency, etc.
If we are unable to categorize an Encounter do to a lack of provided codings or other context, we add a label of Unknown
. Because those uncategorized encounters generally contain non-patient interactions like med orders, they are not summarized into an encounter lens.
Encounter Lenses include a summary tag for easy identification:
"meta": {
"tag": [
{
"system": "https://zusapi.com/lens",
"code": "Encounters"
}
]
}
You can query for a patient's Encounter Summary Lens resources by filtering on the tag, as shown below:
{{fhir_url}}/Encounter?_tag=https://zusapi.com/summary|Common&patient.identifier=https://zusapi.com/fhir/identifier/universal-id|{{universal_patient_id}}
Here is an example of a mocked Encounter Lens resource:
{
"resourceType": "Encounter",
"id": "7bdd-47fa-accf-6e1f2b855555",
"class": {
"system": "https://terminology.hl7.org/2.1.0/ValueSet-v3-ActEncounterCode.html",
"code": "AMB",
"display": "ambulatory"
},
"status": "finished",
"subject": {
"reference": "Patient/8804-4728-95cf-3ab4af655555",
"type": "Patient"
},
"diagnosis": [
{
"condition": {
"reference": "Condition/6a10-4cd0-b377-d2aa13555555"
}
}
],
"extension": [
{
"extension": [
{
"url": "https://zusapi.com/lens/extension/aggregatedFrom",
"valueReference": {
"reference": "Encounter/da3f-4b69-9b15-9e3099655555",
"type": "Encounter"
}
},
{
"url": "https://zusapi.com/lens/extension/aggregatedFrom",
"valueReference": {
"reference": "Encounter/0b43-414e-a925-58b9d1a55555",
"type": "Encounter"
}
},
{
"url": "https://zusapi.com/lens/extension/aggregatedFrom",
"valueReference": {
"reference": "Encounter/7d22-40e5-a453-5d3a7d055555",
"type": "Encounter"
}
}
],
"url": "https://zusapi.com/lens/extension/aggregatedFrom"
},
{
"url": "https://zusapi.com/lens/id",
"valueString": "8326-c94e-4fd4-aabe-4fa744655555"
},
{
"url": "https://zusapi.com/fhir/identifier/universal-id",
"valueString": "7fb1-40ff-8e63-b3f4e0355555"
}
],
"identifier": [
{
"system": "urn:oid:1.2.840.114350.1.13.280.2.7.3.698084.8",
"value": "1484343255"
},
{
"system": "urn:oid:1.2.840.114350.1.13.280.2.7.3.698084.8",
"value": "1484345497"
},
{
"system": "urn:oid:1.2.840.114350.1.13.280.2.7.3.698084.8",
"value": "1484616178"
}
],
"location": [
{
"location": {
"reference": "Location/5073-74ae-4d80-877d-5c628e055555"
}
},
{
"location": {
"reference": "Location/deb-9491-46dc-91f6-46deace55555"
}
}
],
"meta": {
"extension": [
{
"url": "https://zusapi.com/stream",
"valueString": "zus"
},
{
"url": "https://zusapi.com/created-at",
"valueInstant": "2024-06-25T20:10:17.143+00:00"
}
],
"versionId": "1",
"lastUpdated": "2024-06-25T20:10:16.545+00:00",
"tag": [
{
"system": "https://zusapi.com/summary",
"code": "Common"
},
{
"system": "https://zusapi.com/accesscontrol/owner",
"code": "builder/bb0b-4543-8489-262fcbf55555"
}
]
},
"participant": [
{
"individual": {
"reference": "Practitioner/7-fbf9-44ec-bc65-3b1becf55555"
}
},
{
"individual": {
"reference": "Practitioner/ddfe-4be4-8442-1587a1e55555"
}
}
],
"period": {
"start": "2023-11-20T09:51:00-05:00",
"end": "2023-11-21T16:57:00-05:00"
}
}
Updated 22 days ago