Stream: v2 to FHIR
Topic: Provenance example?
Eric Haas (May 27 2020 at 00:27):
I am looking for v2 to FHIR Provenance example instance for the transform. I fashioned one see below ... after the description in the FHIR spec, but I'd like to see what one from this project looks like....
Eric Haas (May 27 2020 at 00:27):
# General Provenance resource relating to the transformation process:
resourceType: Provenance
# activity is a omh to FHIR transform there is no transform activity in the code system!
activity:
coding:
- system: http://example.org/omh-to-fhir
code: transform
display: Transform
# Provenance.target points to all transformed resources since this is contained
# in the target resource it will be "#"
target:
- reference: '#' #Observation/omh-fhir-example
# Provenance.recorded indicates the instant the v2 message was transformed to FHIR resources
recorded: '2020-05-26T11:09:09-07:00'
# Provenance.policy can optionally point to the rules used for the transformation such as the omh-fhir ig
policy: http://www.fhir.org/guides/mfhir/ImplementationGuide/openmhealth.mfhir-0.0.0
agent:
# Provenance.agent.type = "assembler"
- type:
- coding:
- system: 'http://terminology.hl7.org/CodeSystem/provenance-participant-type'
code: assembler
display: Assembler
# Provenance.agent.who references the Organization or Device performing the transformation
who:
reference: Device/example-r24-server
# source schema Provenance.agent.type = "source" see the entity for the actual schema instance
- type:
text: omh-schema
# Provenance.agent.who referencin the OMH schema
who:
identifier:
value: blood-glucose-2.0
# Provenance.entity can optionally contain the whole omh schema instance as a
# DocumentReference in .what and a .role of "derivation"
entity:
- role: derivation
what:
identifier:
system: urn:ietf:rfc:3986
value: 243c773b-8936-407e-9c23-270d0ea49cc4
agent:
# Provenance.agent.type = "Author"
- type:
- coding:
- system: 'http://terminology.hl7.org/CodeSystem/provenance-participant-type'
code: AUT
display: Author
# Provenance.agent.who references the originating Device from
# header.acquisition_provenance.source_name and
# header.acquisition_provenance.source_data_point_id
# this is the same as in Observation.Device and Observation.identifier
who:
# reference: Device/acme-patient-device
display: "Acme BG API"
John Moehrke (May 27 2020 at 16:56):
You hare using an example codesystem for the .activity, why not use lifecycle 'transform' activity? This seems the activity you are doing. right?
http://terminology.hl7.org/CodeSystem/iso-21089-lifecycle#transform
John Moehrke (May 27 2020 at 16:57):
Not clear why you want to use .entity.agent.... and I think you need to refer to one of your .agent entries. not inline an agent. (I have never understood this part) -- @Grahame Grieve ?
John Moehrke (May 27 2020 at 16:59):
if you want to say that the v2 message was authored by a given agent, then you indicate that .agent details as .agent.type=SORUCE
John Moehrke (May 27 2020 at 16:59):
see http://build.fhir.org/provenance.html#import
John Moehrke (May 27 2020 at 17:01):
clearly some improvement opportunities for the text found in the Provenance page... lets work on that.
Eric Haas (Jun 01 2020 at 04:13):
You hare using an example codesystem for the .activity, why not use lifecycle 'transform' activity? This seems the activity you are doing. right?
this was not in FHIR R4
Eric Haas (Jun 01 2020 at 04:34):
updated based on John's input:
# General Provenance resource relating to the transformation process:
resourceType: Provenance
# activity is a omh to FHIR transform there is no transform activity in the code system!
activity:
coding:
- system: http://terminology.hl7.org/CodeSystem/iso-21089-lifecycle
code: transform
display: Transform
# Provenance.target points to all transformed resources since this is contained
# in the target resource it will be "#"
target:
- reference: '#' #Observation/omh-fhir-example
# Provenance.recorded indicates the instant the v2 message was transformed to FHIR resources
recorded: '2020-05-26T11:09:09-07:00'
# Provenance.policy can optionally point to the rules used for the transformation such as the omh-fhir ig
policy: http://www.fhir.org/guides/mfhir/ImplementationGuide/openmhealth.mfhir-0.0.0
agent:
# Provenance.agent.type = "assembler"
- type:
- coding:
- system: 'http://terminology.hl7.org/CodeSystem/provenance-participant-type'
code: assembler
display: Assembler
# Provenance.agent.who references the Organization or Device performing the transformation
who:
reference: Device/example-r24-server
# source schema Provenance.agent.type = "source" see the entity for the actual schema instance
- type:
text: omh-schema
# Provenance.agent.who referencin the OMH schema
who:
identifier:
value: blood-glucose-2.0
- type:
- coding:
- system: 'http://terminology.hl7.org/CodeSystem/provenance-participant-type'
code: AUT
display: Author
# Provenance.agent.who references the originating Device from
# header.acquisition_provenance.source_name and
# header.acquisition_provenance.source_data_point_id
# this is the same as in Observation.Device and Observation.identifier
who:
# reference: Device/acme-patient-device
display: "Acme BG API"
# Provenance.entity can optionally contain the whole omh schema instance as a
# DocumentReference in .what and a .role of "derivation"
entity:
- role: derivation
what:
identifier:
system: urn:ietf:rfc:3986
value: 243c773b-8936-407e-9c23-270d0ea49cc4
Hans Buitendijk (Jun 01 2020 at 13:11):
Have you looked at the v2-to-FHIR mapping spreadsheets that map to Provenance? https://docs.google.com/spreadsheets/d/1PaFYPSSq4oplTvw_4OgOn6h2Bs_CMvCAU9CqC4tPBgk/edit#gid=484860251. Look for anything that has Provenance in the name.
Grahame Grieve (Jun 05 2020 at 01:44):
I think you need to refer to one of your .agent entries. not inline an agent. (I have never understood this part)
It's easier if you don't refer to it, until the same agent appears more than once. I don't recall the trade-offs ever being explicit discussed. I copied the W3C prov to get the initial design
Last updated: Apr 12 2022 at 19:14 UTC