- Timestamp:
- Oct 14, 2009, 1:06:58 AM (15 years ago)
- Location:
- ruby
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
ruby/trunk/lib/adl_parser/lib/adl_scanner.rb
r316 r317 77 77 @@logger.debug("ADLScanner#scan: COMMENT = #{$&} at #{@filename}:#{@lineno}") 78 78 ; 79 when /\Alanguage/ # language section 80 assert_at(__FILE__,__LINE__){@adl_type.pop == :adl} 81 @adl_type.push(:dadl) 82 yield :SYM_LANGUAGE, :SYM_LANGUAGE 83 when /\Adescription/ # description section 84 assert_at(__FILE__,__LINE__){@adl_type.pop == :dadl} 85 @adl_type.push(:dadl) 79 when /\Adescription/ # description 86 80 yield :SYM_DESCRIPTION, :SYM_DESCRIPTION 87 when /\Adefinition/ # definition section 88 assert_at(__FILE__,__LINE__){@adl_type.pop == :dadl} 89 @adl_type.push(:cadl) 81 when /\Adefinition/ # definition 90 82 yield :SYM_DEFINITION, :SYM_DEFINITION 91 when /\Aontology/ # ontology section92 assert_at(__FILE__,__LINE__){@adl_type.pop == :cadl}93 @adl_type.push(:dadl)94 yield :SYM_ONTOLOGY, :SYM_ONTOLOGY95 when /\Ainvariatn/ # invariant section96 raise97 83 ###----------/* symbols */ ------------------------------------------------- 98 84 when /\A[A-Z][a-zA-Z0-9_]*/ … … 330 316 yield :SYM_END_DBLOCK, :SYM_END_DBLOCK 331 317 end 318 # adl_type = @adl_type.pop 319 # if adl_type == :dadl 320 # yield :SYM_END_DBLOCK, :SYM_END_DBLOCK 321 # else 322 # @in_c_domain_type = false 323 # yield :END_V_C_DOMAIN_TYPE_BLOCK, :END_V_C_DOMAIN_TYPE_BLOCK 324 # end 332 325 else 333 326 adl_type = @adl_type.pop … … 355 348 yield :Semicolon_code, :Semicolon_code 356 349 when /\A\,/ # , 350 @@logger.debug("DADLScanner#scan: Comma_code") 357 351 yield :Comma_code, :Comma_code 358 352 when /\A\:/ # : -
ruby/trunk/lib/adl_parser/lib/parser.rb
r307 r317 27 27 class Parser < Racc::Parser 28 28 29 module_eval(<<'...end parser.y/module_eval...', 'parser.y', 12 45)29 module_eval(<<'...end parser.y/module_eval...', 'parser.y', 1282) 30 30 31 31 def assert_at(file,line, message = "") … … 750 750 1, 165, :_reduce_128, 751 751 1, 165, :_reduce_129, 752 1, 170, :_reduce_ none,753 1, 170, :_reduce_ none,754 1, 170, :_reduce_ none,755 1, 170, :_reduce_ none,756 1, 170, :_reduce_ none,757 1, 170, :_reduce_ none,758 1, 170, :_reduce_ none,759 1, 170, :_reduce_ none,760 1, 170, :_reduce_ none,752 1, 170, :_reduce_130, 753 1, 170, :_reduce_131, 754 1, 170, :_reduce_132, 755 1, 170, :_reduce_133, 756 1, 170, :_reduce_134, 757 1, 170, :_reduce_135, 758 1, 170, :_reduce_136, 759 1, 170, :_reduce_137, 760 1, 170, :_reduce_138, 761 761 1, 171, :_reduce_none, 762 762 1, 171, :_reduce_none, … … 768 768 1, 118, :_reduce_146, 769 769 1, 174, :_reduce_147, 770 3, 184, :_reduce_ none,771 3, 184, :_reduce_ none,772 3, 184, :_reduce_ none,770 3, 184, :_reduce_148, 771 3, 184, :_reduce_149, 772 3, 184, :_reduce_150, 773 773 1, 175, :_reduce_151, 774 774 2, 175, :_reduce_152, … … 1959 1959 module_eval(<<'.,.,', 'parser.y', 484) 1960 1960 def _reduce_87(val, _values, result) 1961 @@logger.debug("#{__FILE__}:#{__LINE__}:dadl_section \n attr_vals = #{val[0]}")1961 @@logger.debug("#{__FILE__}:#{__LINE__}:dadl_section attr_vals = \n#{val[0].to_yaml}") 1962 1962 result = val[0] 1963 1963 … … 1968 1968 module_eval(<<'.,.,', 'parser.y', 489) 1969 1969 def _reduce_88(val, _values, result) 1970 @@logger.debug("#{__FILE__}:#{__LINE__}:dadl_section \n complex_object_block = #{val[0]}")1970 @@logger.debug("#{__FILE__}:#{__LINE__}:dadl_section complex_object_block = \n#{val[0].to_yaml}") 1971 1971 result = val[0] 1972 1972 … … 2310 2310 .,., 2311 2311 2312 # reduce 130 omitted 2313 2314 # reduce 131 omitted 2315 2316 # reduce 132 omitted 2317 2318 # reduce 133 omitted 2319 2320 # reduce 134 omitted 2321 2322 # reduce 135 omitted 2323 2324 # reduce 136 omitted 2325 2326 # reduce 137 omitted 2327 2328 # reduce 138 omitted 2312 module_eval(<<'.,.,', 'parser.y', 686) 2313 def _reduce_130(val, _values, result) 2314 @@logger.debug("string_list_value: #{val[0]} at #{@filename}:#{@lineno}") 2315 result = val[0] 2316 2317 result 2318 end 2319 .,., 2320 2321 module_eval(<<'.,.,', 'parser.y', 691) 2322 def _reduce_131(val, _values, result) 2323 result = val[0] 2324 2325 result 2326 end 2327 .,., 2328 2329 module_eval(<<'.,.,', 'parser.y', 695) 2330 def _reduce_132(val, _values, result) 2331 result = val[0] 2332 2333 result 2334 end 2335 .,., 2336 2337 module_eval(<<'.,.,', 'parser.y', 699) 2338 def _reduce_133(val, _values, result) 2339 result = val[0] 2340 2341 result 2342 end 2343 .,., 2344 2345 module_eval(<<'.,.,', 'parser.y', 703) 2346 def _reduce_134(val, _values, result) 2347 result = val[0] 2348 2349 result 2350 end 2351 .,., 2352 2353 module_eval(<<'.,.,', 'parser.y', 707) 2354 def _reduce_135(val, _values, result) 2355 result = val[0] 2356 2357 result 2358 end 2359 .,., 2360 2361 module_eval(<<'.,.,', 'parser.y', 711) 2362 def _reduce_136(val, _values, result) 2363 result = val[0] 2364 2365 result 2366 end 2367 .,., 2368 2369 module_eval(<<'.,.,', 'parser.y', 715) 2370 def _reduce_137(val, _values, result) 2371 result = val[0] 2372 2373 result 2374 end 2375 .,., 2376 2377 module_eval(<<'.,.,', 'parser.y', 719) 2378 def _reduce_138(val, _values, result) 2379 result = val[0] 2380 2381 result 2382 end 2383 .,., 2329 2384 2330 2385 # reduce 139 omitted … … 2340 2395 # reduce 144 omitted 2341 2396 2342 module_eval(<<'.,.,', 'parser.y', 7 03)2397 module_eval(<<'.,.,', 'parser.y', 731) 2343 2398 def _reduce_145(val, _values, result) 2344 2399 @@logger.debug("V_TYPE_IDENTIFIER: #{val[0]} at #{@filename}:#{@lineno}") … … 2349 2404 .,., 2350 2405 2351 module_eval(<<'.,.,', 'parser.y', 7 08)2406 module_eval(<<'.,.,', 'parser.y', 736) 2352 2407 def _reduce_146(val, _values, result) 2353 2408 @@logger.debug("V_GENERIC_TYPE_IDENTIFIER: #{val[0]} at #{@filename}:#{@lineno}") … … 2358 2413 .,., 2359 2414 2360 module_eval(<<'.,.,', 'parser.y', 7 14)2415 module_eval(<<'.,.,', 'parser.y', 742) 2361 2416 def _reduce_147(val, _values, result) 2362 2417 @@logger.debug("V_STRING: #{val[0]} at #{@filename}:#{@lineno}") … … 2367 2422 .,., 2368 2423 2369 # reduce 148 omitted 2370 2371 # reduce 149 omitted 2372 2373 # reduce 150 omitted 2374 2375 module_eval(<<'.,.,', 'parser.y', 724) 2424 module_eval(<<'.,.,', 'parser.y', 748) 2425 def _reduce_148(val, _values, result) 2426 result = [val[0],val[2]] 2427 2428 result 2429 end 2430 .,., 2431 2432 module_eval(<<'.,.,', 'parser.y', 752) 2433 def _reduce_149(val, _values, result) 2434 result = val[0] << val[2] 2435 2436 result 2437 end 2438 .,., 2439 2440 module_eval(<<'.,.,', 'parser.y', 756) 2441 def _reduce_150(val, _values, result) 2442 result = val[0] 2443 2444 result 2445 end 2446 .,., 2447 2448 module_eval(<<'.,.,', 'parser.y', 761) 2376 2449 def _reduce_151(val, _values, result) 2377 2450 begin … … 2386 2459 .,., 2387 2460 2388 module_eval(<<'.,.,', 'parser.y', 7 33)2461 module_eval(<<'.,.,', 'parser.y', 770) 2389 2462 def _reduce_152(val, _values, result) 2390 2463 begin … … 2399 2472 .,., 2400 2473 2401 module_eval(<<'.,.,', 'parser.y', 7 42)2474 module_eval(<<'.,.,', 'parser.y', 779) 2402 2475 def _reduce_153(val, _values, result) 2403 2476 begin … … 2436 2509 # reduce 165 omitted 2437 2510 2438 module_eval(<<'.,.,', 'parser.y', 768)2511 module_eval(<<'.,.,', 'parser.y', 805) 2439 2512 def _reduce_166(val, _values, result) 2440 2513 begin … … 2449 2522 .,., 2450 2523 2451 module_eval(<<'.,.,', 'parser.y', 777)2524 module_eval(<<'.,.,', 'parser.y', 814) 2452 2525 def _reduce_167(val, _values, result) 2453 2526 begin … … 2462 2535 .,., 2463 2536 2464 module_eval(<<'.,.,', 'parser.y', 786)2537 module_eval(<<'.,.,', 'parser.y', 823) 2465 2538 def _reduce_168(val, _values, result) 2466 2539 begin … … 2499 2572 # reduce 180 omitted 2500 2573 2501 module_eval(<<'.,.,', 'parser.y', 8 11)2574 module_eval(<<'.,.,', 'parser.y', 848) 2502 2575 def _reduce_181(val, _values, result) 2503 2576 result = true … … 2507 2580 .,., 2508 2581 2509 module_eval(<<'.,.,', 'parser.y', 8 15)2582 module_eval(<<'.,.,', 'parser.y', 852) 2510 2583 def _reduce_182(val, _values, result) 2511 2584 result = false … … 2529 2602 # reduce 189 omitted 2530 2603 2531 module_eval(<<'.,.,', 'parser.y', 8 30)2604 module_eval(<<'.,.,', 'parser.y', 867) 2532 2605 def _reduce_190(val, _values, result) 2533 2606 result = val[0] … … 2613 2686 # reduce 228 omitted 2614 2687 2615 module_eval(<<'.,.,', 'parser.y', 881)2688 module_eval(<<'.,.,', 'parser.y', 918) 2616 2689 def _reduce_229(val, _values, result) 2617 2690 @@logger.debug("V_ISO8601_DURATION: #{val[0]} at #{@filename}:#{@lineno}") … … 2646 2719 # reduce 241 omitted 2647 2720 2648 module_eval(<<'.,.,', 'parser.y', 9 01)2721 module_eval(<<'.,.,', 'parser.y', 938) 2649 2722 def _reduce_242(val, _values, result) 2650 2723 @@logger.debug("#{__FILE__}:#{__LINE__}: V_QUALIFIED_TERM_CODE_REF = #{val[0]} at #{@filename}:#{@lineno}") … … 2661 2734 # reduce 245 omitted 2662 2735 2663 module_eval(<<'.,.,', 'parser.y', 9 11)2736 module_eval(<<'.,.,', 'parser.y', 948) 2664 2737 def _reduce_246(val, _values, result) 2665 2738 @@logger.debug("#{__FILE__}:#{__LINE__}: V_URI = #{val[0]} at #{@filename}:#{@lineno}") … … 2750 2823 # reduce 286 omitted 2751 2824 2752 module_eval(<<'.,.,', 'parser.y', 981)2825 module_eval(<<'.,.,', 'parser.y', 1018) 2753 2826 def _reduce_287(val, _values, result) 2754 2827 @@logger.debug("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}") … … 2758 2831 .,., 2759 2832 2760 module_eval(<<'.,.,', 'parser.y', 985)2833 module_eval(<<'.,.,', 'parser.y', 1022) 2761 2834 def _reduce_288(val, _values, result) 2762 2835 @@logger.debug("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}") … … 2766 2839 .,., 2767 2840 2768 module_eval(<<'.,.,', 'parser.y', 996)2841 module_eval(<<'.,.,', 'parser.y', 1033) 2769 2842 def _reduce_289(val, _values, result) 2770 2843 result = Range.new(1,1) … … 2774 2847 .,., 2775 2848 2776 module_eval(<<'.,.,', 'parser.y', 10 00)2849 module_eval(<<'.,.,', 'parser.y', 1037) 2777 2850 def _reduce_290(val, _values, result) 2778 2851 result = val[3] … … 2782 2855 .,., 2783 2856 2784 module_eval(<<'.,.,', 'parser.y', 10 05)2857 module_eval(<<'.,.,', 'parser.y', 1042) 2785 2858 def _reduce_291(val, _values, result) 2786 2859 begin … … 2795 2868 .,., 2796 2869 2797 module_eval(<<'.,.,', 'parser.y', 10 14)2870 module_eval(<<'.,.,', 'parser.y', 1051) 2798 2871 def _reduce_292(val, _values, result) 2799 2872 begin … … 2809 2882 .,., 2810 2883 2811 module_eval(<<'.,.,', 'parser.y', 10 25)2884 module_eval(<<'.,.,', 'parser.y', 1062) 2812 2885 def _reduce_293(val, _values, result) 2813 2886 result = OpenEhr::AM::Archetype::Constraint_Model::CARDINALITY.new … … 2833 2906 # reduce 301 omitted 2834 2907 2835 module_eval(<<'.,.,', 'parser.y', 10 39)2908 module_eval(<<'.,.,', 'parser.y', 1076) 2836 2909 def _reduce_302(val, _values, result) 2837 2910 result = val[0] … … 2841 2914 .,., 2842 2915 2843 module_eval(<<'.,.,', 'parser.y', 10 43)2916 module_eval(<<'.,.,', 'parser.y', 1080) 2844 2917 def _reduce_303(val, _values, result) 2845 2918 result = val[0] … … 2851 2924 # reduce 304 omitted 2852 2925 2853 module_eval(<<'.,.,', 'parser.y', 10 50)2926 module_eval(<<'.,.,', 'parser.y', 1087) 2854 2927 def _reduce_305(val, _values, result) 2855 2928 case val[3] … … 2866 2939 # reduce 306 omitted 2867 2940 2868 module_eval(<<'.,.,', 'parser.y', 10 61)2941 module_eval(<<'.,.,', 'parser.y', 1098) 2869 2942 def _reduce_307(val, _values, result) 2870 2943 result = val[0] … … 2874 2947 .,., 2875 2948 2876 module_eval(<<'.,.,', 'parser.y', 1 065)2949 module_eval(<<'.,.,', 'parser.y', 1102) 2877 2950 def _reduce_308(val, _values, result) 2878 2951 result = OpenEhr::RM::Support::AssumedTypes::Interval.new(val[0], val[2]) … … 2968 3041 # reduce 351 omitted 2969 3042 2970 module_eval(<<'.,.,', 'parser.y', 11 31)3043 module_eval(<<'.,.,', 'parser.y', 1168) 2971 3044 def _reduce_352(val, _values, result) 2972 3045 result = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true) … … 2976 3049 .,., 2977 3050 2978 module_eval(<<'.,.,', 'parser.y', 11 35)3051 module_eval(<<'.,.,', 'parser.y', 1172) 2979 3052 def _reduce_353(val, _values, result) 2980 3053 result = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => false) … … 2984 3057 .,., 2985 3058 2986 module_eval(<<'.,.,', 'parser.y', 11 39)3059 module_eval(<<'.,.,', 'parser.y', 1176) 2987 3060 def _reduce_354(val, _values, result) 2988 3061 result = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true,:false_valid => false) … … 2992 3065 .,., 2993 3066 2994 module_eval(<<'.,.,', 'parser.y', 11 43)3067 module_eval(<<'.,.,', 'parser.y', 1180) 2995 3068 def _reduce_355(val, _values, result) 2996 3069 result = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => false,:false_valid => true) … … 3000 3073 .,., 3001 3074 3002 module_eval(<<'.,.,', 'parser.y', 11 48)3075 module_eval(<<'.,.,', 'parser.y', 1185) 3003 3076 def _reduce_356(val, _values, result) 3004 3077 result = val[0] … … 3008 3081 .,., 3009 3082 3010 module_eval(<<'.,.,', 'parser.y', 11 52)3083 module_eval(<<'.,.,', 'parser.y', 1189) 3011 3084 def _reduce_357(val, _values, result) 3012 3085 raise 'Not implemented yet' … … 3016 3089 .,., 3017 3090 3018 module_eval(<<'.,.,', 'parser.y', 11 56)3091 module_eval(<<'.,.,', 'parser.y', 1193) 3019 3092 def _reduce_358(val, _values, result) 3020 3093 raise 'Not implemented yet' … … 3034 3107 # reduce 363 omitted 3035 3108 3036 module_eval(<<'.,.,', 'parser.y', 1 168)3109 module_eval(<<'.,.,', 'parser.y', 1205) 3037 3110 def _reduce_364(val, _values, result) 3038 3111 @in_interval = false … … 3043 3116 .,., 3044 3117 3045 module_eval(<<'.,.,', 'parser.y', 1 175)3118 module_eval(<<'.,.,', 'parser.y', 1212) 3046 3119 def _reduce_365(val, _values, result) 3047 3120 result = val[0] … … 3051 3124 .,., 3052 3125 3053 module_eval(<<'.,.,', 'parser.y', 1 179)3126 module_eval(<<'.,.,', 'parser.y', 1216) 3054 3127 def _reduce_366(val, _values, result) 3055 3128 result = val[0] … … 3059 3132 .,., 3060 3133 3061 module_eval(<<'.,.,', 'parser.y', 1 185)3134 module_eval(<<'.,.,', 'parser.y', 1222) 3062 3135 def _reduce_367(val, _values, result) 3063 3136 @@logger.debug("#{__FILE__}:#{__LINE__}, START_TERM_CODE_CONSTRAINT = #{val[0]} at #{@filename}") … … 3076 3149 # reduce 370 omitted 3077 3150 3078 module_eval(<<'.,.,', 'parser.y', 12 01)3151 module_eval(<<'.,.,', 'parser.y', 1238) 3079 3152 def _reduce_371(val, _values, result) 3080 3153 result = val[0] … … 3084 3157 .,., 3085 3158 3086 module_eval(<<'.,.,', 'parser.y', 12 06)3159 module_eval(<<'.,.,', 'parser.y', 1243) 3087 3160 def _reduce_372(val, _values, result) 3088 3161 result = val[0] … … 3092 3165 .,., 3093 3166 3094 module_eval(<<'.,.,', 'parser.y', 12 10)3167 module_eval(<<'.,.,', 'parser.y', 1247) 3095 3168 def _reduce_373(val, _values, result) 3096 3169 @@logger.debug("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{word} at #{@filename}") … … 3101 3174 .,., 3102 3175 3103 module_eval(<<'.,.,', 'parser.y', 12 21)3176 module_eval(<<'.,.,', 'parser.y', 1258) 3104 3177 def _reduce_374(val, _values, result) 3105 3178 result = val[0] -
ruby/trunk/lib/adl_parser/lib/parser.y
r307 r317 684 684 685 685 simple_list_value: string_list_value 686 { 687 @@logger.debug("string_list_value: #{val[0]} at #{@filename}:#{@lineno}") 688 result = val[0] 689 } 686 690 | integer_list_value 691 { 692 result = val[0] 693 } 687 694 | real_list_value 695 { 696 result = val[0] 697 } 688 698 | boolean_list_value 699 { 700 result = val[0] 701 } 689 702 | character_list_value 703 { 704 result = val[0] 705 } 690 706 | date_list_value 707 { 708 result = val[0] 709 } 691 710 | time_list_value 711 { 712 result = val[0] 713 } 692 714 | date_time_list_value 715 { 716 result = val[0] 717 } 693 718 | duration_list_value 719 { 720 result = val[0] 721 } 694 722 695 723 simple_interval_value: integer_interval_value … … 718 746 719 747 string_list_value: V_STRING Comma_code V_STRING 748 { 749 result = [val[0],val[2]] 750 } 720 751 | string_list_value Comma_code V_STRING 752 { 753 result = val[0] << val[2] 754 } 721 755 | V_STRING Comma_code SYM_LIST_CONTINUE 756 { 757 result = val[0] 758 } 722 759 723 760 integer_value: V_INTEGER -
ruby/trunk/lib/adl_parser/test/adl/openEHR-EHR-OBSERVATION.body_mass_index.v1.adl
r315 r317 1 archetype (adl_version=1.4)1 archetype (adl_version=1.4) 2 2 openEHR-EHR-OBSERVATION.body_mass_index.v1 3 3 … … 31 31 > 32 32 lifecycle_state = <"Initial"> 33 other_contributors = <"Marja Buur, Medisch Centrum Alkmaar, Netherlands", "Rong Chen, Cambio Healthcare Systems, Sweden", "Angela de Zwart, Orion Health, New Zealand", "Paul Donaldson, Nursing Informatics Australia, Australia", "Sebastian Garde, Ocean Informatics, Germany", "Heather Grain, Llewelyn Grain Informatics, Australia", "Anne Harbison, CPCER, Australia", "Sam Heard, Ocean Informatics, Australia", "Andrew James, University of Toronto, Canada", "Shinji Kobayashi, Ehime University, Japan", "Heather Leslie, Ocean Informatics, Australia (Editor)", "Rikard Lovstrom, Swedish Medical Association, Sweden", "Ian McNicoll, Ocean Informatics, United Kingdom" , "Jeroen Meintjens, Medisch Centrum Alkmaar, Netherlands", "Arturo Romero, SESCAM, Spain", "Soon Ghee Yap, Singapore Health Services Pte Ltd, Singapore">33 other_contributors = <"Marja Buur, Medisch Centrum Alkmaar, Netherlands", "Rong Chen, Cambio Healthcare Systems, Sweden", "Angela de Zwart, Orion Health, New Zealand", "Paul Donaldson, Nursing Informatics Australia, Australia", "Sebastian Garde, Ocean Informatics, Germany", "Heather Grain, Llewelyn Grain Informatics, Australia", "Anne Harbison, CPCER, Australia", "Sam Heard, Ocean Informatics, Australia", "Andrew James, University of Toronto, Canada", "Shinji Kobayashi, Ehime University, Japan", "Heather Leslie, Ocean Informatics, Australia (Editor)", "Rikard Lovstrom, Swedish Medical Association, Sweden", "Ian McNicoll, Ocean Informatics, United Kingdom"> 34 34 other_details = < 35 35 ["MD5-CAM-1.0.1"] = <"1605E211E9BFB4093A72CCE7A9792FF9"> -
ruby/trunk/lib/adl_parser/test/parser_test.rb
r316 r317 18 18 end 19 19 20 # must "openEHR-EHR-ACTION.imaging.v1.adl be properly parsed" do 21 # file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-ACTION.imaging.v1.adl") 22 # assert_nothing_raised do 23 # ast = @parser.parse(file, 'openEHR-EHR-ACTION.imaging.v1') 24 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 25 # end26 #end27 28 # must "openEHR-EHR-ACTION.referral.v1.adl be properly parsed" do 29 # file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-ACTION.referral.v1.adl") 30 # assert_nothing_raised do 31 # ast = @parser.parse(file, 'openEHR-EHR-ACTION.referral.v1') 32 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 33 # end34 #end35 36 # must "openEHR-EHR-CLUSTER.auscultation-chest.v1.adl be properly parsed" do 37 # file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.auscultation-chest.v1.adl") 38 # assert_nothing_raised do 39 # ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.auscultation-chest.v1') 40 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 41 # end42 #end43 44 # must "openEHR-EHR-CLUSTER.auscultation.v1.adl be properly parsed" do 45 # file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.auscultation.v1.adl") 46 # assert_nothing_raiseddo47 # ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.auscultation.v1')48 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 49 # end 50 # end51 52 53 # must "openEHR-EHR-CLUSTER.exam-abdomen.v1.adl be properly parsed" do 54 # file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-abdomen.v1.adl") 55 # assert_nothing_raised do 56 # ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-abdomen.v1') 57 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 58 # end59 #end60 61 # must "openEHR-EHR-CLUSTER.exam-chest.v1.adl be properly parsed" do 62 # file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-chest.v1.adl") 63 # assert_nothing_raised do 64 # ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-chest.v1') 65 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 66 # end67 #end68 69 # must "openEHR-EHR-CLUSTER.exam-generic-joint.v1.adl be properly parsed" do 70 # file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-generic-joint.v1.adl") 71 # assert_nothing_raised do 72 # ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-generic-joint.v1') 73 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 74 # end75 #end76 77 # must "openEHR-EHR-CLUSTER.exam-generic-lymphnode.v1.adl be properly parsed" do 78 # file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-generic-lymphnode.v1.adl") 79 # assert_nothing_raised do 80 # ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-generic-lymphnode.v1') 81 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 82 # end83 #end84 85 # must "openEHR-EHR-CLUSTER.exam-generic-mass.v1.adl be properly parsed" do 86 # file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-generic-mass.v1.adl") 87 # assert_nothing_raised do 88 # ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-generic-mass.v1') 89 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 90 # end91 #end92 93 # must "openEHR-EHR-CLUSTER.exam-generic.v1.adl be properly parsed" do 94 # file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-generic.v1.adl") 95 # assert_nothing_raised do 96 # ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-generic.v1') 97 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 98 # end99 #end100 101 # must "openEHR-EHR-CLUSTER.exam-nervous_system.v1.adl be properly parsed" do 102 # file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-nervous_system.v1.adl") 103 # assert_nothing_raised do 104 # ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-nervous_system.v1') 105 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 106 # end107 #end108 109 # must "openEHR-EHR-COMPOSITION.discharge.v1draft.adl be properly parsed" do 110 # file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-COMPOSITION.discharge.v1draft.adl") 111 # assert_nothing_raised do 112 # ast = @parser.parse(file, 'openEHR-EHR-COMPOSITION.discharge.v1draft') 113 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 114 # end115 #end116 117 # must "openEHR-EHR-COMPOSITION.encounter.v1draft.adl be properly parsed" do 118 # file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-COMPOSITION.encounter.v1draft.adl") 119 # assert_nothing_raised do 120 # ast = @parser.parse(file, 'openEHR-EHR-COMPOSITION.encounter.v1draft') 121 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 122 # end123 #end124 125 # must "openEHR-EHR-INSTRUCTION.medication.v1.adl be properly parsed" do 126 # file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-INSTRUCTION.medication.v1.adl") 127 # assert_nothing_raised do 128 # ast = @parser.parse(file, 'openEHR-EHR-INSTRUCTION.medication.v1') 129 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 130 # end131 #end132 133 # must "openEHR-EHR-INSTRUCTION.referral.v1.adl be properly parsed" do 134 # file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-INSTRUCTION.referral.v1.adl") 135 # assert_nothing_raised do 136 # ast = @parser.parse(file, 'openEHR-EHR-INSTRUCTION.referral.v1') 137 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 138 # end139 #end140 141 # must "openEHR-EHR-ITEM_TREE.Laboratory_request.v1.adl be properly parsed" do 142 # file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-ITEM_TREE.Laboratory_request.v1.adl") 143 # assert_nothing_raiseddo144 # ast = @parser.parse(file, 'openEHR-EHR-ITEM_TREE.Laboratory_request.v1')145 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 146 # end 147 # end148 149 150 # must "openEHR-EHR-OBSERVATION.apgar.v1.adl be properly parsed" do 151 # file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-OBSERVATION.apgar.v1.adl") 152 # assert_nothing_raised do 153 # ast = @parser.parse(file, 'openEHR-EHR-OBSERVATION.apgar.v1') 154 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 155 # end156 #end157 158 # must "openEHR-EHR-SECTION.findings.v1.adl be properly parsed" do 159 # file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-SECTION.findings.v1.adl") 160 # assert_nothing_raised do 161 # ast = @parser.parse(file, 'openEHR-EHR-SECTION.findings.v1') 162 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 163 # end164 #end165 166 # must "openEHR-EHR-SECTION.reason_for_encounter.v1.adl be properly parsed" do 167 # file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-SECTION.reason_for_encounter.v1.adl") 168 # assert_nothing_raiseddo169 # ast = @parser.parse(file, 'openEHR-EHR-SECTION.reason_for_encounter.v1')170 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 171 # end 172 # end173 174 175 # must "openEHR-EHR-SECTION.vital_signs.v1.adl be properly parsed" do 176 # file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-SECTION.vital_signs.v1.adl") 177 # assert_nothing_raised do178 # ast = @parser.parse(file, 'openEHR-EHR-SECTION.vital_signs.v1') 179 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 180 # end 181 # end 182 183 184 # # C_DV_QUANTITY parse error 185 # must "openEHR-EHR-EVALUATION.adverse.v1.adl be properly parsed" do 186 # file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-EVALUATION.adverse.v1.adl") 187 # assert_nothing_raised do 188 # ast = @parser.parse(file, 'openEHR-EHR-EVALUATION.adverse.v1') 189 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 190 # end191 #end192 193 # must "openEHR-EHR-CLUSTER.dimensions-circumference.v1.adl be properly parsed" do 194 # file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.dimensions-circumference.v1.adl") 195 # assert_nothing_raised do 196 # ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.dimensions-circumference.v1') 197 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 198 # end199 #end200 201 # must "openEHR-EHR-CLUSTER.dimensions.v1.adl be properly parsed" do 202 # file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.dimensions.v1.adl") 203 # assert_nothing_raised do 204 # ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.dimensions.v1') 205 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 206 # end207 #end208 209 # must "openEHR-EHR-CLUSTER.exam-fetus.v1.adl be properly parsed" do 210 # file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-fetus.v1.adl") 211 # assert_nothing_raised do 212 # ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-fetus.v1') 213 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 214 # end215 #end216 217 # must "openEHR-EHR-CLUSTER.exam-uterine_cervix.v1.adl be properly parsed" do 218 # file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-uterine_cervix.v1.adl") 219 # assert_nothing_raised do 220 # ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-uterine_cervix.v1') 221 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 222 # end223 #end224 225 # must "openEHR-EHR-OBSERVATION.body_mass_index.v1.adl be properly parsed" do 226 # file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-OBSERVATION.body_mass_index.v1.adl") 227 # assert_nothing_raised do 228 # ast = @parser.parse(file, 'openEHR-EHR-OBSERVATION.body_mass_index.v1') 229 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 230 # end231 #end232 20 21 must "openEHR-EHR-ACTION.referral.v1.adl be properly parsed" do 22 file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-ACTION.referral.v1.adl") 23 assert_nothing_raised do 24 ast = @parser.parse(file, 'openEHR-EHR-ACTION.referral.v1') 25 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 26 end 27 end 28 29 must "openEHR-EHR-CLUSTER.auscultation-chest.v1.adl be properly parsed" do 30 file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.auscultation-chest.v1.adl") 31 assert_nothing_raised do 32 ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.auscultation-chest.v1') 33 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 34 end 35 end 36 37 must "openEHR-EHR-CLUSTER.auscultation.v1.adl be properly parsed" do 38 file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.auscultation.v1.adl") 39 assert_nothing_raised do 40 ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.auscultation.v1') 41 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 42 end 43 end 44 45 46 must "openEHR-EHR-CLUSTER.exam-abdomen.v1.adl be properly parsed" do 47 file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-abdomen.v1.adl") 48 assert_nothing_raised do 49 ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-abdomen.v1') 50 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 51 end 52 end 53 54 must "openEHR-EHR-CLUSTER.exam-chest.v1.adl be properly parsed" do 55 file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-chest.v1.adl") 56 assert_nothing_raised do 57 ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-chest.v1') 58 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 59 end 60 end 61 62 must "openEHR-EHR-CLUSTER.exam-generic-joint.v1.adl be properly parsed" do 63 file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-generic-joint.v1.adl") 64 assert_nothing_raised do 65 ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-generic-joint.v1') 66 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 67 end 68 end 69 70 must "openEHR-EHR-CLUSTER.exam-generic-lymphnode.v1.adl be properly parsed" do 71 file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-generic-lymphnode.v1.adl") 72 assert_nothing_raised do 73 ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-generic-lymphnode.v1') 74 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 75 end 76 end 77 78 must "openEHR-EHR-CLUSTER.exam-generic-mass.v1.adl be properly parsed" do 79 file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-generic-mass.v1.adl") 80 assert_nothing_raised do 81 ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-generic-mass.v1') 82 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 83 end 84 end 85 86 must "openEHR-EHR-CLUSTER.exam-generic.v1.adl be properly parsed" do 87 file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-generic.v1.adl") 88 assert_nothing_raised do 89 ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-generic.v1') 90 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 91 end 92 end 93 94 must "openEHR-EHR-CLUSTER.exam-nervous_system.v1.adl be properly parsed" do 95 file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-nervous_system.v1.adl") 96 assert_nothing_raised do 97 ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-nervous_system.v1') 98 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 99 end 100 end 101 102 must "openEHR-EHR-COMPOSITION.discharge.v1draft.adl be properly parsed" do 103 file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-COMPOSITION.discharge.v1draft.adl") 104 assert_nothing_raised do 105 ast = @parser.parse(file, 'openEHR-EHR-COMPOSITION.discharge.v1draft') 106 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 107 end 108 end 109 110 must "openEHR-EHR-COMPOSITION.encounter.v1draft.adl be properly parsed" do 111 file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-COMPOSITION.encounter.v1draft.adl") 112 assert_nothing_raised do 113 ast = @parser.parse(file, 'openEHR-EHR-COMPOSITION.encounter.v1draft') 114 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 115 end 116 end 117 118 must "openEHR-EHR-INSTRUCTION.medication.v1.adl be properly parsed" do 119 file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-INSTRUCTION.medication.v1.adl") 120 assert_nothing_raised do 121 ast = @parser.parse(file, 'openEHR-EHR-INSTRUCTION.medication.v1') 122 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 123 end 124 end 125 126 must "openEHR-EHR-INSTRUCTION.referral.v1.adl be properly parsed" do 127 file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-INSTRUCTION.referral.v1.adl") 128 assert_nothing_raised do 129 ast = @parser.parse(file, 'openEHR-EHR-INSTRUCTION.referral.v1') 130 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 131 end 132 end 133 134 must "openEHR-EHR-ITEM_TREE.Laboratory_request.v1.adl be properly parsed" do 135 file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-ITEM_TREE.Laboratory_request.v1.adl") 136 assert_nothing_raised do 137 ast = @parser.parse(file, 'openEHR-EHR-ITEM_TREE.Laboratory_request.v1') 138 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 139 end 140 end 141 142 143 must "openEHR-EHR-OBSERVATION.apgar.v1.adl be properly parsed" do 144 file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-OBSERVATION.apgar.v1.adl") 145 assert_nothing_raised do 146 ast = @parser.parse(file, 'openEHR-EHR-OBSERVATION.apgar.v1') 147 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 148 end 149 end 150 151 must "openEHR-EHR-SECTION.findings.v1.adl be properly parsed" do 152 file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-SECTION.findings.v1.adl") 153 assert_nothing_raised do 154 ast = @parser.parse(file, 'openEHR-EHR-SECTION.findings.v1') 155 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 156 end 157 end 158 159 must "openEHR-EHR-SECTION.reason_for_encounter.v1.adl be properly parsed" do 160 file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-SECTION.reason_for_encounter.v1.adl") 161 assert_nothing_raised do 162 ast = @parser.parse(file, 'openEHR-EHR-SECTION.reason_for_encounter.v1') 163 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 164 end 165 end 166 167 168 must "openEHR-EHR-SECTION.vital_signs.v1.adl be properly parsed" do 169 file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-SECTION.vital_signs.v1.adl") 170 assert_nothing_raised do 171 ast = @parser.parse(file, 'openEHR-EHR-SECTION.vital_signs.v1') 172 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 173 end 174 end 175 176 177 # C_DV_QUANTITY parse error 178 must "openEHR-EHR-EVALUATION.adverse.v1.adl be properly parsed" do 179 file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-EVALUATION.adverse.v1.adl") 180 assert_nothing_raised do 181 ast = @parser.parse(file, 'openEHR-EHR-EVALUATION.adverse.v1') 182 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 183 end 184 end 185 186 must "openEHR-EHR-CLUSTER.dimensions-circumference.v1.adl be properly parsed" do 187 file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.dimensions-circumference.v1.adl") 188 assert_nothing_raised do 189 ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.dimensions-circumference.v1') 190 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 191 end 192 end 193 194 must "openEHR-EHR-CLUSTER.dimensions.v1.adl be properly parsed" do 195 file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.dimensions.v1.adl") 196 assert_nothing_raised do 197 ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.dimensions.v1') 198 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 199 end 200 end 201 202 must "openEHR-EHR-CLUSTER.exam-fetus.v1.adl be properly parsed" do 203 file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-fetus.v1.adl") 204 assert_nothing_raised do 205 ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-fetus.v1') 206 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 207 end 208 end 209 210 must "openEHR-EHR-CLUSTER.exam-uterine_cervix.v1.adl be properly parsed" do 211 file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-uterine_cervix.v1.adl") 212 assert_nothing_raised do 213 ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-uterine_cervix.v1') 214 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 215 end 216 end 217 218 must "openEHR-EHR-OBSERVATION.body_mass_index.v1.adl be properly parsed" do 219 file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-OBSERVATION.body_mass_index.v1.adl") 220 assert_nothing_raised do 221 ast = @parser.parse(file, 'openEHR-EHR-OBSERVATION.body_mass_index.v1') 222 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 223 end 224 end 225 226 must "openEHR-EHR-ACTION.imaging.v1.adl be properly parsed" do 227 file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-ACTION.imaging.v1.adl") 228 assert_nothing_raised do 229 ast = @parser.parse(file, 'openEHR-EHR-ACTION.imaging.v1') 230 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 231 end 232 end 233 233 234 234 end -
ruby/trunk/lib/adl_parser/test/test_helper.rb
r307 r317 9 9 #require 'rm.rb' 10 10 #require 'am.rb' 11 require 'open-uri' 12 require 'hpricot' 13 11 14 12 15
Note:
See TracChangeset
for help on using the changeset viewer.