Location care_site documented

Secondary pattern: some implementations (notably fhir-to-omop-demo) create a care_site row from each FHIR Location resource, in addition to the primary care_site row from Organization. The Location-derived care_site row carries the location_id (linking to the location row from the same Location resource) while the Organization-derived row carries the name and place_of_service. The two rows share the same care_site_id and must be merged downstream. This pattern is NOT used by omoponfhir-v54, ETL-German, or NACHC.

Conversion profile omop-location-care-site
A FHIR instance converts to care_site iff it validates against this profile.
Path Card Type Binding / Fixed Comment
Location.identifier 1..*MS At least one identifier — used as care_site.care_site_source_value when this row is the primary care_site source.
Location.physicalType 1..1MS fhir/location-physical-typerequired
Location.managingOrganization 1..1MS Reference Resolves to the Organization-derived care_site_id; the Location-derived care_site row shares this ID.
ViewDefinition (Stage 1 flattener) omop-location-care-site
2 columns · resource Location
column name FHIRPath type
id Location.id id
address_id Location.id id
Condition: Location.managingOrganization is present

Fields (6)

  • care_site_id Location.managingOrganization.reference integer · Reference(Organization)
    PKrequired
    Resolves to the Organization's care_site_id. Same care_site_id as the row produced by Organization -> care_site. The two rows describe the same care site.
    1 source ▾
  • care_site_name varchar(255) · string
    Typically null on this row. Set by the Organization-derived care_site row, not this one.
  • place_of_service_concept_id integer · CodeableConcept
    FK→CONCEPT
    Typically null on this row. Set by the Organization-derived care_site row, not this one.
  • location_id Location.id integer · id
    FK→LOCATION
    Points to the location row produced from this same Location resource (see Location__location edge).
    1 source ▾
  • care_site_source_value varchar(50) · string
    Typically null on this row. Set by the Organization-derived care_site row.
  • place_of_service_source_value varchar(50) · string
    Typically null on this row. Set by the Organization-derived care_site row.

Edge Cases

Location.managingOrganization absent
No care_site_id available -- skip the care_site row. The location row is still emitted via the Location__location edge.
Location.managingOrganization references Organization not in bundle
Deferred resolution. Stub care_site_id; resolve when Organization arrives.
Multiple Locations under the same managingOrganization
Each Location emits a care_site row with the same care_site_id. Without merge, this produces duplicates -- a single Organization with N Locations yields 1 + N care_site rows.
Location with no address but with managingOrganization
care_site row emitted but location_id points at a sparse location row (lat/lng only or empty).
Location with address but no managingOrganization
location row only -- no care_site row from this edge.
Duplicate care_site rows from Organization and Location
Merge before insert: group rows by care_site_id and coalesce non-null fields (name from Organization row, location_id from Location row). Or pick Organization row authoritatively and lose location_id linkage.

Reference Implementations