Encounter Lens

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/summary",  
            "code": "Common" 
        }  
    ]  
}

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}}

Data Model

Field

Note

resource.hospitalization.reAdmission

Set to R with system <http://terminology.hl7.org/CodeSystem/v2-0092>
Set for encounters with the following requirements:

  • Encounter has a class of IMP
  • Encounter has an admitSource that can be classified as emergency, holding, or direct
  • Encounter has a a previous IMP encounter within 30 days, but not within 36 hours prior

resource.hospitalization.admitSource

Zus receives these values directly from Bamboo and Experian.

Additionally, Zus enrichment may normalize certain IMP encounter types to emd when it detects that the patient was admitted through the ED.

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/highestPrecisionStart"

The highest precision start extension lists the start time for the encounter as a valueDateTime from the latest aggregated Encounter.

resource.extension with "url": "https://zusapi.com/lens/extension/highestPrecisionEnd"

The highest precision end extension lists the end time for the encounter as a valueDateTime from the latest aggregated Encounter.

resource.extension with "url": "https://zusapi.com/lens/extension/relatedBinaries"

The related binaries extension lists Binaryresources linked to the encounter via Provenance.

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"
 }
}

Data Mart Access

Data from Encounter Lenses is available in the following tables in the Zus Relational Data Mart:

  • lens_encounter
  • lens_encounter_aggregated_from
  • lens_encounter_diagnosis
  • lens_encounter_hospitalization_discharge_disposition
  • lens_encounter_hospitalization_discharge_disposition_coding
  • lens_encounter_identifier
  • lens_encounter_participant
  • lens_encounter_related_binaries
  • lens_encounter_type
  • lens_encounter_type_coding

Read more about these tables in the Data Mart documentation.