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

5# 2021, SMART Health IT. 

6 

7 

8from . import element 

9 

10class Quantity(element.Element): 

11 """ A measured or measurable amount. 

12  

13 A measured amount (or an amount that can potentially be measured). Note 

14 that measured amounts include amounts that are not precisely quantified, 

15 including amounts involving arbitrary units and floating currencies. 

16 """ 

17 

18 resource_type = "Quantity" 

19 

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

21 """ Initialize all valid properties. 

22  

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

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

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

26 """ 

27 

28 self.code = None 

29 """ Coded form of the unit. 

30 Type `str`. """ 

31 

32 self.comparator = None 

33 """ < | <= | >= | > - how to understand the value. 

34 Type `str`. """ 

35 

36 self.system = None 

37 """ System that defines coded unit form. 

38 Type `str`. """ 

39 

40 self.unit = None 

41 """ Unit representation. 

42 Type `str`. """ 

43 

44 self.value = None 

45 """ Numerical value (with implicit precision). 

46 Type `float`. """ 

47 

48 super(Quantity, self).__init__(jsondict=jsondict, strict=strict) 

49 

50 def elementProperties(self): 

51 js = super(Quantity, self).elementProperties() 

52 js.extend([ 

53 ("code", "code", str, False, None, False), 

54 ("comparator", "comparator", str, False, None, False), 

55 ("system", "system", str, False, None, False), 

56 ("unit", "unit", str, False, None, False), 

57 ("value", "value", float, False, None, False), 

58 ]) 

59 return js 

60 

61