Coverage for /home/martinb/workspace/client-py/fhirclient/models/resource.py : 89%

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/Resource) on 2021-05-18.
5# 2021, SMART Health IT.
8from . import fhirabstractresource
10class Resource(fhirabstractresource.FHIRAbstractResource):
11 """ Base Resource.
13 This is the base resource type for everything.
14 """
16 resource_type = "Resource"
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.id = None
27 """ Logical id of this artifact.
28 Type `str`. """
30 self.implicitRules = None
31 """ A set of rules under which this content was created.
32 Type `str`. """
34 self.language = None
35 """ Language of the resource content.
36 Type `str`. """
38 self.meta = None
39 """ Metadata about the resource.
40 Type `Meta` (represented as `dict` in JSON). """
42 super(Resource, self).__init__(jsondict=jsondict, strict=strict)
44 def elementProperties(self):
45 js = super(Resource, self).elementProperties()
46 js.extend([
47 ("id", "id", str, False, None, False),
48 ("implicitRules", "implicitRules", str, False, None, False),
49 ("language", "language", str, False, None, False),
50 ("meta", "meta", meta.Meta, False, None, False),
51 ])
52 return js
55import sys
56try:
57 from . import meta
58except ImportError:
59 meta = sys.modules[__package__ + '.meta']