-
Notifications
You must be signed in to change notification settings - Fork 49
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
Ensure the Patient resource type prefix in ProcedureRequest's subject… #309
Conversation
procedureRequest.setSubject(new Reference(patientId)); | ||
String patientReferenceString = patientId; | ||
if (!patientId.startsWith("Patient/")) { | ||
patientReferenceString = "Patient/" + patientId; |
There was a problem hiding this comment.
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...
)
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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/
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
… reference.