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

Ensure the Patient resource type prefix in ProcedureRequest's subject… #309

Merged
merged 3 commits into from
Jul 21, 2021

Conversation

sliver007
Copy link
Contributor

… reference.

@sliver007 sliver007 requested a review from JPercival July 21, 2021 22:06
procedureRequest.setSubject(new Reference(patientId));
String patientReferenceString = patientId;
if (!patientId.startsWith("Patient/")) {
patientReferenceString = "Patient/" + patientId;
Copy link
Member

Choose a reason for hiding this comment

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

Reasonable, but what about if patientId is a contained reference? (e.g. #1234). And it should probably also account for the possibility that the reference is an absolute URL (e.g. http://blah-be-de-blah... and uuid:oid:XXX...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Used URI class to account for absoluteUrl and references to contained resources (indicated by presence of a fragment).

Copy link
Member

Choose a reason for hiding this comment

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

Okay, but it does still need to check for the case that the input is relative, but already starts with Patient/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Restored that check and also updated R4 with these same changes.

Copy link
Member

Choose a reason for hiding this comment

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

Looks good

@sliver007 sliver007 requested review from brynrhodes and removed request for JPercival July 21, 2021 22:56
@sliver007 sliver007 marked this pull request as ready for review July 21, 2021 23:04
@sliver007 sliver007 merged commit 64183f0 into master Jul 21, 2021
@sliver007 sliver007 deleted the fix_procedurerequest_resolver_subject_reference branch July 21, 2021 23:38
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.

2 participants