Hide keyboard shortcuts

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/Dosage) on 2021-05-18. 

5# 2021, SMART Health IT. 

6 

7 

8from . import backboneelement 

9 

10class Dosage(backboneelement.BackboneElement): 

11 """ How the medication is/was taken or should be taken. 

12  

13 Indicates how the medication is/was taken or should be taken by the 

14 patient. 

15 """ 

16 

17 resource_type = "Dosage" 

18 

19 def __init__(self, jsondict=None, strict=True): 

20 """ Initialize all valid properties. 

21  

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 """ 

26 

27 self.additionalInstruction = None 

28 """ Supplemental instruction or warnings to the patient - e.g. "with 

29 meals", "may cause drowsiness". 

30 List of `CodeableConcept` items (represented as `dict` in JSON). """ 

31 

32 self.asNeededBoolean = None 

33 """ Take "as needed" (for x). 

34 Type `bool`. """ 

35 

36 self.asNeededCodeableConcept = None 

37 """ Take "as needed" (for x). 

38 Type `CodeableConcept` (represented as `dict` in JSON). """ 

39 

40 self.doseAndRate = None 

41 """ Amount of medication administered. 

42 List of `DosageDoseAndRate` items (represented as `dict` in JSON). """ 

43 

44 self.maxDosePerAdministration = None 

45 """ Upper limit on medication per administration. 

46 Type `Quantity` (represented as `dict` in JSON). """ 

47 

48 self.maxDosePerLifetime = None 

49 """ Upper limit on medication per lifetime of the patient. 

50 Type `Quantity` (represented as `dict` in JSON). """ 

51 

52 self.maxDosePerPeriod = None 

53 """ Upper limit on medication per unit of time. 

54 Type `Ratio` (represented as `dict` in JSON). """ 

55 

56 self.method = None 

57 """ Technique for administering medication. 

58 Type `CodeableConcept` (represented as `dict` in JSON). """ 

59 

60 self.patientInstruction = None 

61 """ Patient or consumer oriented instructions. 

62 Type `str`. """ 

63 

64 self.route = None 

65 """ How drug should enter body. 

66 Type `CodeableConcept` (represented as `dict` in JSON). """ 

67 

68 self.sequence = None 

69 """ The order of the dosage instructions. 

70 Type `int`. """ 

71 

72 self.site = None 

73 """ Body site to administer to. 

74 Type `CodeableConcept` (represented as `dict` in JSON). """ 

75 

76 self.text = None 

77 """ Free text dosage instructions e.g. SIG. 

78 Type `str`. """ 

79 

80 self.timing = None 

81 """ When medication should be administered. 

82 Type `Timing` (represented as `dict` in JSON). """ 

83 

84 super(Dosage, self).__init__(jsondict=jsondict, strict=strict) 

85 

86 def elementProperties(self): 

87 js = super(Dosage, self).elementProperties() 

88 js.extend([ 

89 ("additionalInstruction", "additionalInstruction", codeableconcept.CodeableConcept, True, None, False), 

90 ("asNeededBoolean", "asNeededBoolean", bool, False, "asNeeded", False), 

91 ("asNeededCodeableConcept", "asNeededCodeableConcept", codeableconcept.CodeableConcept, False, "asNeeded", False), 

92 ("doseAndRate", "doseAndRate", DosageDoseAndRate, True, None, False), 

93 ("maxDosePerAdministration", "maxDosePerAdministration", quantity.Quantity, False, None, False), 

94 ("maxDosePerLifetime", "maxDosePerLifetime", quantity.Quantity, False, None, False), 

95 ("maxDosePerPeriod", "maxDosePerPeriod", ratio.Ratio, False, None, False), 

96 ("method", "method", codeableconcept.CodeableConcept, False, None, False), 

97 ("patientInstruction", "patientInstruction", str, False, None, False), 

98 ("route", "route", codeableconcept.CodeableConcept, False, None, False), 

99 ("sequence", "sequence", int, False, None, False), 

100 ("site", "site", codeableconcept.CodeableConcept, False, None, False), 

101 ("text", "text", str, False, None, False), 

102 ("timing", "timing", timing.Timing, False, None, False), 

103 ]) 

104 return js 

105 

106 

107from . import element 

108 

109class DosageDoseAndRate(element.Element): 

110 """ Amount of medication administered. 

111  

112 The amount of medication administered. 

113 """ 

114 

115 resource_type = "DosageDoseAndRate" 

116 

117 def __init__(self, jsondict=None, strict=True): 

118 """ Initialize all valid properties. 

119  

120 :raises: FHIRValidationError on validation errors, unless strict is False 

121 :param dict jsondict: A JSON dictionary to use for initialization 

122 :param bool strict: If True (the default), invalid variables will raise a TypeError 

123 """ 

124 

125 self.doseQuantity = None 

126 """ Amount of medication per dose. 

127 Type `Quantity` (represented as `dict` in JSON). """ 

128 

129 self.doseRange = None 

130 """ Amount of medication per dose. 

131 Type `Range` (represented as `dict` in JSON). """ 

132 

133 self.rateQuantity = None 

134 """ Amount of medication per unit of time. 

135 Type `Quantity` (represented as `dict` in JSON). """ 

136 

137 self.rateRange = None 

138 """ Amount of medication per unit of time. 

139 Type `Range` (represented as `dict` in JSON). """ 

140 

141 self.rateRatio = None 

142 """ Amount of medication per unit of time. 

143 Type `Ratio` (represented as `dict` in JSON). """ 

144 

145 self.type = None 

146 """ The kind of dose or rate specified. 

147 Type `CodeableConcept` (represented as `dict` in JSON). """ 

148 

149 super(DosageDoseAndRate, self).__init__(jsondict=jsondict, strict=strict) 

150 

151 def elementProperties(self): 

152 js = super(DosageDoseAndRate, self).elementProperties() 

153 js.extend([ 

154 ("doseQuantity", "doseQuantity", quantity.Quantity, False, "dose", False), 

155 ("doseRange", "doseRange", range.Range, False, "dose", False), 

156 ("rateQuantity", "rateQuantity", quantity.Quantity, False, "rate", False), 

157 ("rateRange", "rateRange", range.Range, False, "rate", False), 

158 ("rateRatio", "rateRatio", ratio.Ratio, False, "rate", False), 

159 ("type", "type", codeableconcept.CodeableConcept, False, None, False), 

160 ]) 

161 return js 

162 

163 

164import sys 

165try: 

166 from . import codeableconcept 

167except ImportError: 

168 codeableconcept = sys.modules[__package__ + '.codeableconcept'] 

169try: 

170 from . import quantity 

171except ImportError: 

172 quantity = sys.modules[__package__ + '.quantity'] 

173try: 

174 from . import range 

175except ImportError: 

176 range = sys.modules[__package__ + '.range'] 

177try: 

178 from . import ratio 

179except ImportError: 

180 ratio = sys.modules[__package__ + '.ratio'] 

181try: 

182 from . import timing 

183except ImportError: 

184 timing = sys.modules[__package__ + '.timing']