Skip to content

Commit

Permalink
Merge pull request #2748 from yash-learner/khavinshankar/labs
Browse files Browse the repository at this point in the history
Add specimen serialization to diagnostic report list spec
  • Loading branch information
vigneshhari authored Jan 19, 2025
2 parents 48f88e6 + e56be6c commit a2b7ede
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions care/emr/resources/diagnostic_report/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,11 @@ def perform_extra_serialization(cls, mapping, obj):
).to_json()
if obj.subject:
mapping["subject"] = PatientRetrieveSpec.serialize(obj.subject).to_json()
if obj.specimen.exists():
mapping["specimen"] = [
SpecimenRetrieveSpec.serialize(specimen).to_json()
for specimen in obj.specimen.all()
]


class DiagnosticReportRetrieveSpec(DiagnosticReportListSpec):
Expand Down

0 comments on commit a2b7ede

Please sign in to comment.