Patient location documented

Address normalization. One Patient produces at most one location row (most recent home address). The location_id is then set as person.location_id FK.

Conversion profile omop-patient-location
A FHIR instance converts to location iff it validates against this profile.
Path Card Type Binding / Fixed Comment
Patient.address 1..*MS At least one address is required. If multiple are present, pick the most recent home address.
Patient.address.line MS First entry → location.address_1; second → address_2; remaining concatenated.
Patient.address.city MS
Patient.address.state MS Truncated to 2 chars (US state code) for location.state.
Patient.address.postalCode MS Up to 9 chars (ZIP+4) for location.zip.
Patient.address.country MS
ViewDefinition (Stage 1 flattener) omop-patient-location
10 columns · resource Patient
column name FHIRPath type
id Patient.id id
address_1 Patient.address.line[0] string
address_2 Patient.address.line[1] string
city Patient.address.city string
state Patient.address.state string
zip Patient.address.postalCode string
county Patient.address.district string
country_text Patient.address.country string
latitude Patient.address.extension.where(url='http://hl7.org/fhir/StructureDefinition/geolocation').extension.where(url='latitude').valueDecimal decimal
longitude Patient.address.extension.where(url='http://hl7.org/fhir/StructureDefinition/geolocation').extension.where(url='longitude').valueDecimal decimal
Condition: Patient.address is present with usable fields

Fields (12)

Edge Cases

Multiple line[] entries (>2)
OMOP only has address_1 and address_2. Concatenate beyond into address_2 or drop.
State longer than 2 chars (e.g. California)
Lookup abbreviation or truncate to first 2 letters.
Non-US ZIP (alphanumeric)
Store as-is up to 9 chars.
address.text only (no structured fields)
Store in location_source_value; leave structured fields null.
Geocoding extension absent
latitude/longitude null.
Multiple home addresses
Pick most recent. OMOP only stores one; address history lost.
Same address shared by multiple persons
Deduplicate (shared location_id) or duplicate (one row per person). Both valid.

Reference Implementations