patient and encounter request fields: each value you send replaces what the endpoint reads from the note. Reduce extraction errors shows which mistakes this avoids.
What the endpoint reads from the note
For any value you do not send, the endpoint looks for it in the note. It fills a field only when the note states the value directly, and does not infer one:- It reads “male”, “female”, “M”, or “F” as the gender, but does not infer gender from a name.
- It reads a stated date of birth, such as “DOB: 1968-04-02”, but does not calculate one from an age.
- It reads “ED” as
emergencyand “admitted to ward” asinpatient, but does not infer the setting from the type of note. - It reads “admitted” as
in-progressand “discharged” asfinished. Without such a word,statusstaysin-progress. - It reads a time of day only together with a timezone. A time without one is cut back to its date, because R4 accepts a time only with a timezone offset.
- It reads admission and discharge dates for
period, but ignores dates that belong to other events, such as the date of a past operation.
id and identifier. When the note states nothing about the encounter, the Encounter holds its id, identifier, the subject reference, status unknown, and a class marked as unknown. R4 requires class, so instead of guessing one the endpoint returns it with only the standard data-absent-reason extension:
Patient fields
Encounter fields
The generated IDs are stable: the same note always gets the same Patient and Encounter
id. Two different notes about the same patient get two different IDs, though. Only your own identifier ties notes from one patient together. Sending an identifier never changes the id.Codes the endpoint can assign
Patient and Encounter use no clinical code systems. Every coded field holds a value from a fixed HL7 or FHIR list:gender from administrative gender, class from ActCode, and priority from ActPriority. type, serviceType, and reasonCode hold text only, so you can send any wording your system uses.
Example
This request sends everypatient and encounter value:
- Simplified
- JSON
reasonCode only holds the text you sent.
Next steps
Reduce extraction errors
Learn where each patient and encounter value comes from in an EHR.
Condition resource group
Learn how diagnoses, problems, symptoms, and signs look in FHIR.