3
>>> from mlhim.oship.rm.data_structures.item_structure.representation import Element
4
>>> from mlhim.oship.rm.data_structures import DataStructure
5
>>> from mlhim.oship.rm.data_structures.item_structure import *
6
>>> from mlhim.oship.rm.data_structures.item_structure.interfaces import *
7
>>> from mlhim.oship.rm.data_structures.history import IntervalEvent, PointEvent
8
>>> from mlhim.oship.rm.data_structures.item_structure.representation import (Item,
10
>>> from mlhim.oship.rm.data_structures.item_structure.representation.interfaces import IItem
11
>>> from mlhim.oship.rm.data_structures.history.interfaces import IIntervalEvent
12
>>> from mlhim.oship.rm.data_structures.interfaces import IDataStructure
13
>>> from mlhim.oship.rm.support.identification import TerminologyId, Uid
14
>>> from mlhim.oship.rm.datatypes.text import DvText, CodePhrase, TermMapping
15
>>> from mlhim.oship.rm.datatypes.uri import DvUri
16
>>> from mlhim.oship.rm.datatypes.quantity.datetime import DvDateTime, DvTime
17
>>> from mlhim.oship.rm.datatypes.quantity import DvAmount
20
>>> tid1 = TerminologyId(u"SNOMED-CT(2003)")
21
>>> tid2 = TerminologyId(u"ISO_639-1")
22
>>> tid3 = TerminologyId(u"10646-1:1993")
23
>>> tid4 = TerminologyId(u"ISO_8601")
24
>>> cpm1 = CodePhrase(tid1, u"abc123")
25
>>> tm1 = TermMapping(cpm1, u"=",None)
26
>>> cplang1 = CodePhrase(tid2, u"en")
27
>>> cpenc1 = CodePhrase(tid3, u"utf-8")
28
>>> uri1 = DvUri(u"http://www.oship.org")
29
>>> elementValue1 = DvText(u"abc123", [tm1,], u"font-family:Arial", uri1, cplang1, cpenc1)
30
>>> element1 = Element(elementValue1, None, u"at0001", None, None, None, None, None, None)
31
>>> txt1 = DvText(u"Some really interesting ReferenceRange.", [tm1,], u"font-family:Arial", uri1, cplang1, cpenc1)
32
>>> archNodeId1 = CodePhrase(tid1, u"at0042")
33
>>> uid1 = Uid(u"HL7v3_uid_data")
34
>>> time1 = DvTime(u"T19:20:30", None, None, None, None, None)
35
>>> time2 = DvDateTime(u"9999/01/01T19:20:30", None, None, None, None, None)
36
>>> amount1 = DvAmount(None, None, None, None, None, None)
37
>>> data1 = u"some data"
38
>>> name1 = u"some name"
40
>>> ds1 = DataStructure(uid1, archNodeId1, None, None, None, uri1, None)
43
>>> ds1.archetypeNodeId.codeString
46
u'http://www.oship.org'
47
>>> IDataStructure.providedBy(ds1)
50
>>> item1 = ItemStructure(uid1, archNodeId1, name1, None, None, uri1, None)
53
>>> IItemStructure.providedBy(item1)
56
>>> ie1 = IntervalEvent(amount1, u"y = 3*x", None)
59
>>> IIntervalEvent.providedBy(ie1)
62
>>> point1 = PointEvent(time1, data1, None, None, None, None, None, None, None)
66
>>> item2 = Item(uid1, archNodeId1, name1, None, None, uri1, item1)
69
>>> IItem.providedBy(item2)
72
>>> il1 = ItemList(uid1, archNodeId1, name1, None, None, uri1, None, [element1, element1])
73
>>> IItemList.providedBy(il1)
76
>>> item3 = ItemSingle(uid1, archNodeId1, name1, None, None, uri1, None, element1)
77
>>> IItemSingle.providedBy(item3)
80
>>> itable1 = ItemTable(uid1, archNodeId1, name1, None, None, uri1, None, [element1, element1])
81
>>> IItemTable.providedBy(itable1)
84
>>> itree1 = ItemTree(None, u"at0066", None, None, None, None, [element1], None)
85
>>> IItemTree.providedBy(itree1)
88
>>> cluster1 = Cluster(uid1, archNodeId1, name1, None, None, uri1, [element1, element1], None)
89
>>> ICluster.providedBy(cluster1)
92
>>> element1 = Element(None, None, archNodeId1, uid1, name1, None, None, uri1, None)
93
>>> IElement.providedBy(element1)