Coverage for /home/martinb/workspace/client-py/fhirclient/models/datarequirement.py : 38%

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/DataRequirement) on 2021-05-18.
5# 2021, SMART Health IT.
8from . import element
10class DataRequirement(element.Element):
11 """ Describes a required data item.
13 Describes a required data item for evaluation in terms of the type of data,
14 and optional code or date-based filters of the data.
15 """
17 resource_type = "DataRequirement"
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.codeFilter = None
28 """ What codes are expected.
29 List of `DataRequirementCodeFilter` items (represented as `dict` in JSON). """
31 self.dateFilter = None
32 """ What dates/date ranges are expected.
33 List of `DataRequirementDateFilter` items (represented as `dict` in JSON). """
35 self.limit = None
36 """ Number of results.
37 Type `int`. """
39 self.mustSupport = None
40 """ Indicates specific structure elements that are referenced by the
41 knowledge module.
42 List of `str` items. """
44 self.profile = None
45 """ The profile of the required data.
46 List of `str` items. """
48 self.sort = None
49 """ Order of the results.
50 List of `DataRequirementSort` items (represented as `dict` in JSON). """
52 self.subjectCodeableConcept = None
53 """ E.g. Patient, Practitioner, RelatedPerson, Organization, Location,
54 Device.
55 Type `CodeableConcept` (represented as `dict` in JSON). """
57 self.subjectReference = None
58 """ E.g. Patient, Practitioner, RelatedPerson, Organization, Location,
59 Device.
60 Type `FHIRReference` (represented as `dict` in JSON). """
62 self.type = None
63 """ The type of the required data.
64 Type `str`. """
66 super(DataRequirement, self).__init__(jsondict=jsondict, strict=strict)
68 def elementProperties(self):
69 js = super(DataRequirement, self).elementProperties()
70 js.extend([
71 ("codeFilter", "codeFilter", DataRequirementCodeFilter, True, None, False),
72 ("dateFilter", "dateFilter", DataRequirementDateFilter, True, None, False),
73 ("limit", "limit", int, False, None, False),
74 ("mustSupport", "mustSupport", str, True, None, False),
75 ("profile", "profile", str, True, None, False),
76 ("sort", "sort", DataRequirementSort, True, None, False),
77 ("subjectCodeableConcept", "subjectCodeableConcept", codeableconcept.CodeableConcept, False, "subject", False),
78 ("subjectReference", "subjectReference", fhirreference.FHIRReference, False, "subject", False),
79 ("type", "type", str, False, None, True),
80 ])
81 return js
84class DataRequirementCodeFilter(element.Element):
85 """ What codes are expected.
87 Code filters specify additional constraints on the data, specifying the
88 value set of interest for a particular element of the data. Each code
89 filter defines an additional constraint on the data, i.e. code filters are
90 AND'ed, not OR'ed.
91 """
93 resource_type = "DataRequirementCodeFilter"
95 def __init__(self, jsondict=None, strict=True):
96 """ Initialize all valid properties.
98 :raises: FHIRValidationError on validation errors, unless strict is False
99 :param dict jsondict: A JSON dictionary to use for initialization
100 :param bool strict: If True (the default), invalid variables will raise a TypeError
101 """
103 self.code = None
104 """ What code is expected.
105 List of `Coding` items (represented as `dict` in JSON). """
107 self.path = None
108 """ A code-valued attribute to filter on.
109 Type `str`. """
111 self.searchParam = None
112 """ A coded (token) parameter to search on.
113 Type `str`. """
115 self.valueSet = None
116 """ Valueset for the filter.
117 Type `str`. """
119 super(DataRequirementCodeFilter, self).__init__(jsondict=jsondict, strict=strict)
121 def elementProperties(self):
122 js = super(DataRequirementCodeFilter, self).elementProperties()
123 js.extend([
124 ("code", "code", coding.Coding, True, None, False),
125 ("path", "path", str, False, None, False),
126 ("searchParam", "searchParam", str, False, None, False),
127 ("valueSet", "valueSet", str, False, None, False),
128 ])
129 return js
132class DataRequirementDateFilter(element.Element):
133 """ What dates/date ranges are expected.
135 Date filters specify additional constraints on the data in terms of the
136 applicable date range for specific elements. Each date filter specifies an
137 additional constraint on the data, i.e. date filters are AND'ed, not OR'ed.
138 """
140 resource_type = "DataRequirementDateFilter"
142 def __init__(self, jsondict=None, strict=True):
143 """ Initialize all valid properties.
145 :raises: FHIRValidationError on validation errors, unless strict is False
146 :param dict jsondict: A JSON dictionary to use for initialization
147 :param bool strict: If True (the default), invalid variables will raise a TypeError
148 """
150 self.path = None
151 """ A date-valued attribute to filter on.
152 Type `str`. """
154 self.searchParam = None
155 """ A date valued parameter to search on.
156 Type `str`. """
158 self.valueDateTime = None
159 """ The value of the filter, as a Period, DateTime, or Duration value.
160 Type `FHIRDate` (represented as `str` in JSON). """
162 self.valueDuration = None
163 """ The value of the filter, as a Period, DateTime, or Duration value.
164 Type `Duration` (represented as `dict` in JSON). """
166 self.valuePeriod = None
167 """ The value of the filter, as a Period, DateTime, or Duration value.
168 Type `Period` (represented as `dict` in JSON). """
170 super(DataRequirementDateFilter, self).__init__(jsondict=jsondict, strict=strict)
172 def elementProperties(self):
173 js = super(DataRequirementDateFilter, self).elementProperties()
174 js.extend([
175 ("path", "path", str, False, None, False),
176 ("searchParam", "searchParam", str, False, None, False),
177 ("valueDateTime", "valueDateTime", fhirdate.FHIRDate, False, "value", False),
178 ("valueDuration", "valueDuration", duration.Duration, False, "value", False),
179 ("valuePeriod", "valuePeriod", period.Period, False, "value", False),
180 ])
181 return js
184class DataRequirementSort(element.Element):
185 """ Order of the results.
187 Specifies the order of the results to be returned.
188 """
190 resource_type = "DataRequirementSort"
192 def __init__(self, jsondict=None, strict=True):
193 """ Initialize all valid properties.
195 :raises: FHIRValidationError on validation errors, unless strict is False
196 :param dict jsondict: A JSON dictionary to use for initialization
197 :param bool strict: If True (the default), invalid variables will raise a TypeError
198 """
200 self.direction = None
201 """ ascending | descending.
202 Type `str`. """
204 self.path = None
205 """ The name of the attribute to perform the sort.
206 Type `str`. """
208 super(DataRequirementSort, self).__init__(jsondict=jsondict, strict=strict)
210 def elementProperties(self):
211 js = super(DataRequirementSort, self).elementProperties()
212 js.extend([
213 ("direction", "direction", str, False, None, True),
214 ("path", "path", str, False, None, True),
215 ])
216 return js
219import sys
220try:
221 from . import codeableconcept
222except ImportError:
223 codeableconcept = sys.modules[__package__ + '.codeableconcept']
224try:
225 from . import coding
226except ImportError:
227 coding = sys.modules[__package__ + '.coding']
228try:
229 from . import duration
230except ImportError:
231 duration = sys.modules[__package__ + '.duration']
232try:
233 from . import fhirdate
234except ImportError:
235 fhirdate = sys.modules[__package__ + '.fhirdate']
236try:
237 from . import fhirreference
238except ImportError:
239 fhirreference = sys.modules[__package__ + '.fhirreference']
240try:
241 from . import period
242except ImportError:
243 period = sys.modules[__package__ + '.period']