Coverage for /home/martinb/workspace/client-py/fhirclient/models/triggerdefinition.py : 42%

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/TriggerDefinition) on 2021-05-18.
5# 2021, SMART Health IT.
8from . import element
10class TriggerDefinition(element.Element):
11 """ Defines an expected trigger for a module.
13 A description of a triggering event. Triggering events can be named events,
14 data events, or periodic, as determined by the type element.
15 """
17 resource_type = "TriggerDefinition"
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.condition = None
28 """ Whether the event triggers (boolean expression).
29 Type `Expression` (represented as `dict` in JSON). """
31 self.data = None
32 """ Triggering data of the event (multiple = 'and').
33 List of `DataRequirement` items (represented as `dict` in JSON). """
35 self.name = None
36 """ Name or URI that identifies the event.
37 Type `str`. """
39 self.timingDate = None
40 """ Timing of the event.
41 Type `FHIRDate` (represented as `str` in JSON). """
43 self.timingDateTime = None
44 """ Timing of the event.
45 Type `FHIRDate` (represented as `str` in JSON). """
47 self.timingReference = None
48 """ Timing of the event.
49 Type `FHIRReference` (represented as `dict` in JSON). """
51 self.timingTiming = None
52 """ Timing of the event.
53 Type `Timing` (represented as `dict` in JSON). """
55 self.type = None
56 """ named-event | periodic | data-changed | data-added | data-modified
57 | data-removed | data-accessed | data-access-ended.
58 Type `str`. """
60 super(TriggerDefinition, self).__init__(jsondict=jsondict, strict=strict)
62 def elementProperties(self):
63 js = super(TriggerDefinition, self).elementProperties()
64 js.extend([
65 ("condition", "condition", expression.Expression, False, None, False),
66 ("data", "data", datarequirement.DataRequirement, True, None, False),
67 ("name", "name", str, False, None, False),
68 ("timingDate", "timingDate", fhirdate.FHIRDate, False, "timing", False),
69 ("timingDateTime", "timingDateTime", fhirdate.FHIRDate, False, "timing", False),
70 ("timingReference", "timingReference", fhirreference.FHIRReference, False, "timing", False),
71 ("timingTiming", "timingTiming", timing.Timing, False, "timing", False),
72 ("type", "type", str, False, None, True),
73 ])
74 return js
77import sys
78try:
79 from . import datarequirement
80except ImportError:
81 datarequirement = sys.modules[__package__ + '.datarequirement']
82try:
83 from . import expression
84except ImportError:
85 expression = sys.modules[__package__ + '.expression']
86try:
87 from . import fhirdate
88except ImportError:
89 fhirdate = sys.modules[__package__ + '.fhirdate']
90try:
91 from . import fhirreference
92except ImportError:
93 fhirreference = sys.modules[__package__ + '.fhirreference']
94try:
95 from . import timing
96except ImportError:
97 timing = sys.modules[__package__ + '.timing']