Coverage for /home/martinb/workspace/client-py/fhirclient/models/humanname.py : 90%

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/HumanName) on 2021-05-18.
5# 2021, SMART Health IT.
8from . import element
10class HumanName(element.Element):
11 """ Name of a human - parts and usage.
13 A human's name with the ability to identify parts and usage.
14 """
16 resource_type = "HumanName"
18 def __init__(self, jsondict=None, strict=True):
19 """ Initialize all valid properties.
21 :raises: FHIRValidationError on validation errors, unless strict is False
22 :param dict jsondict: A JSON dictionary to use for initialization
23 :param bool strict: If True (the default), invalid variables will raise a TypeError
24 """
26 self.family = None
27 """ Family name (often called 'Surname').
28 Type `str`. """
30 self.given = None
31 """ Given names (not always 'first'). Includes middle names.
32 List of `str` items. """
34 self.period = None
35 """ Time period when name was/is in use.
36 Type `Period` (represented as `dict` in JSON). """
38 self.prefix = None
39 """ Parts that come before the name.
40 List of `str` items. """
42 self.suffix = None
43 """ Parts that come after the name.
44 List of `str` items. """
46 self.text = None
47 """ Text representation of the full name.
48 Type `str`. """
50 self.use = None
51 """ usual | official | temp | nickname | anonymous | old | maiden.
52 Type `str`. """
54 super(HumanName, self).__init__(jsondict=jsondict, strict=strict)
56 def elementProperties(self):
57 js = super(HumanName, self).elementProperties()
58 js.extend([
59 ("family", "family", str, False, None, False),
60 ("given", "given", str, True, None, False),
61 ("period", "period", period.Period, False, None, False),
62 ("prefix", "prefix", str, True, None, False),
63 ("suffix", "suffix", str, True, None, False),
64 ("text", "text", str, False, None, False),
65 ("use", "use", str, False, None, False),
66 ])
67 return js
70import sys
71try:
72 from . import period
73except ImportError:
74 period = sys.modules[__package__ + '.period']