Coverage for /home/martinb/workspace/client-py/fhirclient/models/reference.py : 89%

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/Reference) on 2021-05-18.
5# 2021, SMART Health IT.
8from . import element
10class Reference(element.Element):
11 """ A reference from one resource to another.
12 """
14 resource_type = "Reference"
16 def __init__(self, jsondict=None, strict=True):
17 """ Initialize all valid properties.
19 :raises: FHIRValidationError on validation errors, unless strict is False
20 :param dict jsondict: A JSON dictionary to use for initialization
21 :param bool strict: If True (the default), invalid variables will raise a TypeError
22 """
24 self.display = None
25 """ Text alternative for the resource.
26 Type `str`. """
28 self.identifier = None
29 """ Logical reference, when literal reference is not known.
30 Type `Identifier` (represented as `dict` in JSON). """
32 self.reference = None
33 """ Literal reference, Relative, internal or absolute URL.
34 Type `str`. """
36 self.type = None
37 """ Type the reference refers to (e.g. "Patient").
38 Type `str`. """
40 super(Reference, self).__init__(jsondict=jsondict, strict=strict)
42 def elementProperties(self):
43 js = super(Reference, self).elementProperties()
44 js.extend([
45 ("display", "display", str, False, None, False),
46 ("identifier", "identifier", identifier.Identifier, False, None, False),
47 ("reference", "reference", str, False, None, False),
48 ("type", "type", str, False, None, False),
49 ])
50 return js
53import sys
54try:
55 from . import identifier
56except ImportError:
57 identifier = sys.modules[__package__ + '.identifier']