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

5# 2021, SMART Health IT. 

6 

7 

8from . import element 

9 

10class Attachment(element.Element): 

11 """ Content in a format defined elsewhere. 

12  

13 For referring to data content defined in other formats. 

14 """ 

15 

16 resource_type = "Attachment" 

17 

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

19 """ Initialize all valid properties. 

20  

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

25 

26 self.contentType = None 

27 """ Mime type of the content, with charset etc.. 

28 Type `str`. """ 

29 

30 self.creation = None 

31 """ Date attachment was first created. 

32 Type `FHIRDate` (represented as `str` in JSON). """ 

33 

34 self.data = None 

35 """ Data inline, base64ed. 

36 Type `str`. """ 

37 

38 self.hash = None 

39 """ Hash of the data (sha-1, base64ed). 

40 Type `str`. """ 

41 

42 self.language = None 

43 """ Human language of the content (BCP-47). 

44 Type `str`. """ 

45 

46 self.size = None 

47 """ Number of bytes of content (if url provided). 

48 Type `int`. """ 

49 

50 self.title = None 

51 """ Label to display in place of the data. 

52 Type `str`. """ 

53 

54 self.url = None 

55 """ Uri where the data can be found. 

56 Type `str`. """ 

57 

58 super(Attachment, self).__init__(jsondict=jsondict, strict=strict) 

59 

60 def elementProperties(self): 

61 js = super(Attachment, self).elementProperties() 

62 js.extend([ 

63 ("contentType", "contentType", str, False, None, False), 

64 ("creation", "creation", fhirdate.FHIRDate, False, None, False), 

65 ("data", "data", str, False, None, False), 

66 ("hash", "hash", str, False, None, False), 

67 ("language", "language", str, False, None, False), 

68 ("size", "size", int, False, None, False), 

69 ("title", "title", str, False, None, False), 

70 ("url", "url", str, False, None, False), 

71 ]) 

72 return js 

73 

74 

75import sys 

76try: 

77 from . import fhirdate 

78except ImportError: 

79 fhirdate = sys.modules[__package__ + '.fhirdate']