Skip to content

Minor fix for MedicationPrescription search by patient#6

Open
ewall wants to merge 1 commit intoi3l:FHIR-DSTUfrom
ewall:fix-rx
Open

Minor fix for MedicationPrescription search by patient#6
ewall wants to merge 1 commit intoi3l:FHIR-DSTUfrom
ewall:fix-rx

Conversation

@ewall
Copy link

@ewall ewall commented Apr 23, 2015

This is a really minor fix for an annoying bug in the HealthPort server as its currently deployed. (No need for extra credit, just wanting to make the code better for the next class!)

The FHIR DSTU spec says that you should be able to search MedicationPrescription resources with the keyword "patient", but the current HealthPort code uses the "subject" paramter for this instead.

"Incorrect" URL that works on the current version:
http://localhost:8080/HealthPort/fhir/MedicationPrescription?patient:Patient=Patient/3.568001602-01

Corrected URL that works after this update:
http://localhost:8080/HealthPort/fhir/MedicationPrescription?patient:Patient=Patient/3.568001602-01

An alternate solution would be to duplicate the getMedicationPrescriptionsByPatient() method so one accepts 'subject' and the other accepts 'patient' (for backwards compatibility), but for future use I believe it's better to follow the spec to avoid confusion.

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.

1 participant