Coverage for /home/martinb/workspace/client-py/fhirclient/models/patient.py : 59%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3#
4# Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/Patient) on 2021-05-18.
5# 2021, SMART Health IT.
8from . import domainresource
10class Patient(domainresource.DomainResource):
11 """ Information about an individual or animal receiving health care services.
13 Demographics and other administrative information about an individual or
14 animal receiving care or other health-related services.
15 """
17 resource_type = "Patient"
19 def __init__(self, jsondict=None, strict=True):
20 """ Initialize all valid properties.
22 :raises: FHIRValidationError on validation errors, unless strict is False
23 :param dict jsondict: A JSON dictionary to use for initialization
24 :param bool strict: If True (the default), invalid variables will raise a TypeError
25 """
27 self.active = None
28 """ Whether this patient's record is in active use.
29 Type `bool`. """
31 self.address = None
32 """ An address for the individual.
33 List of `Address` items (represented as `dict` in JSON). """
35 self.birthDate = None
36 """ The date of birth for the individual.
37 Type `FHIRDate` (represented as `str` in JSON). """
39 self.communication = None
40 """ A language which may be used to communicate with the patient about
41 his or her health.
42 List of `PatientCommunication` items (represented as `dict` in JSON). """
44 self.contact = None
45 """ A contact party (e.g. guardian, partner, friend) for the patient.
46 List of `PatientContact` items (represented as `dict` in JSON). """
48 self.deceasedBoolean = None
49 """ Indicates if the individual is deceased or not.
50 Type `bool`. """
52 self.deceasedDateTime = None
53 """ Indicates if the individual is deceased or not.
54 Type `FHIRDate` (represented as `str` in JSON). """
56 self.gender = None
57 """ male | female | other | unknown.
58 Type `str`. """
60 self.generalPractitioner = None
61 """ Patient's nominated primary care provider.
62 List of `FHIRReference` items (represented as `dict` in JSON). """
64 self.identifier = None
65 """ An identifier for this patient.
66 List of `Identifier` items (represented as `dict` in JSON). """
68 self.link = None
69 """ Link to another patient resource that concerns the same actual
70 person.
71 List of `PatientLink` items (represented as `dict` in JSON). """
73 self.managingOrganization = None
74 """ Organization that is the custodian of the patient record.
75 Type `FHIRReference` (represented as `dict` in JSON). """
77 self.maritalStatus = None
78 """ Marital (civil) status of a patient.
79 Type `CodeableConcept` (represented as `dict` in JSON). """
81 self.multipleBirthBoolean = None
82 """ Whether patient is part of a multiple birth.
83 Type `bool`. """
85 self.multipleBirthInteger = None
86 """ Whether patient is part of a multiple birth.
87 Type `int`. """
89 self.name = None
90 """ A name associated with the patient.
91 List of `HumanName` items (represented as `dict` in JSON). """
93 self.photo = None
94 """ Image of the patient.
95 List of `Attachment` items (represented as `dict` in JSON). """
97 self.telecom = None
98 """ A contact detail for the individual.
99 List of `ContactPoint` items (represented as `dict` in JSON). """
101 super(Patient, self).__init__(jsondict=jsondict, strict=strict)
103 def elementProperties(self):
104 js = super(Patient, self).elementProperties()
105 js.extend([
106 ("active", "active", bool, False, None, False),
107 ("address", "address", address.Address, True, None, False),
108 ("birthDate", "birthDate", fhirdate.FHIRDate, False, None, False),
109 ("communication", "communication", PatientCommunication, True, None, False),
110 ("contact", "contact", PatientContact, True, None, False),
111 ("deceasedBoolean", "deceasedBoolean", bool, False, "deceased", False),
112 ("deceasedDateTime", "deceasedDateTime", fhirdate.FHIRDate, False, "deceased", False),
113 ("gender", "gender", str, False, None, False),
114 ("generalPractitioner", "generalPractitioner", fhirreference.FHIRReference, True, None, False),
115 ("identifier", "identifier", identifier.Identifier, True, None, False),
116 ("link", "link", PatientLink, True, None, False),
117 ("managingOrganization", "managingOrganization", fhirreference.FHIRReference, False, None, False),
118 ("maritalStatus", "maritalStatus", codeableconcept.CodeableConcept, False, None, False),
119 ("multipleBirthBoolean", "multipleBirthBoolean", bool, False, "multipleBirth", False),
120 ("multipleBirthInteger", "multipleBirthInteger", int, False, "multipleBirth", False),
121 ("name", "name", humanname.HumanName, True, None, False),
122 ("photo", "photo", attachment.Attachment, True, None, False),
123 ("telecom", "telecom", contactpoint.ContactPoint, True, None, False),
124 ])
125 return js
128from . import backboneelement
130class PatientCommunication(backboneelement.BackboneElement):
131 """ A language which may be used to communicate with the patient about his or
132 her health.
133 """
135 resource_type = "PatientCommunication"
137 def __init__(self, jsondict=None, strict=True):
138 """ Initialize all valid properties.
140 :raises: FHIRValidationError on validation errors, unless strict is False
141 :param dict jsondict: A JSON dictionary to use for initialization
142 :param bool strict: If True (the default), invalid variables will raise a TypeError
143 """
145 self.language = None
146 """ The language which can be used to communicate with the patient
147 about his or her health.
148 Type `CodeableConcept` (represented as `dict` in JSON). """
150 self.preferred = None
151 """ Language preference indicator.
152 Type `bool`. """
154 super(PatientCommunication, self).__init__(jsondict=jsondict, strict=strict)
156 def elementProperties(self):
157 js = super(PatientCommunication, self).elementProperties()
158 js.extend([
159 ("language", "language", codeableconcept.CodeableConcept, False, None, True),
160 ("preferred", "preferred", bool, False, None, False),
161 ])
162 return js
165class PatientContact(backboneelement.BackboneElement):
166 """ A contact party (e.g. guardian, partner, friend) for the patient.
167 """
169 resource_type = "PatientContact"
171 def __init__(self, jsondict=None, strict=True):
172 """ Initialize all valid properties.
174 :raises: FHIRValidationError on validation errors, unless strict is False
175 :param dict jsondict: A JSON dictionary to use for initialization
176 :param bool strict: If True (the default), invalid variables will raise a TypeError
177 """
179 self.address = None
180 """ Address for the contact person.
181 Type `Address` (represented as `dict` in JSON). """
183 self.gender = None
184 """ male | female | other | unknown.
185 Type `str`. """
187 self.name = None
188 """ A name associated with the contact person.
189 Type `HumanName` (represented as `dict` in JSON). """
191 self.organization = None
192 """ Organization that is associated with the contact.
193 Type `FHIRReference` (represented as `dict` in JSON). """
195 self.period = None
196 """ The period during which this contact person or organization is
197 valid to be contacted relating to this patient.
198 Type `Period` (represented as `dict` in JSON). """
200 self.relationship = None
201 """ The kind of relationship.
202 List of `CodeableConcept` items (represented as `dict` in JSON). """
204 self.telecom = None
205 """ A contact detail for the person.
206 List of `ContactPoint` items (represented as `dict` in JSON). """
208 super(PatientContact, self).__init__(jsondict=jsondict, strict=strict)
210 def elementProperties(self):
211 js = super(PatientContact, self).elementProperties()
212 js.extend([
213 ("address", "address", address.Address, False, None, False),
214 ("gender", "gender", str, False, None, False),
215 ("name", "name", humanname.HumanName, False, None, False),
216 ("organization", "organization", fhirreference.FHIRReference, False, None, False),
217 ("period", "period", period.Period, False, None, False),
218 ("relationship", "relationship", codeableconcept.CodeableConcept, True, None, False),
219 ("telecom", "telecom", contactpoint.ContactPoint, True, None, False),
220 ])
221 return js
224class PatientLink(backboneelement.BackboneElement):
225 """ Link to another patient resource that concerns the same actual person.
227 Link to another patient resource that concerns the same actual patient.
228 """
230 resource_type = "PatientLink"
232 def __init__(self, jsondict=None, strict=True):
233 """ Initialize all valid properties.
235 :raises: FHIRValidationError on validation errors, unless strict is False
236 :param dict jsondict: A JSON dictionary to use for initialization
237 :param bool strict: If True (the default), invalid variables will raise a TypeError
238 """
240 self.other = None
241 """ The other patient or related person resource that the link refers
242 to.
243 Type `FHIRReference` (represented as `dict` in JSON). """
245 self.type = None
246 """ replaced-by | replaces | refer | seealso.
247 Type `str`. """
249 super(PatientLink, self).__init__(jsondict=jsondict, strict=strict)
251 def elementProperties(self):
252 js = super(PatientLink, self).elementProperties()
253 js.extend([
254 ("other", "other", fhirreference.FHIRReference, False, None, True),
255 ("type", "type", str, False, None, True),
256 ])
257 return js
260import sys
261try:
262 from . import address
263except ImportError:
264 address = sys.modules[__package__ + '.address']
265try:
266 from . import attachment
267except ImportError:
268 attachment = sys.modules[__package__ + '.attachment']
269try:
270 from . import codeableconcept
271except ImportError:
272 codeableconcept = sys.modules[__package__ + '.codeableconcept']
273try:
274 from . import contactpoint
275except ImportError:
276 contactpoint = sys.modules[__package__ + '.contactpoint']
277try:
278 from . import fhirdate
279except ImportError:
280 fhirdate = sys.modules[__package__ + '.fhirdate']
281try:
282 from . import fhirreference
283except ImportError:
284 fhirreference = sys.modules[__package__ + '.fhirreference']
285try:
286 from . import humanname
287except ImportError:
288 humanname = sys.modules[__package__ + '.humanname']
289try:
290 from . import identifier
291except ImportError:
292 identifier = sys.modules[__package__ + '.identifier']
293try:
294 from . import period
295except ImportError:
296 period = sys.modules[__package__ + '.period']