Skip to content

Commit 1ba350f

Browse files
committed
Merge branch 'master' of github.com:hl7-eu/imaging into R4-mapping-multiversion
2 parents 31076bd + 5018019 commit 1ba350f

File tree

147 files changed

+3149
-1370
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+3149
-1370
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/.idea
22
.vscode/launch.json
3+
.vscode/mcp.json
34
input-cache/
45
output/
56
temp/
@@ -11,5 +12,3 @@ publisher.jar
1112
translations/**
1213

1314
subigs/**
14-
15-
.vscode/mcp.json

ig-src/input/binaries/9df9cc92-0f09-4dbb-8d5d-e74bd9eaac3a.pdf renamed to ig-src/input/binaries/semistructured_report.pdf

File renamed without changes.

ig-src/input/binaries/1.3.46.670589.58.10.10562925256214266678.11674839624289915183.pdf renamed to ig-src/input/binaries/structured_report.pdf

File renamed without changes.

igs/imaging-r4/input/binaries/9df9cc92-0f09-4dbb-8d5d-e74bd9eaac3a.pdf renamed to ig-src/input/binaries/unstructured_report.pdf

File renamed without changes.

ig-src/input/fsh/alias-extensions.liquid.fsh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ Alias: $annotation-type = http://hl7.org/fhir/StructureDef
44
Alias: $artifact-description-url = http://hl7.org/fhir/StructureDefinition/artifact-title
55
Alias: $artifact-related-artifact-url = http://hl7.org/fhir/StructureDefinition/artifact-relatedArtifact
66
Alias: $artifact-title-url = http://hl7.org/fhir/StructureDefinition/artifact-description
7-
Alias: $artifact-version-url = http://hl7.org/fhir/StructureDefinition/artifact-version|5.3.0-ballot
7+
Alias: $artifact-version-url = http://hl7.org/fhir/StructureDefinition/artifact-version
88
Alias: $body-site-url = http://hl7.org/fhir/StructureDefinition/bodySite
99
Alias: $data-absent-reason-url = http://hl7.org/fhir/StructureDefinition/data-absent-reason
1010
Alias: $diagnostic-report-composition-url = http://hl7.org/fhir/StructureDefinition/extension-DiagnosticReport.composition
1111
Alias: $document-reference-thumbnail-url = http://hl7.org/fhir/StructureDefinition/documentreference-thumbnail
1212
Alias: $encounter-legal-status-url = http://hl7.eu/fhir/StructureDefinition/encounter-legalStatus
13-
Alias: $event-basedOn-url = http://hl7.org/fhir/StructureDefinition/event-basedOn|5.3.0-ballot
13+
Alias: $event-basedOn-url = http://hl7.org/fhir/StructureDefinition/event-basedOn
1414
Alias: $ihe-ext-medication-characteristic = http://profiles.ihe.net/PHARM/MPD/StructureDefinition/ihe-ext-medication-characteristic
1515
Alias: $ihe-ext-medication-classification = http://profiles.ihe.net/PHARM/MPD/StructureDefinition/ihe-ext-medication-classification
1616
Alias: $ihe-ext-medication-device = http://profiles.ihe.net/PHARM/MPD/StructureDefinition/ihe-ext-medication-device
@@ -25,13 +25,13 @@ Alias: $iso21090-uncertainty-type-url = http://hl7.org/fhir/StructureDef
2525
Alias: $iso21090-uncertainty-url = http://hl7.org/fhir/StructureDefinition/iso21090-uncertainty
2626
Alias: $street-name-url = http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetName
2727
Alias: $house-number-url = http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-houseNumber
28-
Alias: $note-url = http://hl7.org/fhir/StructureDefinition/note|5.3.0-ballot
28+
Alias: $note-url = http://hl7.org/fhir/StructureDefinition/note
2929
Alias: $performer-function-url = http://hl7.org/fhir/StructureDefinition/event-performerFunction
3030
Alias: $sexParameter-for-clinical-use-url = http://hl7.org/fhir/StructureDefinition/patient-sexParameterForClinicalUse
3131
Alias: $workflow-reason-url = http://hl7.org/fhir/StructureDefinition/workflow-reason
3232
Alias: $birth-time-url = http://hl7.org/fhir/StructureDefinition/patient-birthTime
33-
Alias: $workflow-status-reason-url = http://hl7.org/fhir/StructureDefinition/workflow-statusReason
34-
Alias: $textLink = http://hl7.org/fhir/StructureDefinition/textLink
33+
// Alias: $workflow-status-reason-url = http://hl7.org/fhir/StructureDefinition/workflow-statusReason
34+
// Alias: $textLink = http://hl7.org/fhir/StructureDefinition/textLink
3535
{% if isR4 %}
3636
Alias: $CrossVersion-Attachment.pages = http://hl7.org/fhir/5.0/StructureDefinition/extension-Attachment.pages
3737
Alias: $CrossVersion-Composition.version = http://hl7.org/fhir/5.0/StructureDefinition/extension-Composition.version

ig-src/input/fsh/api/MhdDocumentReference.liquid.fsh

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,8 @@ Description: """
66
Profile for DocumentReference resources used in the EEHRxF context, based on the IHE MHD Minimal DocumentReference profile. This profile is used for the DocumentReference resources that represent imaging reports in the EEHRxF context. It includes additional constraints and extensions specific to imaging reports, such as the type of report, the clinical specialty, the anatomical region of interest and the profile of the imaging report.
77
"""
88
{{R }}* insert SetFmmAndStatusRule( 1, draft )
9-
{{R }}* insert MhdDocumentReference
109

11-
// content profile representation
12-
{{R4}}* content 1..1
13-
{{R4}} * extension contains http://hl7.org/fhir/5.0/StructureDefinition/extension-DocumentReference.content.profile named profile 1..*
14-
{{R4}} * extension[profile]
15-
{{R4}} * ^short = "Contains the profile of the referred report"
16-
// TODO fix this! we had to comment it out as it did not run
17-
// {{R4}} * extension[BundleReportEuImagingProfile].valueCanonical = Canonical( BundleReportEuImaging )
18-
19-
{{R5}}* content 1..1
20-
{{R5}} * profile 1..*
21-
{{R5}} * insert SliceElement( #value, value )
22-
{{R5}} * profile contains hl7eu-imaging-report 1..1
23-
{{R5}} * profile[hl7eu-imaging-report].valueCanonical = Canonical( BundleReportEuImaging )
24-
25-
Profile: DocumentReferenceUnstructuredImagingReport
26-
{{R4}}Parent: EehrxfMhdDocumentReference
27-
{{R5}}Parent: DocumentReference
28-
Title: "EEHRxF MHD DocumentReference Profile for unstructured imaging reports"
29-
Description: """
30-
Profile for DocumentReference resources used in the EEHRxF context, based on the IHE MHD Minimal DocumentReference profile. This profile is used for the DocumentReference resources that represent imaging reports in the EEHRxF context. It includes additional constraints and extensions specific to imaging reports, such as the type of report, the clinical specialty, and the anatomical region of interest. It is intended for unstructured reports needed to support legacy reports, where the content is provided as an attachment without a specific structure or format.
31-
"""
32-
* insert SetFmmAndStatusRule( 1, draft )
33-
* insert MhdDocumentReference
3410

35-
36-
RuleSet: MhdDocumentReference
3711
// practice setting
3812
{{R4}}* context.practiceSetting ^short = "Clinical specialty (e.g., radiology, laboratory) - SHOULD be used for lab vs imaging differentiation"
3913
{{R5}}* practiceSetting ^short = "Clinical specialty (e.g., radiology, laboratory) - SHOULD be used for lab vs imaging differentiation"
@@ -58,14 +32,13 @@ RuleSet: MhdDocumentReference
5832
* ^definition = "Defines the document type, it is recommended to take this from the suggested LOINC set. It should correspond with the value on DiagnosticReport.code."
5933
* coding
6034
* insert SliceElement( #value, $this )
61-
* coding contains imaging-report 1..1 and imaging-report-type 0..*
35+
* coding contains imaging-report 1..1
6236
* coding[imaging-report] = $loinc#85430-7
63-
* coding[imaging-report-type] from ImagingReportTypesEuVSEuImaging (preferred)
37+
// * coding[imaging-report-type] from ImagingReportTypesEuVSEuImaging (preferred)
6438

6539
* custodian only Reference(OrganizationEu)
6640
* ^short = "Organization that manages the Imaging Report"
6741

68-
6942
// bodysite
7043
{{R5}}* bodySite
7144
// {{R5}}* bodySite only CodeableReferenceAnatomicalRegion
@@ -84,4 +57,28 @@ RuleSet: MhdDocumentReference
8457
{{R4}} * ^definition = "This field may be used to provide additional information about the anatomical region of interest for the imaging manifest."
8558

8659
// modality
87-
{{R4}}* extension contains $CrossVersion-R5-DocumentReference.modality-for-R4 named modality 1..1
60+
{{R4}}* extension contains $CrossVersion-R5-DocumentReference.modality-for-R4 named modality 1..1
61+
62+
// content profile representation. Defining a custom extension as the CV spanshot 2 fails. TBD replace with CV snapshot 3 when available.
63+
// {{R4}}* content 1..1
64+
// {{R4}} * extension contains http://hl7.org/fhir/5.0/StructureDefinition/extension-DocumentReference.content.profile named profile 1..*
65+
// {{R4}} * extension[profile]
66+
// {{R4}} * ^short = "Contains the profile of the referred report"
67+
{{R4}}* content 1..1
68+
{{R4}} * extension contains ImDocumentReferenceContentProfile named profile 1..*
69+
{{R4}} * extension[profile] ^short = "Contains the profile of the referred report"
70+
71+
{{R5}}* content 1..1
72+
{{R5}} * profile 1..*
73+
{{R5}} * insert SliceElement( #value, value )
74+
{{R5}} * profile contains bundle-report 0..1 and bundle-report-minimal-metadata 0..1
75+
{{R5}} * profile[bundle-report].valueCanonical = Canonical(BundleReportEuImaging)
76+
{{R5}} * profile[bundle-report-minimal-metadata].valueCanonical = Canonical(BundleReportMinimalMetadataEuImaging)
77+
78+
79+
{{R4}}Extension: ImDocumentReferenceContentProfile
80+
{{R4}}Id: im-documentreference-content-profile
81+
{{R4}}Title: "Extension: DocumentReference content profile"
82+
{{R4}}Description: "Canonical URL of the profile represented by the {{R4}}referenced content."
83+
{{R4}}Context: DocumentReference.content
84+
{{R4}}* value[x] only canonical

ig-src/input/fsh/profiles/im-composition.liquid.fsh

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,25 @@ The `text` field of each section SHALL contain a textual representation of all l
4141
* attester[legalAuthenticator]
4242
* mode 1..1
4343
* mode = http://hl7.org/fhir/composition-attestation-mode#legal
44-
* party only Reference( $EuPractitionerRole or $EuOrganization)
44+
* party only Reference( $EuPractitioner or $EuPractitionerRole )
4545
* time 1..1
4646
* attester[resultValidator]
4747
* mode 1..1
4848
* mode = http://hl7.org/fhir/composition-attestation-mode#professional
49-
* party only Reference( $EuPractitionerRole )
50-
* extension contains DeviceAttesterExt named deviceAttester 0..1
49+
* party only Reference( $EuPractitioner or $EuPractitionerRole )
5150
* time 1..1
5251

5352
* author 1..*
54-
* insert SliceElement( #profile, [[$this.resolve()]] )
53+
// * insert SliceElement( #profile, [[$this.resolve()]] )
54+
* ^slicing.discriminator.type = #profile
55+
* ^slicing.discriminator.path = "$this.resolve()"
56+
* ^slicing.rules = #open
57+
* ^slicing.ordered = false
5558
* author contains
5659
author 0..* and
5760
authoringDevice 0..* and
5861
organization 0..*
59-
* author[author] only Reference( $EuPractitionerRole )
62+
* author[author] only Reference( $EuPractitioner or $EuPractitionerRole )
6063
* author[authoringDevice] only Reference( $EuDevice )
6164
* author[organization] only Reference( $EuOrganization )
6265

@@ -68,8 +71,12 @@ The `text` field of each section SHALL contain a textual representation of all l
6871

6972
* category 0..*
7073
* insert SliceElement( #value, $this )
71-
* category contains diagnostic-service 0..1
74+
* category contains diagnostic-service 0..1 and imaging-report 1..1 and imaging 1..1
7275
* category[diagnostic-service] from $diagnostic-service-sections (required)
76+
* category[imaging] = http://hl7.eu/fhir/eu-health-data-api/CodeSystem/eehrxf-document-priority-category-cs#Medical-Imaging
77+
* ^definition = "Defines the priority category of the report as defined in the API spec."
78+
* category[imaging-report] = $loinc#85430-7 //Diagnostic imaging report
79+
* ^definition = "Defines the category of the report, Diagnostic imaging report."
7380

7481

7582
* status
@@ -177,7 +184,7 @@ The `text` field of each section SHALL contain a textual representation of all l
177184
finding 0..* and
178185
keyimage 0..* and
179186
image 0..*
180-
* entry[finding] only Reference(ObservationFindingEuImaging)
187+
* entry[finding] only Reference(Observation)
181188
* entry[keyimage] only Reference( DocumentReferenceKeyImageEuImaging or ImagingSelectionKeyImageEuImaging )
182189
* entry[image] only Reference( DocumentReference {% if isR4 %} or Media {% endif %} )
183190

ig-src/input/fsh/profiles/im-diagnosticreport.liquid.fsh

Lines changed: 78 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,77 @@ The structure of the modelled has been aligned with the DiagnosticResource as de
88
* insert SetFmmAndStatusRule( 1, draft )
99
// * insert MandateLanguageAndSecurity
1010

11+
* insert DiagnosticReportEuImagingCommonRules
12+
13+
// reference to the order that has the Accession Number and including the Accession Number as identifier
14+
* basedOn
15+
* insert SliceElement( #type, $this )
16+
* basedOn contains ServiceRequestOrderEuImagingaccession 0..*
17+
* insert BasedOnServiceRequestOrderEuImagingReference( ServiceRequestOrderEuImagingaccession )
18+
19+
{{R4}}* extension contains http://hl7.org/fhir/5.0/StructureDefinition/extension-DiagnosticReport.composition named composition 1..1
20+
{{R4}}* extension[composition] ^short = "Imaging Diagnostic Report"
21+
{{R4}}* extension[composition].valueReference only Reference(CompositionEuImaging)
22+
23+
{{R5}}* composition 1..1
24+
{{R5}}* composition ^short = "Imaging Diagnostic Report"
25+
{{R5}}* composition only Reference(CompositionEuImaging)
26+
27+
28+
29+
Profile: DiagnosticReportEuImagingMinimalMetadata
30+
Parent: DiagnosticReport
31+
Title: "DiagnosticReport: Imaging Report Minimal Metadata"
32+
Description: """
33+
DiagnosticReport profile for minimal metadata imaging report exchange.
34+
This profile shares all common imaging report modeling with DiagnosticReportEuImaging but does not require a matching Composition resource.
35+
"""
36+
* insert SetFmmAndStatusRule( 1, draft )
37+
* insert DiagnosticReportEuImagingCommonRules
38+
39+
// basedOn can either point to a ServiceRequest resource or carry only an accession identifier
40+
* basedOn
41+
* insert SliceElement( #exists, identifier )
42+
* basedOn contains
43+
order-resource 0..* and
44+
order-identifier 0..*
45+
* basedOn[order-resource] only Reference(ServiceRequestOrderEuImaging)
46+
* basedOn[order-resource].reference 1..1
47+
* basedOn[order-resource].identifier 0..0
48+
* basedOn[order-identifier].reference 0..0
49+
* basedOn[order-identifier].identifier 1..1
50+
* basedOn[order-identifier].identifier only AccessionNumberIdentifierEuImaging
51+
52+
// study/imagingStudy can either point to an ImagingStudy resource or carry only a Study Instance UID identifier
53+
{{R4}}* imagingStudy
54+
{{R4}} * insert SliceElement( #exists, identifier )
55+
{{R4}}* imagingStudy contains
56+
{{R4}} study-resource 0..* and
57+
{{R4}} study-identifier 0..*
58+
{{R4}}* imagingStudy[study-resource] only Reference(ImagingStudyEuImaging)
59+
{{R4}}* imagingStudy[study-resource].reference 1..1
60+
{{R4}}* imagingStudy[study-resource].identifier 0..0
61+
{{R4}}* imagingStudy[study-identifier].reference 0..0
62+
{{R4}}* imagingStudy[study-identifier].identifier 1..1
63+
{{R4}}* imagingStudy[study-identifier].identifier only StudyInstanceUidIdentifierEuImaging
64+
65+
{{R5}}* study
66+
{{R5}} * insert SliceElement( #exists, identifier )
67+
{{R5}}* study contains
68+
{{R5}} study-resource 0..* and
69+
{{R5}} study-identifier 0..*
70+
{{R5}}* study[study-resource] only Reference(ImagingStudyEuImaging)
71+
{{R5}}* study[study-resource].reference 1..1
72+
{{R5}}* study[study-resource].identifier 0..0
73+
{{R5}}* study[study-identifier].reference 0..0
74+
{{R5}}* study[study-identifier].identifier 1..1
75+
{{R5}}* study[study-identifier].identifier only StudyInstanceUidIdentifierEuImaging
76+
77+
78+
{{R5}}* composition 0..0
79+
{{R5}}* composition ^short = "Composition is not allowed in this minimal metadata profile. If composition is present, use the DiagnosticReportEuImaging profile instead."
80+
81+
RuleSet: DiagnosticReportEuImagingCommonRules
1182
* extension contains $artifact-version-url named artifactVersion 0..1
1283
* extension contains AnatomicalRegionExtension named anatomical-region 0..*
1384
* extension[anatomical-region] ^short = "The anatomical regions covered by the study this report reports on."
@@ -29,11 +100,7 @@ The regions SHALL overlap with the bodysite references from `ImagingStudy.serie.
29100
* ^short = "Status of the Report"
30101
* ^comment = "DiagnosticReport.status and Composition.status shall be aligned"
31102

32-
// reference to the order that has the Accession Number and including the Accession Number as identifier
33-
* basedOn
34-
* insert SliceElement( #type, $this )
35-
* basedOn contains ServiceRequestOrderEuImagingaccession 0..*
36-
* insert BasedOnServiceRequestOrderEuImagingReference( ServiceRequestOrderEuImagingaccession )
103+
/////////////////////
37104

38105
//* status
39106
// code --> TODO will likely change based on composition discussions
@@ -43,8 +110,12 @@ The regions SHALL overlap with the bodysite references from `ImagingStudy.serie.
43110

44111
* category 0..*
45112
* insert SliceElement( #value, $this )
46-
* category contains diagnostic-service 0..1
113+
* category contains diagnostic-service 0..1 and imaging-report 1..1 and imaging 1..1
47114
* category[diagnostic-service] from $diagnostic-service-sections (required)
115+
* category[imaging] = http://hl7.eu/fhir/eu-health-data-api/CodeSystem/eehrxf-document-priority-category-cs#Medical-Imaging
116+
* ^definition = "Defines the priority category of the report as defined in the API spec."
117+
* category[imaging-report] = $loinc#85430-7 //Diagnostic imaging report
118+
* ^definition = "Defines the category of the report, Diagnostic imaging report."
48119

49120
* subject only Reference($EuPatient)
50121

@@ -73,7 +144,7 @@ The regions SHALL overlap with the bodysite references from `ImagingStudy.serie.
73144
* resultsInterpreter 0..*
74145
* insert SliceElementWithDescription( #profile, [[resolve()]], [[Primary interpreter of results]] )
75146
* resultsInterpreter contains author 0..*
76-
* resultsInterpreter[author] only Reference($EuPractitionerRole)
147+
* resultsInterpreter[author] only Reference($EuPractitioner or $EuPractitionerRole)
77148

78149
* result 0..* MS
79150
* result only Reference(ObservationFindingEuImaging)
@@ -93,17 +164,6 @@ using standardized anatomic, pathologic, and radiologic terminology whenever pos
93164
{{R5}}* study ^definition = "Study subject to this report. Note: Any associated study (e.g. comparison studies) used during reporting should be tracked in the associatedStudy extension."
94165

95166

96-
97-
// refer to the mandatory composition
98-
{{R4}}* extension contains http://hl7.org/fhir/5.0/StructureDefinition/extension-DiagnosticReport.composition named composition 1..1
99-
{{R4}}* extension[composition] ^short = "Imaging Diagnostic Report"
100-
{{R4}}* extension[composition].valueReference only Reference(CompositionEuImaging)
101-
102-
{{R5}}* composition 1..1
103-
{{R5}}* composition ^short = "Imaging Diagnostic Report"
104-
{{R5}}* composition only Reference(CompositionEuImaging)
105-
106-
107167
* extension contains HL7IDRComparisonStudiesExt named comparison 0..* MS
108168
* extension[comparison] ^short = "Comparison studies"
109169
* extension[comparison] ^definition = """
@@ -162,7 +222,6 @@ Communications captures what communications have been made with other care provi
162222
// * obeys hl7eu-im-dr-communication
163223
// * obeys hl7eu-im-dr-finding
164224

165-
166225
Extension: HL7IDRComparisonStudiesExt
167226
Title: "Extension: HL7IDR DiagnosticReport Comparison Study"
168227
Id: HL7IDRComparisonStudy

ig-src/input/fsh/profiles/im-imagingstudy.liquid.fsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This profile represents an imaging study instance.
77
* insert SetFmmAndStatusRule( 1, draft )
88
* obeys im-imagingstudy-01
99

10-
* extension contains $workflow-status-reason-url named status-reason 0..1
10+
// * extension contains $workflow-status-reason-url named status-reason 0..1
1111

1212
* extension contains AnatomicalRegionExtension named anatomical-region 0..*
1313
* extension[anatomical-region] ^short = "The anatomical regions covered by the study."

ig-src/input/fsh/profiles/im-radiationdose-observation.liquid.fsh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ E.g. based on information from https://dicom.nema.org/medical/dicom/current/outp
2323
* partOf contains study 1..1
2424
* partOf[study] only Reference( ImagingStudyEuImaging )
2525

26-
{{R4}}* extension contains http://hl7.org/fhir/5.0/StructureDefinition/extension-Observation.derivedFrom named derivedFrom 1..*
27-
{{R4}}* extension[derivedFrom] contains srImagingSelection 1..*
28-
{{R4}}* extension[derivedFrom][srImagingSelection].value[x] only Reference( SrInstanceImagingSelectionEuImaging )
26+
//TBD use CV extension snapshot 3 as the version 2 throws errors.
27+
// {{R4}}* extension contains http://hl7.org/fhir/5.0/StructureDefinition/extension-Observation.derivedFrom named derivedFrom 1..*
28+
// {{R4}}* extension[derivedFrom] contains srImagingSelection 1..*
29+
// {{R4}}* extension[derivedFrom][srImagingSelection].value[x] only Reference( SrInstanceImagingSelectionEuImaging )
2930

3031
{{R5}}* derivedFrom
3132
{{R5}} * insert SliceElement( #profile, $this )

0 commit comments

Comments
 (0)