Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cardinality Issues with Extension-DiagnosticReport.media.link #574

Merged
merged 32 commits into from
Dec 16, 2024

Conversation

KazeemHamzat
Copy link
Contributor

Changing the cardinality of Extension-DiagnosticReport.media.link to 0 to many (0...) instead of the current 1 to many(1..)

ryma2fhir and others added 2 commits November 26, 2024 14:31
reinstate UKCore-Observation-Group-Lab.referenceRange
Changing the cardinality of Extension-DiagnosticReport.media.link to 0 to many (0...*)
Copy link
Contributor

@ryma2fhir ryma2fhir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KazeemHamzat @vickyjaiswal0308
I'm not quite getting this one. I see we already have DiagnosticReport.media which contains .link 1..1 and .comment 0..1

I do see that the link reference has changed in R5 from media to DocumentReference, which is what you want adding.

I'm happy to keep the media 0..*, and allow both media and DocumenentReference, but it should be one or another (you either follow R4 or R5 not both, so we'd need a FHIRpath to stop both being used at the same time.

The comment can only have a maximum of 1 but by adding this to the extension you have allowed a maximum of 2.

So in my mind, the extension is media.link only (no comment element) with the slice name being mediaLinkR5, and can only be allowed on the DiagnosticReport.media and only one type of media.link allowed (R4 xor R5 reference).

Cardinality Issues with Extension-DiagnosticReport.media.link
Copy link
Contributor

@vickyjaiswal0308 vickyjaiswal0308 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the URL to a UK-specific one to clarify that it is a backport:
https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-DiagnosticReportMediaLink

Copy link
Contributor

@vickyjaiswal0308 vickyjaiswal0308 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The min="1" on Extension.value[x] ensures that the value is mandatory. If mandatory usage is not required, set min="0".

@KazeemHamzat
Copy link
Contributor Author

Change the URL to a UK-specific one to clarify that it is a backport: https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-DiagnosticReportMediaLink

This is backported element from FHIR R5, so its URL will be that of R5

Modifying the constraint to target media.link and extension:mediaLinkR5
@ryma2fhir
Copy link
Contributor

ryma2fhir commented Dec 10, 2024

Sorry @KazeemHamzat I've got this totally wrong. I've just realised media.link is 1..1 so we can't have the R5 version without the R4 version also being added.

You had it correct the first time (I think):
mediaR5 extension for the media R5 version. This will include both media.comment and media.link(DocumentReference)
Then FHIRPath to say media and mediaR5 cannot both be populated.

The following scenarios should be tested:
No media or mediaR5 = PASS
Media but no mediaR5 = PASS
no media but a mediaR5 = PASS
media and mediaR5 = FAIL

Apologies for that.

Create the extension at root level and added FHIR path
Modifying FHIR Path Exp.
Changing the FHIR Exp to not AND
Re-write the FHIR path expression
R-write the FHIR Path Expression
Copy link
Contributor

@ryma2fhir ryma2fhir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see we still have the extension to media.link, this should now be media

I'm also thinking the media.comment and media.link wont reference the R5, so it might be that the fixedUri's need to be the R5 extension url? I'm not entirely sure on this one, could you ask on chat.fhir, you will need to supply them with the two options.

Update UKCore-DiagnosticReport
Removing reference to sub element link
ryma2fhir
ryma2fhir previously approved these changes Dec 16, 2024
Copy link
Contributor

@vickyjaiswal0308 vickyjaiswal0308 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me

Added full-stop to re-initiate approval
@ryma2fhir
Copy link
Contributor

My GPG key didnt work on signing commit - I'm happy it was me so pushing to develop

@ryma2fhir ryma2fhir merged commit e0ab5d5 into develop Dec 16, 2024
4 checks passed
@ryma2fhir ryma2fhir deleted the Feature-IOPS-2979-Fixing-Breaking-Examples branch December 16, 2024 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants