Skip to content

Commit

Permalink
added based on and subject in diagnostic report list spec
Browse files Browse the repository at this point in the history
  • Loading branch information
khavinshankar committed Jan 14, 2025
1 parent 4dbf130 commit 48f88e6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions care/emr/resources/diagnostic_report/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,13 @@ class DiagnosticReportListSpec(DiagnosticReportSpec):
def perform_extra_serialization(cls, mapping, obj):
mapping["id"] = obj.external_id

if obj.based_on:
mapping["based_on"] = ServiceRequestRetrieveSpec.serialize(
obj.based_on
).to_json()
if obj.subject:
mapping["subject"] = PatientRetrieveSpec.serialize(obj.subject).to_json()


class DiagnosticReportRetrieveSpec(DiagnosticReportListSpec):
@classmethod
Expand Down

0 comments on commit 48f88e6

Please sign in to comment.