FHIR Chat · R5 Appointment.note in FHIR 4.0.1 · implementers

Stream: implementers

Topic: R5 Appointment.note in FHIR 4.0.1


view this post on Zulip Samuel Brendler (Feb 24 2022 at 10:07):

Hello everyone,

I am looking for a way to implement comments for Appointments in FHIR 4.0.1.with a 0..* relationship instead of 0..1 and also need additional data about each comment's author and a timestamp.
I discovered that R5 already is supposed to provide exactly what I want with the Appointment.note 0..* Annotation
(see https://hl7.org/fhir/5.0.0-snapshot1/appointment.html, https://jira.hl7.org/browse/FHIR-19521).

Are there any best practices doing this in FHIR 4.0.1 or even an existing extension?
Any hints on how to implement this correctly with fsh are much appreciated!

Best regards

view this post on Zulip Lloyd McKenzie (Feb 24 2022 at 20:52):

There are guidelines for using a 'standard' extension URL to adopt data elements defined in a different version of FHIR - see http://build.fhir.org/versions.html#extensions

view this post on Zulip Samuel Brendler (Feb 25 2022 at 11:24):

Thanks a lot for the response!

I added the following to my sushi-config.yaml

dependencies:
  hl7.fhir.extensions.r5: 4.0.1

and changed MyCustomAppointment:

Profile:        MyCustomAppointment
Parent:         Appointment
Id:             my-custom-appointment
Title:          "My Custom Appointment Profile"
Description:    "My Custom Profile for appointment data."

* extension contains http://hl7.org/fhir/5.0/StructureDefinition/extension-Appointment.note named note 0..1

Running sushi . reports no errors or warnings, but when I try to generate the IG with ./_genonce.sh I receive the following error:

Publishing Content Failed: Error generating snapshot for My Custom Appointment Profile(my-custom-appointment): Unable to generate snapshot for http://example.com/fhir/CustomProfiles/4.0.1/StructureDefinition/my-custom-appointment in /home/myuser/APIs/fhir-api/fsh-generated/resources/StructureDefinition-my-custom-appointment (00:23.0596)
                                                                                 (00:23.0597)
Use -? to get command line help                                                  (00:23.0597)
                                                                                 (00:23.0597)
Stack Dump (for debugging):                                                      (00:23.0597)
java.lang.Exception: Error generating snapshot for My Custom Appointment Profile(my-custom-appointment): Unable to generate snapshot for http://example.com/fhir/CustomProfiles/4.0.1/StructureDefinition/my-custom-appointment in /home/myuser/APIs/fhir-api/fsh-generated/resources/StructureDefinition-my-custom-appointment
        at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshots(Publisher.java:5403)
        at org.hl7.fhir.igtools.publisher.Publisher.loadConformance(Publisher.java:4665)
        at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:1005)
        at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:856)
        at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:10005)
Caused by: org.hl7.fhir.exceptions.FHIRException: Unable to generate snapshot for http://example.com/fhir/CustomProfiles/4.0.1/StructureDefinition/my-custom-appointment in /home/myuser/APIs/fhir-api/fsh-generated/resources/StructureDefinition-my-custom-appointment
        at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshot(Publisher.java:5456)
        at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshots(Publisher.java:5401)
        ... 4 more
Caused by: org.hl7.fhir.exceptions.FHIRException: Reference to unknown extension http://hl7.org/fhir/5.0/StructureDefinition/extension-Appointment.note
        at org.hl7.fhir.r5.conformance.ProfileUtilities.processPaths(ProfileUtilities.java:1167)
        at org.hl7.fhir.r5.conformance.ProfileUtilities.processPaths(ProfileUtilities.java:1533)
        at org.hl7.fhir.r5.conformance.ProfileUtilities.generateSnapshot(ProfileUtilities.java:658)
        at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshot(Publisher.java:5451)
        ... 5 more

Is this due to R5 not yet being released?

I also tried with a snapshot URL but sushi didn't like that:
* extension contains http://hl7.org/fhir/5.0.0-snapshot1/StructureDefinition/extension-Appointment.note named note 0..1

view this post on Zulip Samuel Brendler (Feb 28 2022 at 17:14):

Any input would be much appreciated

view this post on Zulip Lloyd McKenzie (Feb 28 2022 at 17:54):

@Grahame Grieve

view this post on Zulip Grahame Grieve (Feb 28 2022 at 19:18):

no that should work - how can I reproduce?

view this post on Zulip Samuel Brendler (Mar 01 2022 at 10:51):

Thanks for the responses @Grahame Grieve @Lloyd McKenzie

I created a simple example based on a vanilla sushi project on github where you can try it yourself.

Steps to reproduce (on Linux):

git clone https://github.com/iroCheese/demo-fhir-appointment-profile.git
cd demo-fhir-appointment-profile
./_updatePublisher.sh
./_genonce.sh

The relevant changes are in this commit.

view this post on Zulip Samuel Brendler (Mar 07 2022 at 10:35):

Can anyone reproduce this?

view this post on Zulip Jay B (Mar 07 2022 at 15:30):

Hey Hi


Last updated: Apr 12 2022 at 19:14 UTC