0
# Patient Resources
1
2
Comprehensive patient demographics and identity management for healthcare systems. Patient resources capture essential demographic information, contact details, communication preferences, emergency contacts, and care provider relationships.
3
4
## Capabilities
5
6
### Patient Demographics
7
8
Core patient demographic information including names, addresses, gender, birth date, and vital status.
9
10
```python { .api }
11
class Patient(DomainResource):
12
"""Patient demographics and identity information"""
13
def __init__(
14
self,
15
# Identity and demographics
16
identifier: Optional[List["Identifier"]] = None,
17
active: Optional[bool] = None,
18
name: Optional[List["HumanName"]] = None,
19
telecom: Optional[List["ContactPoint"]] = None,
20
gender: Optional[str] = None, # male | female | other | unknown
21
birthDate: Optional[str] = None, # Date
22
deceasedBoolean: Optional[bool] = None,
23
deceasedDateTime: Optional[str] = None, # DateTime
24
address: Optional[List["Address"]] = None,
25
26
# Marital and family status
27
maritalStatus: Optional["CodeableConcept"] = None,
28
multipleBirthBoolean: Optional[bool] = None,
29
multipleBirthInteger: Optional[int] = None,
30
31
# Visual and documentation
32
photo: Optional[List["Attachment"]] = None,
33
34
# Contacts and relationships
35
contact: Optional[List["PatientContact"]] = None,
36
37
# Communication preferences
38
communication: Optional[List["PatientCommunication"]] = None,
39
40
# Care providers
41
generalPractitioner: Optional[List["Reference"]] = None,
42
managingOrganization: Optional["Reference"] = None,
43
44
# Links to other patients
45
link: Optional[List["PatientLink"]] = None,
46
47
**kwargs
48
): ...
49
```
50
51
**Usage Example:**
52
53
```python
54
from fhir.resources.patient import Patient
55
from fhir.resources.humanname import HumanName
56
from fhir.resources.identifier import Identifier
57
from fhir.resources.address import Address
58
from fhir.resources.contactpoint import ContactPoint
59
60
# Create comprehensive patient record
61
patient = Patient(
62
id="patient-001",
63
active=True,
64
identifier=[
65
Identifier(
66
use="usual",
67
type=CodeableConcept(
68
coding=[Coding(
69
system="http://terminology.hl7.org/CodeSystem/v2-0203",
70
code="MR",
71
display="Medical Record Number"
72
)]
73
),
74
system="http://hospital.example.org/patients",
75
value="MRN789456"
76
)
77
],
78
name=[
79
HumanName(
80
use="official",
81
family="Smith",
82
given=["Jane", "Marie"],
83
prefix=["Ms."]
84
)
85
],
86
telecom=[
87
ContactPoint(
88
system="phone",
89
value="555-123-4567",
90
use="home"
91
),
92
ContactPoint(
93
system="email",
94
value="jane.smith@email.com"
95
)
96
],
97
gender="female",
98
birthDate="1985-03-15",
99
address=[
100
Address(
101
use="home",
102
type="postal",
103
line=["456 Oak Avenue"],
104
city="Springfield",
105
state="IL",
106
postalCode="62704",
107
country="US"
108
)
109
]
110
)
111
```
112
113
### Patient Contacts
114
115
Emergency contacts, family members, and other individuals associated with the patient's care.
116
117
```python { .api }
118
class PatientContact:
119
"""Patient contact person information"""
120
def __init__(
121
self,
122
relationship: Optional[List["CodeableConcept"]] = None,
123
name: Optional["HumanName"] = None,
124
telecom: Optional[List["ContactPoint"]] = None,
125
address: Optional["Address"] = None,
126
gender: Optional[str] = None, # male | female | other | unknown
127
organization: Optional["Reference"] = None,
128
period: Optional["Period"] = None
129
): ...
130
```
131
132
**Usage Example:**
133
134
```python
135
from fhir.resources.patient import Patient
136
from fhir.resources.patientcontact import PatientContact
137
from fhir.resources.codeableconcept import CodeableConcept
138
from fhir.resources.coding import Coding
139
140
patient_with_contact = Patient(
141
# ... other patient data ...
142
contact=[
143
PatientContact(
144
relationship=[
145
CodeableConcept(
146
coding=[Coding(
147
system="http://terminology.hl7.org/CodeSystem/v2-0131",
148
code="C",
149
display="Emergency Contact"
150
)]
151
)
152
],
153
name=HumanName(
154
family="Smith",
155
given=["Robert"]
156
),
157
telecom=[
158
ContactPoint(
159
system="phone",
160
value="555-987-6543",
161
use="mobile"
162
)
163
],
164
gender="male"
165
)
166
]
167
)
168
```
169
170
### Communication Preferences
171
172
Patient language preferences and communication needs including interpreters and special requirements.
173
174
```python { .api }
175
class PatientCommunication:
176
"""Patient communication preferences"""
177
def __init__(
178
self,
179
language: "CodeableConcept",
180
preferred: Optional[bool] = None
181
): ...
182
```
183
184
**Usage Example:**
185
186
```python
187
# Patient with multiple language preferences
188
patient_multilingual = Patient(
189
# ... other patient data ...
190
communication=[
191
PatientCommunication(
192
language=CodeableConcept(
193
coding=[Coding(
194
system="urn:ietf:bcp:47",
195
code="en-US",
196
display="English (United States)"
197
)]
198
),
199
preferred=True
200
),
201
PatientCommunication(
202
language=CodeableConcept(
203
coding=[Coding(
204
system="urn:ietf:bcp:47",
205
code="es-MX",
206
display="Spanish (Mexico)"
207
)]
208
),
209
preferred=False
210
)
211
]
212
)
213
```
214
215
### Patient Links
216
217
Links between patient records for merged records, person records, or related patients.
218
219
```python { .api }
220
class PatientLink:
221
"""Link to another Patient resource"""
222
def __init__(
223
self,
224
other: "Reference",
225
type: str # replaced-by | replaces | refer | seealso
226
): ...
227
```
228
229
**Usage Example:**
230
231
```python
232
# Link to merged patient record
233
patient_with_link = Patient(
234
# ... other patient data ...
235
link=[
236
PatientLink(
237
other=Reference(
238
reference="Patient/patient-old-record-123",
239
display="Previous patient record"
240
),
241
type="replaces"
242
)
243
]
244
)
245
```
246
247
### Related Person Resources
248
249
Persons related to the patient who are relevant to their care but are not formal caregivers.
250
251
```python { .api }
252
class RelatedPerson(DomainResource):
253
"""Person related to patient"""
254
def __init__(
255
self,
256
identifier: Optional[List["Identifier"]] = None,
257
active: Optional[bool] = None,
258
patient: "Reference",
259
relationship: Optional[List["CodeableConcept"]] = None,
260
name: Optional[List["HumanName"]] = None,
261
telecom: Optional[List["ContactPoint"]] = None,
262
gender: Optional[str] = None, # male | female | other | unknown
263
birthDate: Optional[str] = None, # Date
264
address: Optional[List["Address"]] = None,
265
photo: Optional[List["Attachment"]] = None,
266
period: Optional["Period"] = None,
267
communication: Optional[List["RelatedPersonCommunication"]] = None,
268
**kwargs
269
): ...
270
```
271
272
**Usage Example:**
273
274
```python
275
from fhir.resources.relatedperson import RelatedPerson
276
277
# Create related person (spouse)
278
spouse = RelatedPerson(
279
active=True,
280
patient=Reference(
281
reference="Patient/patient-001",
282
display="Jane Marie Smith"
283
),
284
relationship=[
285
CodeableConcept(
286
coding=[Coding(
287
system="http://terminology.hl7.org/CodeSystem/v3-RoleCode",
288
code="SPOUSE",
289
display="Spouse"
290
)]
291
)
292
],
293
name=[
294
HumanName(
295
use="official",
296
family="Smith",
297
given=["John", "David"]
298
)
299
],
300
telecom=[
301
ContactPoint(
302
system="phone",
303
value="555-234-5678",
304
use="mobile"
305
)
306
],
307
gender="male"
308
)
309
```
310
311
## Types
312
313
```python { .api }
314
from typing import Optional, List
315
from fhir.resources.domainresource import DomainResource
316
from fhir.resources.address import Address
317
from fhir.resources.attachment import Attachment
318
from fhir.resources.codeableconcept import CodeableConcept
319
from fhir.resources.coding import Coding
320
from fhir.resources.contactpoint import ContactPoint
321
from fhir.resources.humanname import HumanName
322
from fhir.resources.identifier import Identifier
323
from fhir.resources.period import Period
324
from fhir.resources.reference import Reference
325
326
# Patient-specific backbone elements
327
class PatientContact: ...
328
class PatientCommunication: ...
329
class PatientLink: ...
330
class RelatedPersonCommunication: ...
331
```