19.1.27. camcops_server.cc_modules.cc_patient¶
Copyright (C) 2012-2018 Rudolf Cardinal (rudolf@pobox.com).
This file is part of CamCOPS.
CamCOPS is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
CamCOPS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with CamCOPS. If not, see <http://www.gnu.org/licenses/>.
-
class
camcops_server.cc_modules.cc_patient.DistinctPatientReport[source]¶ Report to show distinct patients.
-
class
camcops_server.cc_modules.cc_patient.Patient(**kwargs)[source]¶ Class representing a patient.
-
apply_special_note(req: camcops_server.cc_modules.cc_request.CamcopsRequest, note: str, audit_msg: str = 'Special note applied manually') → None[source]¶ Manually applies a special note to a patient. WRITES TO DATABASE.
-
audit(req: camcops_server.cc_modules.cc_request.CamcopsRequest, details: str, from_console: bool = False) → None[source]¶ Audits actions to this patient.
-
get_age(req: camcops_server.cc_modules.cc_request.CamcopsRequest, default: str = '') → Union[int, str][source]¶ Age (in whole years) today, or default.
-
get_age_at(when: Union[NoneType, datetime.date, str, arrow.arrow.Arrow], default: str = '') → Union[int, str][source]¶ Age (in whole years) at a particular date, or default.
-
get_bare_ptinfo() → camcops_server.cc_modules.cc_simpleobjects.BarePatientInfo[source]¶ Get basic identifying information, as a BarePatientInfo.
-
get_hl7_pid_segment(req: camcops_server.cc_modules.cc_request.CamcopsRequest, recipient_def: camcops_server.cc_modules.cc_recipdef.RecipientDefinition) → hl7.containers.Segment[source]¶ Get HL7 patient identifier (PID) segment.
-
get_iddesc(req: camcops_server.cc_modules.cc_request.CamcopsRequest, which_idnum: int) → Union[str, NoneType][source]¶ Get value of a specific ID description, if present.
-
get_idnum_object(which_idnum: int) → Union[camcops_server.cc_modules.cc_patientidnum.PatientIdNum, NoneType][source]¶ Gets the PatientIdNum object for a specified which_idnum, or None.
-
get_idnum_value(which_idnum: int) → Union[int, NoneType][source]¶ Get value of a specific ID number, if present.
-
get_idshortdesc(req: camcops_server.cc_modules.cc_request.CamcopsRequest, which_idnum: int) → Union[str, NoneType][source]¶ Get value of a specific ID short description, if present.
-
get_sex_verbose(default: str = 'sex unknown') → str[source]¶ Returns HTML-safe version of sex, or default.
-
get_surname_forename_upper() → str[source]¶ Get “SURNAME, FORENAME” in HTML-safe format, using “UNKNOWN” for missing details.
-
get_xml_root(req: camcops_server.cc_modules.cc_request.CamcopsRequest, skip_fields: List[str] = None) → camcops_server.cc_modules.cc_xml.XmlElement[source]¶ Get root of XML tree, as an XmlElementTuple.
-