Changeset 35
- Timestamp:
- May 8, 2008, 8:33:33 AM (15 years ago)
- Location:
- ruby/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
ruby/trunk/adl_parser/lib/parser.y
r32 r35 148 148 ### cADL section 149 149 cadl_section: c_complex_object 150 { 150 { 151 151 assert_at(__FILE__,__LINE__){val[0].instance_of?(OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT)} 152 152 @@log.info("#{__FILE__}:#{__LINE__}: c_complex_object = #{val[0]} at #{@filename}:#{@lineno}") … … 996 996 997 997 cardinality_limit_value: integer_value 998 | Star_code 999 # | '*' 998 { 999 result = val[0] 1000 } 1001 | Star_code # '*' 1002 { 1003 result = val[0] 1004 } 1005 1000 1006 1001 1007 c_occurrences: #-- default to 1..1 -
ruby/trunk/adl_parser/tests/openEHR-EHR-CLUSTER.exam-chest.v1.adl
r4 r35 1 1 archetype (adl_version=1.4) 2 2 openEHR-EHR-CLUSTER.exam-chest.v1 3 3 specialize 4 4 openEHR-EHR-CLUSTER.exam.v1 5 5 6 6 concept 7 [at0000.1]-- Examination of the chest7 [at0000.1] -- Examination of the chest 8 8 language 9 9 original_language = <[ISO_639-1::en]> 10 10 description 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 11 original_author = < 12 ["name"] = <"Sam Heard"> 13 ["organisation"] = <"Ocean Informatics"> 14 ["date"] = <"9/04/2007"> 15 ["email"] = <"Sam.Heard@OceanInformatics.biz"> 16 > 17 details = < 18 ["en"] = < 19 language = <[ISO_639-1::en]> 20 purpose = <"A cluster for recording findings on physical examination of the chest"> 21 use = <""> 22 keywords = <"examination", "physical", "chest", "thorax", "lungs"> 23 misuse = <""> 24 > 25 > 26 lifecycle_state = <"Initial"> 27 other_contributors = <> 28 28 29 29 definition 30 CLUSTER[at0000.1] matches {-- Examination of the chest31 32 CLUSTER[at0004] occurrences matches {0..1} matches {-- Normal statements33 34 ELEMENT[at0005] occurrences matches {0..*} matches {-- Normal statement35 36 37 38 39 40 41 ELEMENT[at0002] occurrences matches {0..1} matches {-- Clinical description42 43 44 45 46 CLUSTER[at0008] occurrences matches {0..1} matches {-- Findings47 48 CLUSTER[at0.1] occurrences matches {0..1} matches {-- Chest wall49 50 ELEMENT[at0.2] occurrences matches {0..1} matches {-- Description51 52 53 54 55 56 57 ELEMENT[at0.28] occurrences matches {0..1} matches {-- Shape58 59 60 61 62 CLUSTER[at0.30] occurrences matches {0..1} matches {-- Heart - Apex beat63 64 ELEMENT[at0.31] occurrences matches {0..1} matches {-- Visible65 66 67 68 69 70 71 CLUSTER[at0.32] occurrences matches {0..1} matches {-- Palpation72 73 ELEMENT[at0.33] occurrences matches {0..1} matches {-- Palpable74 75 76 77 78 79 80 ELEMENT[at0.34] occurrences matches {0..1} matches {-- Maximal location81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 CLUSTER[at0.3] occurrences matches {0..1} matches {-- Respiratory system98 99 ELEMENT[at0.4] occurrences matches {0..1} matches {-- Trachea100 101 102 103 104 at0.5,-- Midline105 at0.6,-- Deviated to the left106 at0.7]-- Deviated to the right107 108 109 110 111 CLUSTER[at0.8] occurrences matches {0..1} matches {-- Breathing112 113 ELEMENT[at0.19] occurrences matches {0..1} matches {-- Description114 115 116 117 118 ELEMENT[at0.9] occurrences matches {0..1} matches {-- Type119 120 121 122 123 at0.10,-- Diaphragmatic breathing124 at0.11]-- Thoracic breathing125 126 127 128 129 ELEMENT[at0.12] occurrences matches {0..1} matches {-- Effort130 131 5|[local::at0.13],-- Normal breathing effort132 6|[local::at0.14],-- Mild increase in effort133 8|[local::at0.15],-- Moderate increased effort134 10|[local::at0.16]-- Major increased effort135 136 137 CLUSTER[at0.17] occurrences matches {0..1} matches {-- Signs of increased effort138 139 ELEMENT[at0.18] occurrences matches {0..*} matches {-- Sign140 141 142 143 144 at0.25,-- Using accessory muscles145 at0.20,-- Intercostal recession146 at0.24,-- Subcostal recession147 at0.23,-- Suprasternal recession148 at0.21,-- Sternal recession149 at0.22]-- Rib retraction150 151 152 153 154 155 156 ELEMENT[at0.26] occurrences matches {0..1} matches {-- Paradoxical movement (flail chest)157 158 159 160 161 162 163 164 165 166 167 CLUSTER[at0003] occurrences matches {0..1} matches {-- Detail168 169 170 171 172 173 174 175 176 177 178 179 180 181 CLUSTER[at0.27] occurrences matches {0..1} matches {-- Lymph nodes182 183 184 185 186 187 188 189 ELEMENT[at0006] occurrences matches {0..*} matches {-- Image190 191 192 193 194 195 196 197 198 199 200 201 202 30 CLUSTER[at0000.1] matches { -- Examination of the chest 31 items cardinality matches {0..*; unordered} matches { 32 CLUSTER[at0004] occurrences matches {0..1} matches { -- Normal statements 33 items cardinality matches {0..*; unordered} matches { 34 ELEMENT[at0005] occurrences matches {0..*} matches { -- Normal statement 35 value matches { 36 DV_TEXT matches {*} 37 } 38 } 39 } 40 } 41 ELEMENT[at0002] occurrences matches {0..1} matches { -- Clinical description 42 value matches { 43 DV_TEXT matches {*} 44 } 45 } 46 CLUSTER[at0008] occurrences matches {0..1} matches { -- Findings 47 items cardinality matches {0..*; unordered} matches { 48 CLUSTER[at0.1] occurrences matches {0..1} matches { -- Chest wall 49 items cardinality matches {0..*; unordered} matches { 50 ELEMENT[at0.2] occurrences matches {0..1} matches { -- Description 51 value matches { 52 DV_CODED_TEXT matches { 53 defining_code matches {[local::]} 54 } 55 } 56 } 57 ELEMENT[at0.28] occurrences matches {0..1} matches { -- Shape 58 value matches { 59 DV_TEXT matches {*} 60 } 61 } 62 CLUSTER[at0.30] occurrences matches {0..1} matches { -- Heart - Apex beat 63 items cardinality matches {0..*; unordered} matches { 64 ELEMENT[at0.31] occurrences matches {0..1} matches { -- Visible 65 value matches { 66 DV_BOOLEAN matches { 67 value matches {True, False} 68 } 69 } 70 } 71 CLUSTER[at0.32] occurrences matches {0..1} matches { -- Palpation 72 items cardinality matches {0..*; unordered} matches { 73 ELEMENT[at0.33] occurrences matches {0..1} matches { -- Palpable 74 value matches { 75 DV_BOOLEAN matches { 76 value matches {True, False} 77 } 78 } 79 } 80 ELEMENT[at0.34] occurrences matches {0..1} matches { -- Maximal location 81 value matches { 82 DV_TEXT matches {*} 83 } 84 } 85 } 86 } 87 } 88 } 89 allow_archetype CLUSTER occurrences matches {0..1} matches { 90 include 91 archetype_id/value matches {/palpation\.v1draft/} 92 archetype_id/value matches {/inspection\.v1draft/} 93 archetype_id/value matches {/auscultation-chest\.v1/} 94 } 95 } 96 } 97 CLUSTER[at0.3] occurrences matches {0..1} matches { -- Respiratory system 98 items cardinality matches {0..*; unordered} matches { 99 ELEMENT[at0.4] occurrences matches {0..1} matches { -- Trachea 100 value matches { 101 DV_CODED_TEXT matches { 102 defining_code matches { 103 [local:: 104 at0.5, -- Midline 105 at0.6, -- Deviated to the left 106 at0.7] -- Deviated to the right 107 } 108 } 109 } 110 } 111 CLUSTER[at0.8] occurrences matches {0..1} matches { -- Breathing 112 items cardinality matches {0..*; unordered} matches { 113 ELEMENT[at0.19] occurrences matches {0..1} matches { -- Description 114 value matches { 115 DV_TEXT matches {*} 116 } 117 } 118 ELEMENT[at0.9] occurrences matches {0..1} matches { -- Type 119 value matches { 120 DV_CODED_TEXT matches { 121 defining_code matches { 122 [local:: 123 at0.10, -- Diaphragmatic breathing 124 at0.11] -- Thoracic breathing 125 } 126 } 127 } 128 } 129 ELEMENT[at0.12] occurrences matches {0..1} matches { -- Effort 130 value matches { 131 5|[local::at0.13], -- Normal breathing effort 132 6|[local::at0.14], -- Mild increase in effort 133 8|[local::at0.15], -- Moderate increased effort 134 10|[local::at0.16] -- Major increased effort 135 } 136 } 137 CLUSTER[at0.17] occurrences matches {0..1} matches { -- Signs of increased effort 138 items cardinality matches {0..*; unordered} matches { 139 ELEMENT[at0.18] occurrences matches {0..*} matches { -- Sign 140 value matches { 141 DV_CODED_TEXT matches { 142 defining_code matches { 143 [local:: 144 at0.25, -- Using accessory muscles 145 at0.20, -- Intercostal recession 146 at0.24, -- Subcostal recession 147 at0.23, -- Suprasternal recession 148 at0.21, -- Sternal recession 149 at0.22] -- Rib retraction 150 } 151 } 152 } 153 } 154 } 155 } 156 ELEMENT[at0.26] occurrences matches {0..1} matches { -- Paradoxical movement (flail chest) 157 value matches { 158 DV_BOOLEAN matches { 159 value matches {True, False} 160 } 161 } 162 } 163 } 164 } 165 } 166 } 167 CLUSTER[at0003] occurrences matches {0..1} matches { -- Detail 168 items cardinality matches {0..*; unordered} matches { 169 allow_archetype CLUSTER occurrences matches {0..1} matches { 170 include 171 archetype_id/value matches {/exam-generic\.v1/} 172 archetype_id/value matches {/auscultation-chest\.v1/} 173 archetype_id/value matches {/palpation\.v1/} 174 archetype_id/value matches {/inspection\.v1draft/} 175 archetype_id/value matches {/percussion\.v1/} 176 } 177 } 178 } 179 } 180 } 181 CLUSTER[at0.27] occurrences matches {0..1} matches { -- Lymph nodes 182 items cardinality matches {0..*; unordered} matches { 183 allow_archetype CLUSTER occurrences matches {0..1} matches { 184 include 185 archetype_id/value matches {/exam-generic-lympnode\.v1/} 186 } 187 } 188 } 189 ELEMENT[at0006] occurrences matches {0..*} matches { -- Image 190 value matches { 191 DV_MULTIMEDIA matches { 192 media_type matches { 193 [openEHR:: 194 426, 195 427, 196 429] 197 } 198 } 199 } 200 } 201 } 202 } 203 203 204 204 ontology 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 205 term_definitions = < 206 ["en"] = < 207 items = < 208 ["at0.1"] = < 209 description = <"Findings about the chest wall"> 210 text = <"Chest wall"> 211 > 212 ["at0.10"] = < 213 description = <"Breathing using the diaphragm and not the chest wall"> 214 text = <"Diaphragmatic breathing"> 215 > 216 ["at0.11"] = < 217 description = <"Breathing using expansion of the chest wall"> 218 text = <"Thoracic breathing"> 219 > 220 ["at0.12"] = < 221 description = <"Effort required for breathing"> 222 text = <"Effort"> 223 > 224 ["at0.13"] = < 225 description = <"Diaphragmatic breathing as at rest"> 226 text = <"Normal breathing effort"> 227 > 228 ["at0.14"] = < 229 description = <"Breathing using obvious chest expansion"> 230 text = <"Mild increase in effort"> 231 > 232 ["at0.15"] = < 233 description = <"Breathing with signs of abnormal breathing"> 234 text = <"Moderate increased effort"> 235 > 236 ["at0.16"] = < 237 description = <"Many signs of increased breathing effort"> 238 text = <"Major increased effort"> 239 > 240 ["at0.17"] = < 241 description = <"Signs of increased respiratory effort"> 242 text = <"Signs of increased effort"> 243 > 244 ["at0.18"] = < 245 description = <"Use of accessory respiratory muscles"> 246 text = <"Sign"> 247 > 248 ["at0.19"] = < 249 description = <"Description of breathing"> 250 text = <"Description"> 251 > 252 ["at0.2"] = < 253 description = <"The contour of the chest wall"> 254 text = <"Description"> 255 > 256 ["at0.20"] = < 257 description = <"Drawing in between the ribs on inspiration"> 258 text = <"Intercostal recession"> 259 > 260 ["at0.21"] = < 261 description = <"Drawing in of the sternum on inspiration"> 262 text = <"Sternal recession"> 263 > 264 ["at0.22"] = < 265 description = <"Indrawing of the chest wall on inspiration"> 266 text = <"Rib retraction"> 267 > 268 ["at0.23"] = < 269 description = <"Indrawing above the sternum on inspiration"> 270 text = <"Suprasternal recession"> 271 > 272 ["at0.24"] = < 273 description = <"Indrawing of the subcostal abdominal wall "> 274 text = <"Subcostal recession"> 275 > 276 ["at0.25"] = < 277 description = <"Use of accessory respiratory muscles during inspiration"> 278 text = <"Using accessory muscles"> 279 > 280 ["at0.26"] = < 281 description = <"Any paradoxical movement of the chest wall during respiration"> 282 text = <"Paradoxical movement (flail chest)"> 283 > 284 ["at0.27"] = < 285 description = <"Lymphnodes"> 286 text = <"Lymph nodes"> 287 > 288 ["at0.28"] = < 289 description = <"The shape of the chest"> 290 text = <"Shape"> 291 comment = <"ChestShape SNOMED query"> 292 > 293 ["at0.29"] = < 294 description = <"Pidgeon chest, with prominent lower sternum"> 295 text = <"Pectus carinatum"> 296 > 297 ["at0.3"] = < 298 description = <"Respiratory findings"> 299 text = <"Respiratory system"> 300 > 301 ["at0.30"] = < 302 description = <"*"> 303 text = <"Heart - Apex beat"> 304 > 305 ["at0.31"] = < 306 description = <"Apex beat is visible"> 307 text = <"Visible"> 308 > 309 ["at0.32"] = < 310 description = <"*"> 311 text = <"Palpation"> 312 > 313 ["at0.33"] = < 314 description = <"Apex beat is palpable"> 315 text = <"Palpable"> 316 > 317 ["at0.34"] = < 318 description = <"Site of maximal location of apex beat"> 319 text = <"Maximal location"> 320 > 321 ["at0.4"] = < 322 description = <"The position of the trachea"> 323 text = <"Trachea"> 324 > 325 ["at0.5"] = < 326 description = <"The trachea is in the midline position"> 327 text = <"Midline"> 328 > 329 ["at0.6"] = < 330 description = <"The trachea is deviated to the left"> 331 text = <"Deviated to the left"> 332 > 333 ["at0.7"] = < 334 description = <"The trachea is deviated to the right"> 335 text = <"Deviated to the right"> 336 > 337 ["at0.8"] = < 338 description = <"Findings about breathing"> 339 text = <"Breathing"> 340 > 341 ["at0.9"] = < 342 description = <"Type of breathing"> 343 text = <"Type"> 344 > 345 ["at0000"] = < 346 description = <"Basic examination cluster for describing findings on physical examination when there is no named focus of examination"> 347 text = <"Examination"> 348 > 349 ["at0000.1"] = < 350 description = <"For recording findings on physical examination of the chest wall and lungs"> 351 text = <"Examination of the chest"> 352 > 353 ["at0002"] = < 354 description = <"Textural description of the part examined"> 355 text = <"Clinical description"> 356 > 357 ["at0003"] = < 358 description = <"More focused examination findings"> 359 text = <"Detail"> 360 > 361 ["at0004"] = < 362 description = <"A group of statements about the normality of the examination"> 363 text = <"Normal statements"> 364 > 365 ["at0005"] = < 366 description = <"A specific statement of normality"> 367 text = <"Normal statement"> 368 > 369 ["at0006"] = < 370 description = <"Drawing or image of the area examined"> 371 text = <"Image"> 372 > 373 ["at0008"] = < 374 description = <"Clinical findings"> 375 text = <"Findings"> 376 > 377 > 378 > 379 > -
ruby/trunk/models/am/archetype/constraint_model/archetype_constraint.rb
r32 r35 9 9 10 10 class CARDINALITY 11 11 attr_accessor :interval, :is_ordered, :is_unique 12 13 def initialize(args = { }) 14 @interval = args[:interval] 15 @is_ordered = args[:is_ordered] 16 @is_unique = args[:is_unique] 17 end 12 18 end 13 19
Note:
See TracChangeset
for help on using the changeset viewer.