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

5# 2021, SMART Health IT. 

6 

7 

8from . import element 

9 

10class Ratio(element.Element): 

11 """ A ratio of two Quantity values - a numerator and a denominator. 

12  

13 A relationship of two Quantity values - expressed as a numerator and a 

14 denominator. 

15 """ 

16 

17 resource_type = "Ratio" 

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.denominator = None 

28 """ Denominator value. 

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

30 

31 self.numerator = None 

32 """ Numerator value. 

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

34 

35 super(Ratio, self).__init__(jsondict=jsondict, strict=strict) 

36 

37 def elementProperties(self): 

38 js = super(Ratio, self).elementProperties() 

39 js.extend([ 

40 ("denominator", "denominator", quantity.Quantity, False, None, False), 

41 ("numerator", "numerator", quantity.Quantity, False, None, False), 

42 ]) 

43 return js 

44 

45 

46import sys 

47try: 

48 from . import quantity 

49except ImportError: 

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