Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Patient ID in samples #25

Merged
merged 11 commits into from
Jan 4, 2022
Merged
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Changelog
1.0.0 (unreleased)
------------------

- #25 Add Patient ID in samples
- #24 Migrate patient objects to be folderish
- #23 Integrate new DX date field and widget
- #18 Unique patient ID
Expand Down
9 changes: 8 additions & 1 deletion src/senaite/patient/adapters/listing.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,16 @@
"index": "medical_record_number",
"after": "getId",
}),
("PatientID", {
"title": _("Patient ID"),
"sortable": False,
"index": "patient_id",
"after": "MRN",
}),
("Patient", {
"title": _("Patient"),
"sortable": False,
"after": "getId",
"after": "PatientID",
}),
]

Expand Down Expand Up @@ -95,6 +101,7 @@ def folder_item(self, obj, item, index):

item["MRN"] = obj.getMedicalRecordNumberValue
item["Patient"] = obj.getPatientFullName
item["PatientID"] = obj.getPatientID

@check_installed(None)
def before_render(self):
Expand Down
1 change: 1 addition & 0 deletions src/senaite/patient/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def update_patient(patient, **values):
"""
# set values explicitly
patient.set_mrn(values.get("mrn", api.get_id(patient)))
patient.set_patient_id(values.get("patient_id", ""))
patient.set_firstname(values.get("firstname", ""))
patient.set_lastname(values.get("lastname", ""))
patient.set_gender(values.get("gender", ""))
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading