open_ehr 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. data/Gemfile.lock +22 -20
  2. data/README.rdoc +4 -3
  3. data/Rakefile +0 -5
  4. data/VERSION +1 -1
  5. data/lib/open_ehr/parser/adl_grammar.tt +30 -23
  6. data/lib/open_ehr/parser/cadl_grammar.tt +85 -59
  7. data/lib/open_ehr/parser/cadl_node.rb +18 -0
  8. data/lib/open_ehr/parser/dadl_grammar.tt +1 -1
  9. data/lib/open_ehr/parser/shared_token_grammar.tt +4 -4
  10. data/open_ehr.gemspec +104 -55
  11. data/spec/lib/open_ehr/parser/{adl → adl14}/adl-test-ENTRY.assumed_types.v1.adl +0 -0
  12. data/spec/lib/open_ehr/parser/{adl → adl14}/adl-test-ENTRY.basic_types.v1.adl +0 -0
  13. data/spec/lib/open_ehr/parser/{adl → adl14}/adl-test-ENTRY.basic_types_fail.v1.adl +0 -0
  14. data/spec/lib/open_ehr/parser/{adl → adl14}/adl-test-ENTRY.most_minimal.v1.adl +0 -0
  15. data/spec/lib/open_ehr/parser/{adl → adl14}/adl-test-ENTRY.structure_test1.v1.adl +0 -0
  16. data/spec/lib/open_ehr/parser/adl14/adl-test-SOME_TYPE.generic_type_basic.draft.adl +56 -0
  17. data/spec/lib/open_ehr/parser/adl14/adl-test-SOME_TYPE.generic_type_use_node.draft.adl +63 -0
  18. data/spec/lib/open_ehr/parser/adl14/adl-test-car.paths.test.adl +80 -0
  19. data/spec/lib/open_ehr/parser/adl14/adl-test-car.use_node.test.adl +87 -0
  20. data/spec/lib/open_ehr/parser/adl14/adl-test-composition.dv_coded_text.test.adl +29 -0
  21. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.archetype_bindings.test.adl +47 -0
  22. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.archetype_desc_missing_purpose.test.adl +45 -0
  23. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.archetype_description.test.adl +61 -0
  24. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.archetype_description2.test.adl +45 -0
  25. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.archetype_identification.test.adl +26 -0
  26. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.archetype_internal_ref.test.adl +36 -0
  27. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.archetype_internal_ref2.test.adl +36 -0
  28. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.archetype_language.test.adl +47 -0
  29. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.archetype_language_no_accreditation.test.adl +38 -0
  30. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.archetype_language_order_of_translation_details.test.adl +40 -0
  31. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.archetype_ontology.test.adl +25 -0
  32. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.archetype_slot.test.adl +40 -0
  33. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.archetype_slot.test2.adl +37 -0
  34. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.archetype_uncommonkeys.test.adl +29 -0
  35. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.basic_types.test.adl +272 -0
  36. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.c_code_phrase.test.adl +77 -0
  37. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.c_dv_ordinal.test.adl +66 -0
  38. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.c_dv_quantity_empty.test.adl +46 -0
  39. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.c_dv_quantity_full.test.adl +64 -0
  40. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.c_dv_quantity_full2.test.adl +64 -0
  41. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.c_dv_quantity_full3.test.adl +64 -0
  42. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.c_dv_quantity_item_units_only.test.adl +55 -0
  43. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.c_dv_quantity_list.test.adl +58 -0
  44. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.c_dv_quantity_property.test.adl +47 -0
  45. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.c_dv_quantity_reversed.test.adl +59 -0
  46. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.constraint_binding.test.adl +37 -0
  47. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.constraint_ref.test.adl +43 -0
  48. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.datetime.test.adl +183 -0
  49. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.domain_types.test.adl +97 -0
  50. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.durations.test.adl +111 -0
  51. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.empty_other_contributors.test.adl +42 -0
  52. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.missing_language.test.adl +23 -0
  53. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.mixed_node_types.draft.adl +61 -0
  54. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.most_minimal.test.adl +23 -0
  55. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.multi_language.test.adl +52 -0
  56. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.special_string.test.adl +88 -0
  57. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.structure_test1.test.adl +45 -0
  58. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.structure_test2.test.adl +45 -0
  59. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.term_binding.test.adl +37 -0
  60. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.term_binding2.test.adl +32 -0
  61. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.testtranslations.test.adl +83 -0
  62. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.translations_author_language.test.adl +34 -0
  63. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.translations_language_author.test.adl +34 -0
  64. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.unicode_BOM_support.test.adl +41 -0
  65. data/spec/lib/open_ehr/parser/adl14/adl-test-entry.unicode_support.test.adl +41 -0
  66. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-ACTION.imaging.v1.adl +0 -0
  67. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-ACTION.referral.v1.adl +0 -0
  68. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-CLUSTER.auscultation-chest.v1.adl +0 -0
  69. data/spec/lib/open_ehr/parser/adl14/openEHR-EHR-CLUSTER.auscultation.v1.adl +48 -0
  70. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-CLUSTER.dimensions-circumference.v1.adl +0 -0
  71. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-CLUSTER.dimensions.v1.adl +0 -0
  72. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-CLUSTER.exam-abdomen.v1.adl +0 -0
  73. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-CLUSTER.exam-chest.v1.adl +0 -0
  74. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-CLUSTER.exam-fetus.v1.adl +0 -0
  75. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-CLUSTER.exam-generic-joint.v1.adl +0 -0
  76. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-CLUSTER.exam-generic-lymphnode.v1.adl +0 -0
  77. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-CLUSTER.exam-generic-mass.v1.adl +0 -0
  78. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-CLUSTER.exam-generic.v1.adl +0 -0
  79. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-CLUSTER.exam-nervous_system.v1.adl +0 -0
  80. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-CLUSTER.exam-uterine_cervix.v1.adl +0 -0
  81. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-CLUSTER.exam-uterus.v1.adl +0 -0
  82. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-COMPOSITION.discharge.v1draft.adl +0 -0
  83. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-COMPOSITION.encounter.v1draft.adl +0 -0
  84. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-EVALUATION.adverse.v1.adl +0 -0
  85. data/spec/lib/open_ehr/parser/adl14/openEHR-EHR-EVALUATION.columna_vertebral.v1.adl +85 -0
  86. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-INSTRUCTION.medication.v1.adl +0 -0
  87. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-INSTRUCTION.referral.v1.adl +0 -0
  88. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-ITEM_TREE.Laboratory_request.v1.adl +0 -0
  89. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-ITEM_TREE.follow_up.v1draft.adl +0 -0
  90. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-ITEM_TREE.imaging.v1.adl +0 -0
  91. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-ITEM_TREE.medication-formulation.v1.adl +0 -0
  92. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-ITEM_TREE.medication.v1.adl +0 -0
  93. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-ITEM_TREE.referral.v1.adl +0 -0
  94. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-OBSERVATION.apgar.v1.adl +0 -0
  95. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-OBSERVATION.blood_pressure.v1.adl +0 -0
  96. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-OBSERVATION.body_mass_index.v1.adl +0 -0
  97. data/spec/lib/open_ehr/parser/adl14/openEHR-EHR-OBSERVATION.testassumedvalue.v1.adl +99 -0
  98. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-SECTION.findings.v1.adl +0 -0
  99. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-SECTION.reason_for_encounter.v1.adl +0 -0
  100. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-SECTION.summary.v1.adl +0 -0
  101. data/spec/lib/open_ehr/parser/{adl → adl14}/openEHR-EHR-SECTION.vital_signs.v1.adl +0 -0
  102. data/spec/lib/open_ehr/parser/adl_parser_spec.rb +2 -2
  103. data/spec/lib/open_ehr/parser/adl_path_spec.rb +180 -0
  104. metadata +132 -83
  105. data/bin/adl_validator.rb +0 -84
  106. data/lib/open_ehr/parser/scanner/adl_scanner.rb +0 -819
  107. data/spec/lib/open_ehr/parser/adl/openEHR-EHR-CLUSTER.auscultation.v1.adl +0 -217
  108. data/spec/lib/open_ehr/parser/adl/openEHR-EHR-cadl_sample.v1.adl +0 -9
  109. data/spec/rcov.opts +0 -1
@@ -1,217 +0,0 @@
1
- archetype (adl_version=1.4)
2
- openEHR-EHR-CLUSTER.auscultation.v1
3
-
4
- concept
5
- [at0000] -- Auscultation
6
- language
7
- original_language = <[ISO_639-1::en]>
8
- description
9
- original_author = <
10
- ["name"] = <"Sam Heard">
11
- ["organisation"] = <"Ocean Informatics">
12
- ["date"] = <"7/04/2007">
13
- ["email"] = <"sam.heard@oceaninformatics.biz">
14
- >
15
- details = <
16
- ["en"] = <
17
- language = <[ISO_639-1::en]>
18
- purpose = <"To record data found on examination by auscultation/listening">
19
- use = <"To be embedded in an openEHR-EHR-OBSERVATION.exam cluster to express findings determined by auscultation">
20
- keywords = <"auscultate", "listen", "auscultation", "listening", "bruit", "bowel sounds", "sounds">
21
- misuse = <"Not for use in any other context at present">
22
- >
23
- >
24
- lifecycle_state = <"OrganisationDraft">
25
- other_contributors = <"Heather Leslie", ...>
26
-
27
- definition
28
- CLUSTER[at0000] matches { -- Auscultation
29
- items cardinality matches {0..*; unordered} matches {
30
- CLUSTER[at0001] occurrences matches {0..1} matches { -- Normal Statements
31
- items cardinality matches {0..*; unordered} matches {
32
- ELEMENT[at0003] occurrences matches {0..*} matches { -- Normal Statement
33
- value matches {
34
- DV_CODED_TEXT matches {
35
- defining_code matches {
36
- [local::
37
- at0056, -- No murmur
38
- at0057, -- No bruit
39
- at0073, -- Normal bowel sounds
40
- at0085] -- No abnormality detected
41
- }
42
- }
43
- }
44
- }
45
- }
46
- }
47
- ELEMENT[at0004] occurrences matches {0..1} matches { -- Clinical Description
48
- value matches {
49
- DV_TEXT matches {*}
50
- }
51
- }
52
- CLUSTER[at0002] occurrences matches {0..1} matches { -- Findings
53
- items cardinality matches {0..*; unordered} matches {
54
- CLUSTER[at0009] occurrences matches {0..1} matches { -- Bowel sounds
55
- items cardinality matches {0..*; unordered} matches {
56
- ELEMENT[at0074] occurrences matches {0..*} matches { -- Specific Findings
57
- value matches {
58
- DV_CODED_TEXT matches {
59
- defining_code matches {
60
- [local::
61
- at0078, -- Absent bowel sounds
62
- at0079, -- Decreased bowel sounds
63
- at0080, -- Increased bowel sounds
64
- at0081] -- Tinkling bowel sounds
65
- }
66
- }
67
- }
68
- }
69
- use_node ELEMENT /items[at0004]
70
- }
71
- }
72
- CLUSTER[at0010] occurrences matches {0..1} matches { -- Vessel bruit
73
- items cardinality matches {0..*; unordered} matches {
74
- ELEMENT[at0088] matches { -- Vessel name
75
- value matches {
76
- DV_TEXT matches {*}
77
- }
78
- }
79
- ELEMENT[at0030] occurrences matches {0..1} matches { -- Maximal Location
80
- value matches {
81
- DV_TEXT matches {*}
82
- }
83
- }
84
- ELEMENT[at0091] occurrences matches {0..1} matches { -- Description
85
- value matches {
86
- DV_TEXT matches {*}
87
- }
88
- }
89
- }
90
- }
91
- CLUSTER[at0089] occurrences matches {0..1} matches { -- Other sounds
92
- items cardinality matches {0..*; unordered} matches {
93
- ELEMENT[at0090] matches { -- Description
94
- value matches {
95
- DV_TEXT matches {*}
96
- }
97
- }
98
- use_node ELEMENT /items[at0002]/items[at0010]/items[at0030]
99
- }
100
- }
101
- CLUSTER[at0086] occurrences matches {0..*} matches { -- Localised auscultation
102
- items cardinality matches {0..*; unordered} matches {
103
- ELEMENT[at0087] matches { -- Site or region
104
- value matches {
105
- DV_TEXT matches {*}
106
- }
107
- }
108
- allow_archetype CLUSTER occurrences matches {0..1} matches {
109
- include
110
- archetype_id/value matches {/auscultation\.v1/}
111
- }
112
- }
113
- }
114
- }
115
- }
116
- }
117
- }
118
-
119
- ontology
120
- term_definitions = <
121
- ["en"] = <
122
- items = <
123
- ["at0000"] = <
124
- description = <"Findings on Auscultation">
125
- text = <"Auscultation">
126
- >
127
- ["at0001"] = <
128
- description = <"A group of statements about the normality of auscultation">
129
- text = <"Normal Statements">
130
- >
131
- ["at0002"] = <
132
- description = <"Findings on auscultation">
133
- text = <"Findings">
134
- >
135
- ["at0003"] = <
136
- description = <"Statements about the normality of the auscultation">
137
- text = <"Normal Statement">
138
- >
139
- ["at0004"] = <
140
- description = <"Detailed clinical description of the findings on auscultation">
141
- text = <"Clinical Description">
142
- >
143
- ["at0009"] = <
144
- description = <"Group of findings about auscultation of the bowel">
145
- text = <"Bowel sounds">
146
- >
147
- ["at0010"] = <
148
- description = <"Group of findings about auscultation of a major blood vessel">
149
- text = <"Vessel bruit">
150
- >
151
- ["at0030"] = <
152
- description = <"Site where finding is heard maximally">
153
- text = <"Maximal Location">
154
- >
155
- ["at0056"] = <
156
- description = <"No murmur is heard">
157
- text = <"No murmur">
158
- >
159
- ["at0057"] = <
160
- description = <"No bruit is heard">
161
- text = <"No bruit">
162
- >
163
- ["at0073"] = <
164
- description = <"Bowel sounds are normal in intensity and character">
165
- text = <"Normal bowel sounds">
166
- >
167
- ["at0074"] = <
168
- description = <"Specific auscultatory findings related to examination of the bowels">
169
- text = <"Specific Findings">
170
- >
171
- ["at0078"] = <
172
- description = <"No bowel sounds can be heard">
173
- text = <"Absent bowel sounds">
174
- >
175
- ["at0079"] = <
176
- description = <"Bowel sounds are less than normal">
177
- text = <"Decreased bowel sounds">
178
- >
179
- ["at0080"] = <
180
- description = <"Bowel sounds are more intense than normal">
181
- text = <"Increased bowel sounds">
182
- >
183
- ["at0081"] = <
184
- description = <"High pitched and very frequent bowel sounds can be heard">
185
- text = <"Tinkling bowel sounds">
186
- >
187
- ["at0085"] = <
188
- description = <"Nothing abnormal on auscultation">
189
- text = <"No abnormality detected">
190
- >
191
- ["at0086"] = <
192
- description = <"Auscultation in a particular site">
193
- text = <"Localised auscultation">
194
- >
195
- ["at0087"] = <
196
- description = <"The site of the localised findings">
197
- text = <"Site or region">
198
- >
199
- ["at0088"] = <
200
- description = <"The name of the vessel to which is being listened">
201
- text = <"Vessel name">
202
- >
203
- ["at0089"] = <
204
- description = <"Recording of sounds of a different nature">
205
- text = <"Other sounds">
206
- >
207
- ["at0090"] = <
208
- description = <"Description of other sounds">
209
- text = <"Description">
210
- >
211
- ["at0091"] = <
212
- description = <"Description of the bruit">
213
- text = <"Description">
214
- >
215
- >
216
- >
217
- >
@@ -1,9 +0,0 @@
1
- SECTION[at0000] matches { -- Summary
2
- items cardinality matches {0..*; unordered} matches {
3
- allow_archetype EVALUATION occurrences matches {0..1} matches {
4
- include
5
- archetype_id/value matches {/clinical_synopsis\.v1/} archetype_id/value matches {/problem\.v1/} archetype_id/value matches {/problem-diagnosis\.v1/}
6
- archetype_id/value matches {/problem-diagnosis-histological\.v1/}
7
- archetype_id/value matches {/problem-genetic\.v1/}
8
- }
9
- }
data/spec/rcov.opts DELETED
@@ -1 +0,0 @@
1
- --exclude "spec/*,gems/*"