Coverage for /home/martinb/workspace/client-py/fhirclient/models/signature.py : 41%

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/Signature) on 2021-05-18.
5# 2021, SMART Health IT.
8from . import element
10class Signature(element.Element):
11 """ A Signature - XML DigSig, JWS, Graphical image of signature, etc..
13 A signature along with supporting context. The signature may be a digital
14 signature that is cryptographic in nature, or some other signature
15 acceptable to the domain. This other signature may be as simple as a
16 graphical image representing a hand-written signature, or a signature
17 ceremony Different signature approaches have different utilities.
18 """
20 resource_type = "Signature"
22 def __init__(self, jsondict=None, strict=True):
23 """ Initialize all valid properties.
25 :raises: FHIRValidationError on validation errors, unless strict is False
26 :param dict jsondict: A JSON dictionary to use for initialization
27 :param bool strict: If True (the default), invalid variables will raise a TypeError
28 """
30 self.data = None
31 """ The actual signature content (XML DigSig. JWS, picture, etc.).
32 Type `str`. """
34 self.onBehalfOf = None
35 """ The party represented.
36 Type `FHIRReference` (represented as `dict` in JSON). """
38 self.sigFormat = None
39 """ The technical format of the signature.
40 Type `str`. """
42 self.targetFormat = None
43 """ The technical format of the signed resources.
44 Type `str`. """
46 self.type = None
47 """ Indication of the reason the entity signed the object(s).
48 List of `Coding` items (represented as `dict` in JSON). """
50 self.when = None
51 """ When the signature was created.
52 Type `FHIRDate` (represented as `str` in JSON). """
54 self.who = None
55 """ Who signed.
56 Type `FHIRReference` (represented as `dict` in JSON). """
58 super(Signature, self).__init__(jsondict=jsondict, strict=strict)
60 def elementProperties(self):
61 js = super(Signature, self).elementProperties()
62 js.extend([
63 ("data", "data", str, False, None, False),
64 ("onBehalfOf", "onBehalfOf", fhirreference.FHIRReference, False, None, False),
65 ("sigFormat", "sigFormat", str, False, None, False),
66 ("targetFormat", "targetFormat", str, False, None, False),
67 ("type", "type", coding.Coding, True, None, True),
68 ("when", "when", fhirdate.FHIRDate, False, None, True),
69 ("who", "who", fhirreference.FHIRReference, False, None, True),
70 ])
71 return js
74import sys
75try:
76 from . import coding
77except ImportError:
78 coding = sys.modules[__package__ + '.coding']
79try:
80 from . import fhirdate
81except ImportError:
82 fhirdate = sys.modules[__package__ + '.fhirdate']
83try:
84 from . import fhirreference
85except ImportError:
86 fhirreference = sys.modules[__package__ + '.fhirreference']