简体   繁体   中英

Mapping existing resource to hl7-fhir response

Trying to understand the concept of the code datatype in hl7-fhir. Looking at the appointment ( https://www.hl7.org/fhir/appointment.html ) resource as an example it has a status parameter with suggested values of "proposed | pending | booked" etc.

Given an existing database with it's own custom status' (Attended, Confirmed, Attended but late) what is the correct way to handle a hl7-fhir response to a consumer?

If the "code" data type is used, then the FHIR binding strength is always "required" - which means you are required to use the FHIR-defined list of codes and no others.

It appears that two of your statuses - "Attended" and "Attended but late" aren't actually statuses of the appointment - the booking, but are instead commentary about the resulting encounter. So I would capture those as extensions. "confirmed" sounds similar to "booked", though I'd need to know the definition to know for sure. Do you have any appointment statuses for appointments that are not yet confirmed (let alone attended)?

To extend on Lloyds notes, you will want to put the extension under the status property, and map your existing values to the provided FHIR values, and put your local actual value in the extension underneath.

This way when other systems read the resource and don't know about your extension status values, they will still be able to act sensibly based on the core values.

<status value="fulfilled">
  <extension url="http://yourorg.com/fhir/.../ExtendedAppointmentStatuses">
    <valueCoding>
      <code value="abl" />
      <display value="Attended but late" />
    </valueCoding> 
  </extension>
</status>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM