---
title: "Facade Encounter"
canonical: "https://wiki.patientsknowbest.com/space/api/3364946356/Facade%20Encounter"
format: markdown
---
[http://fhir.patientsknowbest.com/structuredefinition/facade-encounter](http://fhir.patientsknowbest.com/structuredefinition/facade-encounter)

[https://www.hl7.org/fhir/STU3/encounter.html](https://www.hl7.org/fhir/STU3/encounter.html)

## Overview

An Encounter represents an interaction with the healthcare system, such as an inpatient stay.

## Relevant PKB entities

- [[[Encounter]]](https://wiki.patientsknowbest.com/space/api/3744497665/Entity%3A+Encounter)
- [[[Encounter Event]]](https://wiki.patientsknowbest.com/space/api/3744497665/Entity%3A+Encounter)

## Mappings

| **FHIR** | **PKB** | **Notes** |
| --- | --- | --- |
| Resource id | [[Encounter.Encounter ID]] |  |
| Encounter.extension | Running through each [[Encounter Event]] from oldest to newest, add one "specialty-history" extension as follows for each block of consecutive [[Encounter Event]]s with the same [[Data Point.Specialty]] (where "the same" means an exact, case-sensitive match of the specialty value).<br>- extension[0]: Extension
  - url =  "[http://fhir.patientsknowbest.com/structuredefinition/specialty-history](http://fhir.patientsknowbest.com/structuredefinition/specialty-history)"
  - extension[0]
    - url = "specialty"
    - valueCoding: Coding
      - code = [[Data Point.Specialty]]
  - extension[1]
    - url = "period"
    - valuePeriod: Period
      - start = [[Encounter Event.Timestamp]] of the oldest encounter event within the block being represented
      - end = [[Encounter Event.Timestamp]] of the oldest encounter event within the block following the one being represented (if present) |  |
| Encounter.status | "unknown" |  |
| Encounter.class | - class: Coding
  - code = [[Encounter Event.Class]] of the most recent [[Encounter Event]] (as given by [[Encounter Event.Timestamp]])
  - system = "[http://hl7.org/fhir/v3/ActCode](http://hl7.org/fhir/v3/ActCode)"<br>[[Encounter Event.Class]] code mappings (PKB  →  FHIR):<br>- IN_PATIENT → IMP
- OUT_PATIENT → AMB
- AMBULATORY → AMB
- EMERGENCY → EMER
- HOME → HH
- FIELD → FLD
- DAYTIME → SS
- VIRTUAL → VR
- OTHER → omit value |  |
| Encounter.classHistory | Running through each [[Encounter Event]] from oldest to newest, add one entry to "classHistory" for each block of consecutive [[Encounter Event]]s with the same class value (where the class value is the FHIR value mapped from [[Encounter Event.Class]]). Do not add an entry if the value is OTHER.<br>- classHistory: BackboneElement
  - class: Coding
    - code = [[Encounter Event.Class]] of the block being represented (mappings as for Encounter.class)
    - system = "[http://hl7.org/fhir/v3/ActCode](http://hl7.org/fhir/v3/ActCode)"
  - period: Period
    - start = [[Encounter Event.Timestamp]] of the oldest encounter event within the block being represented
    - end = [[Encounter Event.Timestamp]] of the oldest encounter event within the block following the one being represented (if present) |  |
| Encounter.participant | Running through each [[Encounter Event]] from oldest to newest, add one entry to "participant" for each block of consecutive [[Encounter Event]]s with the same [[Encounter Event→External Participant]] (where "the same" means an exact, case-sensitive match of the participant name).<br>- participant: BackboneElement
  - type: CodeableConcept
    - coding[0]: Coding
      - system = "[http://hl7.org/fhir/v3/ParticipationType](http://hl7.org/fhir/v3/ParticipationType)"
      - code = [[Encounter Event→External Participant.Role]]
  - period: Period
    - start = [[Encounter Event.Timestamp]] of the oldest encounter event within the block being represented
    - end = [[Encounter Event.Timestamp]] of the oldest encounter event within the block following the one being represented (if present)
  - individual: Reference
    - display = [[Encounter Event→External Participant.Name]]<br>[[Encounter Event→External Participant.Role]] code mappings (PKB → FHIR):<br>- ATTENDER → ATND
- REFERRER → REF
- CONSULTANT → CON |  |
| Encounter.period | - period: Period
  - start = [[Encounter Event.Timestamp]] of the oldest encounter event
  - end = [[Encounter Event.Timestamp]] of the newest encounter event |  |
| Encounter.location | Running through each [[Encounter Event]] from oldest to newest, add one entry to "location" for each block of consecutive [[Encounter Event]]s with the same [[Encounter Event->Location]] (where "the same" means an exact, case-sensitive match of the location description).<br>The location should be added as a contained Location resource to the response...<br>- Location.description = [[Encounter Event->Location.Description]]<br>...and reference from the location list.<br>- location: BackboneElement
  - location: Reference
    - reference = a reference to the contained Location resource
  - period: Period
    - start = [[Encounter Event.Timestamp]] of the oldest encounter event within the block being represented
    - end = [[Encounter Event.Timestamp]] of the oldest encounter event within the block following the one being represented (if present) |  |