Open chris-dare opened 2 years ago
Important to accelerate this. For duplicate patients, it creates the impression that consultation notes are not being saved
Link patient prototype available here: https://www.figma.com/proto/f29U89yv9q1HvYVaStLIl9/SERENITY-EMR-(PRODUCTION-%E2%9C%85)?page-id=3695%3A30706&node-id=3695%3A31062&viewport=292%2C48%2C0.13&scaling=min-zoom&starting-point-node-id=3695%3A31062&show-proto-sidebar=1
Thanks for completing this @agbavorrichmond. @seddie62 had some concerns. I asked her to share them with you
@TuyizereBapt, here's what you need for the API implementation
Implement a model called PatientLink
in patient.models
. Like most models it should inherit from fhirresourcemanager.models.ResourceModel
Properties:
a. primary_patient: Patient
b. linked_patient: Patient
c. performed_by: User
d. performing_practitioner: Practitioner
e. performer_name: Text
f. comment: Text
g. is_active: Boolean
Implement an API with the url: {base_url}/providers/{provider_id}/patient_links/{primary_patient_id}
Method should be POST
This should accept a payload of a list of PatientLink objects and return the linked patients that have been saved in the database
Input:
{
"primary_patient": "id",
"linked_patient": ["patient_id1", "patient_id2"],
"comment: "text goes here"
}
Output:
[
{
"uuid": "uuid",
"primary_patient": "id",
"linked_patient": "id",
"comment": "text goes here",
"performing_practitioner": "practitioner_id",
"performer_name": "name",
"is_active": True,
"created_at": date
},
{
"uuid": "uuid",
"primary_patient": "id",
"linked_patient": "id",
"comment": "text goes here",
"performing_practitioner": "practitioner_id",
"performer_name": "name",
"is_active": True,
"created_at": date
}
]
Patient.get_duplicate_profiles
method such that:
a. It also returns the linked_patient
profiles where self
is the primary_patient
b. It also returns the primary_patient
with its other linked_patient
s profiles where self
is the linked_patient
cc: @seddie62
Hi @seddie62,
API for link patients is done and available for integration on demo: https://serenity-health.readme.io/reference/patients#link-patients
Contact @TuyizereBapt if you have any questions.
Guys, also I want us to use the issue threads to communicate as well. It's helpful to track the progress of what's going on
@TuyizereBapt I've tried this out on demo. There are some duplication constraint exceptions being thrown by the API. Please reach out to Seddie and test with her. @seddie62 please give @TuyizereBapt a primer on what you integrated tomorrow
Sharing feedback post review:
We need cover 3 cases:
Important to display "x out of n patients linked" in API response message
Tell us about your request! Should be able to see patient history across their multiple duplicate patient records
Which app does this concern? Provider portal
What will be benefit of this feature? Practitioners will have a 360 view of the patient
Describe the solution you'd like Implement patient link: https://www.hl7.org/fhir/patient.html#links
Describe alternatives you've considered Merging patient profiles however more complex
Additional context N/A