Skip to content

Commit 64c21c7

Browse files
[ENG-381] feat: add extension support for datapoints (#3661)
* feat: add extension support for datapoints * refact:updated the extension mapping * chore: switch to just json --------- Co-authored-by: nandkishorr <rachulr7@gmail.com>
1 parent e3b31fb commit 64c21c7

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

  • care/emr/reports/context_builder/data_points

care/emr/reports/context_builder/data_points/patient.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,16 @@ class BasePatientContextBuilder(SingleObjectContextBuilder):
169169
preview_value="",
170170
description="Instance tags associated with the patient",
171171
)
172+
extensions = Field(
173+
display="Patient Extensions",
174+
mapping=lambda p: p.extensions or {},
175+
preview_value={
176+
"patient_demographics": {
177+
"related_person": "Jane Doe",
178+
},
179+
},
180+
description="Patient extensions as JSON (e.g. patient.extensions.patient_demographics)",
181+
)
172182

173183

174184
class PatientMinimumContextBuilder(BasePatientContextBuilder):

0 commit comments

Comments
 (0)