Coverage for /home/martinb/workspace/client-py/fhirclient/models/period.py : 50%

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/Period) on 2021-05-18.
5# 2021, SMART Health IT.
8from . import element
10class Period(element.Element):
11 """ Time range defined by start and end date/time.
13 A time period defined by a start and end date and optionally time.
14 """
16 resource_type = "Period"
18 def __init__(self, jsondict=None, strict=True):
19 """ Initialize all valid properties.
21 :raises: FHIRValidationError on validation errors, unless strict is False
22 :param dict jsondict: A JSON dictionary to use for initialization
23 :param bool strict: If True (the default), invalid variables will raise a TypeError
24 """
26 self.end = None
27 """ End time with inclusive boundary, if not ongoing.
28 Type `FHIRDate` (represented as `str` in JSON). """
30 self.start = None
31 """ Starting time with inclusive boundary.
32 Type `FHIRDate` (represented as `str` in JSON). """
34 super(Period, self).__init__(jsondict=jsondict, strict=strict)
36 def elementProperties(self):
37 js = super(Period, self).elementProperties()
38 js.extend([
39 ("end", "end", fhirdate.FHIRDate, False, None, False),
40 ("start", "start", fhirdate.FHIRDate, False, None, False),
41 ])
42 return js
45import sys
46try:
47 from . import fhirdate
48except ImportError:
49 fhirdate = sys.modules[__package__ + '.fhirdate']