Skip to content

Commit

Permalink
Adds lab test deparment into the detail screen
Browse files Browse the repository at this point in the history
  • Loading branch information
fredkingham committed Jan 26, 2022
1 parent 3014dd7 commit d871e3d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
1 change: 1 addition & 0 deletions plugins/labtests/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def serialize_observation(self, obs):
def serialize_lab_test(self, lab_test):
result = self.serialize_model(lab_test)
result['patient_id'] = lab_test.patient_id
result['department'] = lab_test.department
result['observations'] = []

for obs in lab_test.observation_set.all():
Expand Down
17 changes: 13 additions & 4 deletions plugins/labtests/templates/lab_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,26 @@ <h3>
[[ lab_test.accession_number ]]
</div>
<div class="col-md-3">
<b>Encounter consultant name</b>
<b>Deparment</b>
</div>
<div class="col-md-3">
[[ lab_test.encounter_consultant_name ]]
[[ lab_test.department_int ]]
<span ng-show='lab_test.department'>
([[ lab_test.department ]])
</span>
</div>
</div>
<div ng-show="lab_test.encounter_location_name" class="row content-offset-10 content-offset-below-10">
<div class="row content-offset-10 content-offset-below-10">
<div class="col-md-3">
<b>Encounter consultant name</b>
</div>
<div class="col-md-3">
[[ lab_test.encounter_consultant_name ]]
</div>
<div ng-show="lab_test.encounter_location_name" class="col-md-3">
<b>Encounter location</b>
</div>
<div class="col-md-9">
<div ng-show="lab_test.encounter_location_name" class="col-md-9">
[[ lab_test.encounter_location_name ]]
<span ng-show="lab_test.encounter_location_code">
([[ lab_test.encounter_location_code ]])
Expand Down

0 comments on commit d871e3d

Please sign in to comment.