open_ehr 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (253) hide show
  1. data/.document +5 -0
  2. data/Gemfile +14 -0
  3. data/Gemfile.lock +43 -0
  4. data/Guardfile +9 -0
  5. data/History.txt +4 -0
  6. data/Manifest.txt +16 -0
  7. data/PostInstall.txt +9 -0
  8. data/README.rdoc +66 -0
  9. data/Rakefile +49 -0
  10. data/VERSION +1 -0
  11. data/doc/README_rdoc.html +148 -0
  12. data/doc/created.rid +2 -0
  13. data/doc/images/brick.png +0 -0
  14. data/doc/images/brick_link.png +0 -0
  15. data/doc/images/bug.png +0 -0
  16. data/doc/images/bullet_black.png +0 -0
  17. data/doc/images/bullet_toggle_minus.png +0 -0
  18. data/doc/images/bullet_toggle_plus.png +0 -0
  19. data/doc/images/date.png +0 -0
  20. data/doc/images/find.png +0 -0
  21. data/doc/images/loadingAnimation.gif +0 -0
  22. data/doc/images/macFFBgHack.png +0 -0
  23. data/doc/images/package.png +0 -0
  24. data/doc/images/page_green.png +0 -0
  25. data/doc/images/page_white_text.png +0 -0
  26. data/doc/images/page_white_width.png +0 -0
  27. data/doc/images/plugin.png +0 -0
  28. data/doc/images/ruby.png +0 -0
  29. data/doc/images/tag_green.png +0 -0
  30. data/doc/images/wrench.png +0 -0
  31. data/doc/images/wrench_orange.png +0 -0
  32. data/doc/images/zoom.png +0 -0
  33. data/doc/index.html +54 -0
  34. data/doc/js/darkfish.js +116 -0
  35. data/doc/js/jquery.js +32 -0
  36. data/doc/js/quicksearch.js +114 -0
  37. data/doc/js/thickbox-compressed.js +10 -0
  38. data/doc/openehr_terminology.xml +2700 -0
  39. data/doc/rdoc.css +706 -0
  40. data/lib/#open_ehr.rb# +11 -0
  41. data/lib/open_ehr/am/archetype/archetype_description/archetype_description.rb +21 -0
  42. data/lib/open_ehr/am/archetype/assertion.rb +190 -0
  43. data/lib/open_ehr/am/archetype/constraint_model/primitive.rb +296 -0
  44. data/lib/open_ehr/am/archetype/constraint_model.rb +340 -0
  45. data/lib/open_ehr/am/archetype/ontology.rb +97 -0
  46. data/lib/open_ehr/am/archetype.rb +134 -0
  47. data/lib/open_ehr/am/open_ehr_profile/data_types/basic.rb +29 -0
  48. data/lib/open_ehr/am/open_ehr_profile/data_types/quantity.rb +19 -0
  49. data/lib/open_ehr/am/open_ehr_profile/data_types/text.rb +12 -0
  50. data/lib/open_ehr/am.rb +8 -0
  51. data/lib/open_ehr/assumed_library_types.rb +627 -0
  52. data/lib/open_ehr/parser/xml_perser.rb +13 -0
  53. data/lib/open_ehr/parser.rb +19 -0
  54. data/lib/open_ehr/rm/common/archetyped.rb +182 -0
  55. data/lib/open_ehr/rm/common/change_control.rb +332 -0
  56. data/lib/open_ehr/rm/common/directory.rb +29 -0
  57. data/lib/open_ehr/rm/common/generic.rb +216 -0
  58. data/lib/open_ehr/rm/common/resource.rb +154 -0
  59. data/lib/open_ehr/rm/common.rb +14 -0
  60. data/lib/open_ehr/rm/composition/content/entry.rb +246 -0
  61. data/lib/open_ehr/rm/composition/content/navigation.rb +31 -0
  62. data/lib/open_ehr/rm/composition/content.rb +22 -0
  63. data/lib/open_ehr/rm/composition.rb +103 -0
  64. data/lib/open_ehr/rm/data_structures/history.rb +117 -0
  65. data/lib/open_ehr/rm/data_structures/item_structure/representation.rb +63 -0
  66. data/lib/open_ehr/rm/data_structures/item_structure.rb +216 -0
  67. data/lib/open_ehr/rm/data_structures.rb +25 -0
  68. data/lib/open_ehr/rm/data_types/basic.rb +108 -0
  69. data/lib/open_ehr/rm/data_types/charset.lst +818 -0
  70. data/lib/open_ehr/rm/data_types/charset_extract.rb +24 -0
  71. data/lib/open_ehr/rm/data_types/encapsulated.rb +98 -0
  72. data/lib/open_ehr/rm/data_types/quantity/date_time.rb +229 -0
  73. data/lib/open_ehr/rm/data_types/quantity.rb +403 -0
  74. data/lib/open_ehr/rm/data_types/text.rb +168 -0
  75. data/lib/open_ehr/rm/data_types/time_specification.rb +75 -0
  76. data/lib/open_ehr/rm/data_types/uri.rb +82 -0
  77. data/lib/open_ehr/rm/data_types.rb +14 -0
  78. data/lib/open_ehr/rm/demographic.rb +269 -0
  79. data/lib/open_ehr/rm/ehr.rb +162 -0
  80. data/lib/open_ehr/rm/integration.rb +27 -0
  81. data/lib/open_ehr/rm/security.rb +12 -0
  82. data/lib/open_ehr/rm/support/assumed_types.rb +81 -0
  83. data/lib/open_ehr/rm/support/definition.rb +15 -0
  84. data/lib/open_ehr/rm/support/identification.rb +408 -0
  85. data/lib/open_ehr/rm/support/measurement.rb +17 -0
  86. data/lib/open_ehr/rm/support/terminology.rb +135 -0
  87. data/lib/open_ehr/rm/support.rb +14 -0
  88. data/lib/open_ehr/rm.rb +16 -0
  89. data/lib/open_ehr/serializer.rb +272 -0
  90. data/lib/open_ehr/terminology/open_ehr_terminology.rb +41 -0
  91. data/lib/open_ehr/terminology.rb +7 -0
  92. data/lib/open_ehr/writer.rb +12 -0
  93. data/lib/open_ehr.rb +11 -0
  94. data/spec/lib/open_ehr/am/archetype/archetype_spec.rb +98 -0
  95. data/spec/lib/open_ehr/am/archetype/assertion/assertion_spec.rb +60 -0
  96. data/spec/lib/open_ehr/am/archetype/assertion/assertion_variable_spec.rb +30 -0
  97. data/spec/lib/open_ehr/am/archetype/assertion/expr_binary_operator.rb +40 -0
  98. data/spec/lib/open_ehr/am/archetype/assertion/expr_item_spec.rb +28 -0
  99. data/spec/lib/open_ehr/am/archetype/assertion/expr_leaf_spec.rb +34 -0
  100. data/spec/lib/open_ehr/am/archetype/assertion/expr_operator_spec.rb +25 -0
  101. data/spec/lib/open_ehr/am/archetype/assertion/expr_unary_operator_spec.rb +26 -0
  102. data/spec/lib/open_ehr/am/archetype/assertion/operator_kind_spec.rb +110 -0
  103. data/spec/lib/open_ehr/am/archetype/constraint_model/archetype_constraint_spec.rb +56 -0
  104. data/spec/lib/open_ehr/am/archetype/constraint_model/archetype_internal_ref_spec.rb +36 -0
  105. data/spec/lib/open_ehr/am/archetype/constraint_model/archetype_slot_spec.rb +61 -0
  106. data/spec/lib/open_ehr/am/archetype/constraint_model/c_attribute_spec.rb +59 -0
  107. data/spec/lib/open_ehr/am/archetype/constraint_model/c_complex_object_spec.rb +39 -0
  108. data/spec/lib/open_ehr/am/archetype/constraint_model/c_defined_object_spec.rb +53 -0
  109. data/spec/lib/open_ehr/am/archetype/constraint_model/c_domain_type_spec.rb +25 -0
  110. data/spec/lib/open_ehr/am/archetype/constraint_model/c_multiple_attribute_spec.rb +29 -0
  111. data/spec/lib/open_ehr/am/archetype/constraint_model/c_object_spec.rb +61 -0
  112. data/spec/lib/open_ehr/am/archetype/constraint_model/c_primitive_object_spec.rb +33 -0
  113. data/spec/lib/open_ehr/am/archetype/constraint_model/c_reference_object_spec.rb +17 -0
  114. data/spec/lib/open_ehr/am/archetype/constraint_model/c_single_attribute_spec.rb +28 -0
  115. data/spec/lib/open_ehr/am/archetype/constraint_model/cardinality_spec.rb +68 -0
  116. data/spec/lib/open_ehr/am/archetype/constraint_model/constraint_ref_spec.rb +29 -0
  117. data/spec/lib/open_ehr/am/archetype/constraint_model/primitive/c_boolean_spec.rb +52 -0
  118. data/spec/lib/open_ehr/am/archetype/constraint_model/primitive/c_date_spec.rb +80 -0
  119. data/spec/lib/open_ehr/am/archetype/constraint_model/primitive/c_date_time_spec.rb +106 -0
  120. data/spec/lib/open_ehr/am/archetype/constraint_model/primitive/c_duration_spec.rb +69 -0
  121. data/spec/lib/open_ehr/am/archetype/constraint_model/primitive/c_integer_spec.rb +62 -0
  122. data/spec/lib/open_ehr/am/archetype/constraint_model/primitive/c_primitive_spec.rb +39 -0
  123. data/spec/lib/open_ehr/am/archetype/constraint_model/primitive/c_real_spec.rb +14 -0
  124. data/spec/lib/open_ehr/am/archetype/constraint_model/primitive/c_string_spec.rb +69 -0
  125. data/spec/lib/open_ehr/am/archetype/constraint_model/primitive/c_time_spec.rb +79 -0
  126. data/spec/lib/open_ehr/am/archetype/ontology/archetype_ontology_spec.rb +59 -0
  127. data/spec/lib/open_ehr/am/archetype/ontology/archetype_term_spec.rb +43 -0
  128. data/spec/lib/open_ehr/am/archetype/validity_kind_spec.rb +42 -0
  129. data/spec/lib/open_ehr/assumed_library_types/interval_spec.rb +140 -0
  130. data/spec/lib/open_ehr/assumed_library_types/iso8601_date_spec.rb +236 -0
  131. data/spec/lib/open_ehr/assumed_library_types/iso8601_date_time_spec.rb +47 -0
  132. data/spec/lib/open_ehr/assumed_library_types/iso8601_duration_spec.rb +150 -0
  133. data/spec/lib/open_ehr/assumed_library_types/iso8601_time_spec.rb +234 -0
  134. data/spec/lib/open_ehr/assumed_library_types/iso8601_timezone_spec.rb +57 -0
  135. data/spec/lib/open_ehr/assumed_library_types/time_definitions_spec.rb +136 -0
  136. data/spec/lib/open_ehr/rm/common/archetyped/archetyped_spec.rb +50 -0
  137. data/spec/lib/open_ehr/rm/common/archetyped/feeder_audit_details_spec.rb +60 -0
  138. data/spec/lib/open_ehr/rm/common/archetyped/feeder_audit_spec.rb +51 -0
  139. data/spec/lib/open_ehr/rm/common/archetyped/link_spec.rb +42 -0
  140. data/spec/lib/open_ehr/rm/common/archetyped/locatable_spec.rb +89 -0
  141. data/spec/lib/open_ehr/rm/common/archetyped/pathable_spec.rb +42 -0
  142. data/spec/lib/open_ehr/rm/common/change_control/contribution_spec.rb +56 -0
  143. data/spec/lib/open_ehr/rm/common/change_control/imported_version_spec.rb +63 -0
  144. data/spec/lib/open_ehr/rm/common/change_control/original_version_spec.rb +71 -0
  145. data/spec/lib/open_ehr/rm/common/change_control/version_spec.rb +92 -0
  146. data/spec/lib/open_ehr/rm/common/change_control/versioned_object_spec.rb +285 -0
  147. data/spec/lib/open_ehr/rm/common/directory/folder_spec.rb +26 -0
  148. data/spec/lib/open_ehr/rm/common/generic/attestation_spec.rb +62 -0
  149. data/spec/lib/open_ehr/rm/common/generic/audit_details_spec.rb +51 -0
  150. data/spec/lib/open_ehr/rm/common/generic/participation_spec.rb +36 -0
  151. data/spec/lib/open_ehr/rm/common/generic/party_identified_spec.rb +64 -0
  152. data/spec/lib/open_ehr/rm/common/generic/party_proxy_spec.rb +18 -0
  153. data/spec/lib/open_ehr/rm/common/generic/party_related_spec.rb +24 -0
  154. data/spec/lib/open_ehr/rm/common/generic/revision_history_item_spec.rb +43 -0
  155. data/spec/lib/open_ehr/rm/common/generic/revision_history_spec.rb +45 -0
  156. data/spec/lib/open_ehr/rm/common/resource/authored_resource_spec.rb +68 -0
  157. data/spec/lib/open_ehr/rm/common/resource/resource_description_item_spec.rb +105 -0
  158. data/spec/lib/open_ehr/rm/common/resource/resource_description_spec.rb +74 -0
  159. data/spec/lib/open_ehr/rm/common/resource/translation_details_spec.rb +35 -0
  160. data/spec/lib/open_ehr/rm/composition/composition_spec.rb +92 -0
  161. data/spec/lib/open_ehr/rm/composition/content/content_item_spec.rb +14 -0
  162. data/spec/lib/open_ehr/rm/composition/content/entry/action_spec.rb +69 -0
  163. data/spec/lib/open_ehr/rm/composition/content/entry/activity_spec.rb +61 -0
  164. data/spec/lib/open_ehr/rm/composition/content/entry/admin_entry_spec.rb +38 -0
  165. data/spec/lib/open_ehr/rm/composition/content/entry/care_entry_spec.rb +37 -0
  166. data/spec/lib/open_ehr/rm/composition/content/entry/entry_spec.rb +88 -0
  167. data/spec/lib/open_ehr/rm/composition/content/entry/evaluation_spec.rb +37 -0
  168. data/spec/lib/open_ehr/rm/composition/content/entry/instruction_details_spec.rb +51 -0
  169. data/spec/lib/open_ehr/rm/composition/content/entry/instruction_spec.rb +62 -0
  170. data/spec/lib/open_ehr/rm/composition/content/entry/ism_transition_spec.rb +46 -0
  171. data/spec/lib/open_ehr/rm/composition/content/entry/observation_spec.rb +45 -0
  172. data/spec/lib/open_ehr/rm/composition/content/navigation/section_spec.rb +32 -0
  173. data/spec/lib/open_ehr/rm/composition/event_context_spec.rb +88 -0
  174. data/spec/lib/open_ehr/rm/data_structures/data_structure_spec.rb +21 -0
  175. data/spec/lib/open_ehr/rm/data_structures/history/event_spec.rb +44 -0
  176. data/spec/lib/open_ehr/rm/data_structures/history/history_spec.rb +67 -0
  177. data/spec/lib/open_ehr/rm/data_structures/history/interval_event_spec.rb +43 -0
  178. data/spec/lib/open_ehr/rm/data_structures/item_structure/item_list_spec.rb +53 -0
  179. data/spec/lib/open_ehr/rm/data_structures/item_structure/item_single_spec.rb +29 -0
  180. data/spec/lib/open_ehr/rm/data_structures/item_structure/item_table_spec.rb +147 -0
  181. data/spec/lib/open_ehr/rm/data_structures/item_structure/item_tree_spec.rb +48 -0
  182. data/spec/lib/open_ehr/rm/data_structures/item_structure/representation/cluster_spec.rb +26 -0
  183. data/spec/lib/open_ehr/rm/data_structures/item_structure/representation/element_spec.rb +22 -0
  184. data/spec/lib/open_ehr/rm/data_types/basic/data_value_spec.rb +17 -0
  185. data/spec/lib/open_ehr/rm/data_types/basic/dv_boolean_spec.rb +29 -0
  186. data/spec/lib/open_ehr/rm/data_types/basic/dv_identifier_spec.rb +108 -0
  187. data/spec/lib/open_ehr/rm/data_types/basic/dv_state_spec.rb +44 -0
  188. data/spec/lib/open_ehr/rm/data_types/encapsulated/dv_encapsulated_spec.rb +42 -0
  189. data/spec/lib/open_ehr/rm/data_types/encapsulated/dv_multimedia_spec.rb +79 -0
  190. data/spec/lib/open_ehr/rm/data_types/encapsulated/dv_parsable_spec.rb +34 -0
  191. data/spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_date_spec.rb +64 -0
  192. data/spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_date_time_spec.rb +25 -0
  193. data/spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_tempral_spec.rb +24 -0
  194. data/spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_time_spec.rb +37 -0
  195. data/spec/lib/open_ehr/rm/data_types/quantity/dv_absolute_quantity_spec.rb +35 -0
  196. data/spec/lib/open_ehr/rm/data_types/quantity/dv_amount_spec.rb +105 -0
  197. data/spec/lib/open_ehr/rm/data_types/quantity/dv_count_spec.rb +12 -0
  198. data/spec/lib/open_ehr/rm/data_types/quantity/dv_interval_spec.rb +17 -0
  199. data/spec/lib/open_ehr/rm/data_types/quantity/dv_ordered_spec.rb +60 -0
  200. data/spec/lib/open_ehr/rm/data_types/quantity/dv_ordinal_spec.rb +74 -0
  201. data/spec/lib/open_ehr/rm/data_types/quantity/dv_proportion_spec.rb +162 -0
  202. data/spec/lib/open_ehr/rm/data_types/quantity/dv_quantified_spec.rb +36 -0
  203. data/spec/lib/open_ehr/rm/data_types/quantity/dv_quantity_spec.rb +78 -0
  204. data/spec/lib/open_ehr/rm/data_types/quantity/proportion_kind_spec.rb +24 -0
  205. data/spec/lib/open_ehr/rm/data_types/quantity/reference_range_spec.rb +43 -0
  206. data/spec/lib/open_ehr/rm/data_types/text/code_phrase_spec.rb +23 -0
  207. data/spec/lib/open_ehr/rm/data_types/text/dv_paragraph_spec.rb +13 -0
  208. data/spec/lib/open_ehr/rm/data_types/text/dv_text_spec.rb +57 -0
  209. data/spec/lib/open_ehr/rm/data_types/text/term_mapping_spec.rb +59 -0
  210. data/spec/lib/open_ehr/rm/data_types/uri/dv_ehr_uri_spec.rb +21 -0
  211. data/spec/lib/open_ehr/rm/data_types/uri/dv_uri_spec.rb +36 -0
  212. data/spec/lib/open_ehr/rm/demographic/actor_spec.rb +79 -0
  213. data/spec/lib/open_ehr/rm/demographic/address_spec.rb +33 -0
  214. data/spec/lib/open_ehr/rm/demographic/capability_spec.rb +37 -0
  215. data/spec/lib/open_ehr/rm/demographic/contact_spec.rb +45 -0
  216. data/spec/lib/open_ehr/rm/demographic/party_identity_spec.rb +32 -0
  217. data/spec/lib/open_ehr/rm/demographic/party_relationship_spec.rb +84 -0
  218. data/spec/lib/open_ehr/rm/demographic/party_spec.rb +133 -0
  219. data/spec/lib/open_ehr/rm/demographic/role_spec.rb +58 -0
  220. data/spec/lib/open_ehr/rm/ehr/ehr_access_spec.rb +33 -0
  221. data/spec/lib/open_ehr/rm/ehr/ehr_spec.rb +139 -0
  222. data/spec/lib/open_ehr/rm/ehr/ehr_status_spec.rb +52 -0
  223. data/spec/lib/open_ehr/rm/ehr/versioned_composition_spec.rb +33 -0
  224. data/spec/lib/open_ehr/rm/integration/generic_entry_spec.rb +31 -0
  225. data/spec/lib/open_ehr/rm/support/identification/access_group_ref_spec.rb +19 -0
  226. data/spec/lib/open_ehr/rm/support/identification/archetype_id_spec.rb +152 -0
  227. data/spec/lib/open_ehr/rm/support/identification/generic_id_spec.rb +33 -0
  228. data/spec/lib/open_ehr/rm/support/identification/hier_object_id_spec.rb +12 -0
  229. data/spec/lib/open_ehr/rm/support/identification/internet_id_spec.rb +12 -0
  230. data/spec/lib/open_ehr/rm/support/identification/iso_oid_spec.rb +12 -0
  231. data/spec/lib/open_ehr/rm/support/identification/locatable_ref_spec.rb +34 -0
  232. data/spec/lib/open_ehr/rm/support/identification/object_id_spec.rb +24 -0
  233. data/spec/lib/open_ehr/rm/support/identification/object_ref_spec.rb +33 -0
  234. data/spec/lib/open_ehr/rm/support/identification/object_version_id_spec.rb +60 -0
  235. data/spec/lib/open_ehr/rm/support/identification/party_ref_spec.rb +29 -0
  236. data/spec/lib/open_ehr/rm/support/identification/template_id_spec.rb +12 -0
  237. data/spec/lib/open_ehr/rm/support/identification/terminology_id_spec.rb +33 -0
  238. data/spec/lib/open_ehr/rm/support/identification/uid_based_id_spec.rb +50 -0
  239. data/spec/lib/open_ehr/rm/support/identification/uid_spec.rb +29 -0
  240. data/spec/lib/open_ehr/rm/support/identification/version_tree_id_spec.rb +104 -0
  241. data/spec/lib/open_ehr/rm/support/measurement_service_spec.rb +7 -0
  242. data/spec/lib/open_ehr/rm/support/terminology_service_spec.rb +24 -0
  243. data/spec/lib/open_ehr/serializer/adl-test-entry.most_minimal.test.adl +20 -0
  244. data/spec/lib/open_ehr/serializer/adl_serializer_spec.rb +47 -0
  245. data/spec/lib/open_ehr/serializer/openEHR-EHR-SECTION.test.v1.adl +38 -0
  246. data/spec/lib/open_ehr/serializer/openEHR-EHR-SECTION.test.v1.xml +58 -0
  247. data/spec/lib/open_ehr/serializer/sample_archetype_spec.rb +44 -0
  248. data/spec/lib/open_ehr/serializer/xml_serializer_spec.rb +49 -0
  249. data/spec/lib/open_ehr/terminology/open_ehr_terminology_spec.rb +40 -0
  250. data/spec/rcov.opts +1 -0
  251. data/spec/spec.opts +5 -0
  252. data/spec/spec_helper.rb +54 -0
  253. metadata +401 -0
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem 'xml-simple'
4
+ gem 'activesupport'
5
+ gem 'locale'
6
+ gem 'builder'
7
+ gem 'jeweler'
8
+ gem 'i18n'
9
+
10
+ group :development do
11
+ gem 'rspec'
12
+ gem 'guard-rspec'
13
+ gem 'spork'
14
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,43 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ activesupport (3.0.7)
5
+ builder (3.0.0)
6
+ diff-lcs (1.1.2)
7
+ git (1.2.5)
8
+ guard (0.3.4)
9
+ thor (~> 0.14.6)
10
+ guard-rspec (0.3.1)
11
+ guard (>= 0.2.2)
12
+ i18n (0.5.0)
13
+ jeweler (1.6.0)
14
+ bundler (~> 1.0.0)
15
+ git (>= 1.2.5)
16
+ rake
17
+ locale (2.0.5)
18
+ rake (0.8.7)
19
+ rspec (2.5.0)
20
+ rspec-core (~> 2.5.0)
21
+ rspec-expectations (~> 2.5.0)
22
+ rspec-mocks (~> 2.5.0)
23
+ rspec-core (2.5.2)
24
+ rspec-expectations (2.5.0)
25
+ diff-lcs (~> 1.1.2)
26
+ rspec-mocks (2.5.0)
27
+ spork (0.8.4)
28
+ thor (0.14.6)
29
+ xml-simple (1.0.15)
30
+
31
+ PLATFORMS
32
+ ruby
33
+
34
+ DEPENDENCIES
35
+ activesupport
36
+ builder
37
+ guard-rspec
38
+ i18n
39
+ jeweler
40
+ locale
41
+ rspec
42
+ spork
43
+ xml-simple
data/Guardfile ADDED
@@ -0,0 +1,9 @@
1
+ guard 'rspec' do
2
+ watch(%r{^spec/.+_spec\.rb})
3
+ watch(%r{^lib/(.+)\.rb}) { |m| "spec/lib/#{m[1]}_spec.rb" }
4
+ watch('spec/spec_helper.rb') { "spec" }
5
+ end
6
+
7
+ guard 'spork' do
8
+ watch('spec/spec_helper.rb')
9
+ end
data/History.txt ADDED
@@ -0,0 +1,4 @@
1
+ === 0.0.1 2011-04-26
2
+
3
+ * 1 major enhancement:
4
+ * Initial release
data/Manifest.txt ADDED
@@ -0,0 +1,16 @@
1
+ History.txt
2
+ Manifest.txt
3
+ PostInstall.txt
4
+ README.rdoc
5
+ Rakefile
6
+ bin/open_ehr
7
+ lib/open_ehr.rb
8
+ lib/open_ehr/cli.rb
9
+ script/console
10
+ script/destroy
11
+ script/generate
12
+ spec/open_ehr_cli_spec.rb
13
+ spec/open_ehr_spec.rb
14
+ spec/spec.opts
15
+ spec/spec_helper.rb
16
+ tasks/rspec.rake
data/PostInstall.txt ADDED
@@ -0,0 +1,9 @@
1
+ For more information on the Ruby implementation of the
2
+ openEHR Project,
3
+ see http://openehr.jp/
4
+
5
+ For more information on the openEHR Project,
6
+ see http://openehr.org/
7
+
8
+
9
+
data/README.rdoc ADDED
@@ -0,0 +1,66 @@
1
+ = Synopsis
2
+
3
+ Ruby openEHR implementation project.
4
+ * http://github.com/skoba/ruby-impl-openehr
5
+
6
+ = Version
7
+
8
+ Release-0.6.0
9
+
10
+ = Requirements
11
+
12
+ * Ruby 1.8.7 or higher, 1.9.2 reccomended
13
+ * RubyGems
14
+ * Tested with Ruby 1.9.2 on Linux and FreeBSD.
15
+ * If you use Ruby 1.6, you should prepare racc
16
+ runtime environment and some adjustment
17
+ * It should work on other platforms with Ruby
18
+ support as well.
19
+
20
+ == DESCRIPTION:
21
+
22
+ This is the version 0.6.0 release of Ruby openEHR implementation
23
+ project. This release is still experimental preview of our work based
24
+ on openEHR specification release 1.0.2. We implemented almost half of
25
+ the specifications of the openEHR. The work is still in progress. The
26
+ intention is to have complete implementation of openEHR Reference
27
+ Model and some of the Archetype Object Models, with support for
28
+ archetype based object creation and validation.
29
+
30
+ Parser and Seriarizer are also primitive, we are challanging to
31
+ descrive archetype as another formalism such as YAML, instead of ADL.
32
+
33
+ Almost all classes passed the test constructed by rspec or
34
+ test/unit. This test cases are under /spec.
35
+
36
+ Some specifications are not well determined yet, such as
37
+ rm/security and so on. We postponed to implement such
38
+ classes.
39
+
40
+ Terminology and Demographic server will be implemented in
41
+ other project.
42
+
43
+ = Authors
44
+ Akimichi Tatsukawa, Shinji Kobayashi
45
+ openEHR.jp, <http://openehr.jp>
46
+
47
+ = Copyright
48
+ The software, including all files in this directory
49
+ and subdirectories is copyrighted to the original
50
+ authors and contributors, 2008
51
+ All Rights Reserved.
52
+
53
+ = License
54
+
55
+ This product is under openEHR Open Source Software License
56
+
57
+ The openEHR Foundation uses the Mozilla Tri-license 1.1 on
58
+ all software copyrighted to the Foundation. This licence
59
+ essentially provides the user a choice of licence conditions
60
+ under which to operate with any given piece of software,
61
+ being: the Mozilla Public licence (MPL), and the Free
62
+ Software Foundation GNU General Public Licence (GPL) and
63
+ Lesser GNU General Public Licence (LGPL). See the Mozilla
64
+ relicensing FAQ for details of this license. This in no way
65
+ constrains the way in which software created by other
66
+ organisations is licenced.
data/Rakefile ADDED
@@ -0,0 +1,49 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ require './lib/open_ehr'
4
+
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
+ gem.name = "open_ehr"
18
+ gem.homepage = "http://github.com/skoba/ruby-impl-openehr"
19
+ gem.license = "The openEHR Open Source Software license(mozilla tri-license)"
20
+ gem.summary = %Q{Ruby implementation of the openEHR specification}
21
+ gem.description = %Q{This project is an implementation of the openEHR specification on Ruby.}
22
+ gem.email = "skoba@moss.gr.jp"
23
+ gem.authors = ["Shinji KOBAYASHI", "Akimichi Tatsukawa"]
24
+ # dependencies defined in Gemfile
25
+ end
26
+ Jeweler::RubygemsDotOrgTasks.new
27
+
28
+ require 'rspec/core'
29
+ require 'rspec/core/rake_task'
30
+ RSpec::Core::RakeTask.new(:spec) do |spec|
31
+ spec.pattern = FileList['spec/**/*_spec.rb']
32
+ end
33
+
34
+ RSpec::Core::RakeTask.new(:rcov) do |spec|
35
+ spec.pattern = 'spec/**/*_spec.rb'
36
+ spec.rcov = true
37
+ end
38
+
39
+ task :default => :spec
40
+
41
+ require 'rake/rdoctask'
42
+ Rake::RDocTask.new do |rdoc|
43
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
44
+
45
+ rdoc.rdoc_dir = 'rdoc'
46
+ rdoc.title = "gempack #{version}"
47
+ rdoc.rdoc_files.include('README*')
48
+ rdoc.rdoc_files.include('lib/**/*.rb')
49
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.6.1
@@ -0,0 +1,148 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
+ <head>
7
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
8
+
9
+ <title>File: README.rdoc [RDoc Documentation]</title>
10
+
11
+ <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet" />
12
+
13
+ <script src="./js/jquery.js" type="text/javascript"
14
+ charset="utf-8"></script>
15
+ <script src="./js/thickbox-compressed.js" type="text/javascript"
16
+ charset="utf-8"></script>
17
+ <script src="./js/quicksearch.js" type="text/javascript"
18
+ charset="utf-8"></script>
19
+ <script src="./js/darkfish.js" type="text/javascript"
20
+ charset="utf-8"></script>
21
+ </head>
22
+
23
+ <body class="file">
24
+ <div id="metadata">
25
+ <div id="home-metadata">
26
+ <div id="home-section" class="section">
27
+ <h3 class="section-header">
28
+ <a href="./index.html">Home</a>
29
+ <a href="./index.html#classes">Classes</a>
30
+ <a href="./index.html#methods">Methods</a>
31
+ </h3>
32
+ </div>
33
+ </div>
34
+
35
+ <div id="project-metadata">
36
+
37
+
38
+ <div id="fileindex-section" class="section project-section">
39
+ <h3 class="section-header">Files</h3>
40
+ <ul>
41
+
42
+ <li class="file"><a href="./README_rdoc.html">README.rdoc</a></li>
43
+
44
+ </ul>
45
+ </div>
46
+
47
+
48
+ <div id="classindex-section" class="section project-section">
49
+ <h3 class="section-header">Class Index
50
+ <span class="search-toggle"><img src="./images/find.png"
51
+ height="16" width="16" alt="[+]"
52
+ title="show/hide quicksearch" /></span></h3>
53
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
54
+ <fieldset>
55
+ <legend>Quicksearch</legend>
56
+ <input type="text" name="quicksearch" value=""
57
+ class="quicksearch-field" />
58
+ </fieldset>
59
+ </form>
60
+
61
+ <ul class="link-list">
62
+
63
+ </ul>
64
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
65
+ </div>
66
+
67
+
68
+ </div>
69
+ </div>
70
+
71
+ <div id="documentation">
72
+ <h1>open_ehr</h1>
73
+ <ul>
74
+ <li><p>
75
+ <a
76
+ href="http://github.com/#{github_username}/#{project_name">github.com/#{github_username}/#{project_name</a>}
77
+ </p>
78
+ </li>
79
+ </ul>
80
+ <h2>DESCRIPTION:</h2>
81
+ <p>
82
+ FIX (describe your package)
83
+ </p>
84
+ <h2>FEATURES/PROBLEMS:</h2>
85
+ <ul>
86
+ <li><p>
87
+ FIX (list of features or problems)
88
+ </p>
89
+ </li>
90
+ </ul>
91
+ <h2>SYNOPSIS:</h2>
92
+ <pre>
93
+ FIX (code sample of usage)
94
+ </pre>
95
+ <h2>REQUIREMENTS:</h2>
96
+ <ul>
97
+ <li><p>
98
+ FIX (list of requirements)
99
+ </p>
100
+ </li>
101
+ </ul>
102
+ <h2>INSTALL:</h2>
103
+ <ul>
104
+ <li><p>
105
+ FIX (sudo gem install, anything else)
106
+ </p>
107
+ </li>
108
+ </ul>
109
+ <h2>LICENSE:</h2>
110
+ <p>
111
+ (The MIT License)
112
+ </p>
113
+ <p>
114
+ Copyright &#169; 2011 Shinji KOBAYASHI
115
+ </p>
116
+ <p>
117
+ Permission is hereby granted, free of charge, to any person obtaining a
118
+ copy of this software and associated documentation files (the
119
+ &#8216;Software&#8217;), to deal in the Software without restriction,
120
+ including without limitation the rights to use, copy, modify, merge,
121
+ publish, distribute, sublicense, and/or sell copies of the Software, and to
122
+ permit persons to whom the Software is furnished to do so, subject to the
123
+ following conditions:
124
+ </p>
125
+ <p>
126
+ The above copyright notice and this permission notice shall be included in
127
+ all copies or substantial portions of the Software.
128
+ </p>
129
+ <p>
130
+ THE SOFTWARE IS PROVIDED &#8216;AS IS&#8217;, WITHOUT WARRANTY OF ANY KIND,
131
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
132
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
133
+ NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
134
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
135
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
136
+ USE OR OTHER DEALINGS IN THE SOFTWARE.
137
+ </p>
138
+
139
+ </div>
140
+
141
+ <div id="validator-badges">
142
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
143
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
144
+ Rdoc Generator</a> 1.1.6</small>.</p>
145
+ </div>
146
+ </body>
147
+ </html>
148
+
data/doc/created.rid ADDED
@@ -0,0 +1,2 @@
1
+ Tue, 26 Apr 2011 11:54:13 +0900
2
+ README.rdoc Tue, 26 Apr 2011 11:49:13 +0900
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
data/doc/index.html ADDED
@@ -0,0 +1,54 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
3
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4
+
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
6
+ <head>
7
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
8
+
9
+ <title>RDoc Documentation</title>
10
+
11
+ <link type="text/css" media="screen" href="rdoc.css" rel="stylesheet" />
12
+
13
+ <script src="js/jquery.js" type="text/javascript" charset="utf-8"></script>
14
+ <script src="js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
15
+ <script src="js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
16
+ <script src="js/darkfish.js" type="text/javascript" charset="utf-8"></script>
17
+
18
+ </head>
19
+ <body class="indexpage">
20
+
21
+
22
+ <h1>RDoc Documentation</h1>
23
+
24
+
25
+ <p>This is the API documentation for 'RDoc Documentation'.</p>
26
+
27
+
28
+
29
+
30
+ <h2>Files</h2>
31
+ <ul>
32
+
33
+ <li class="file"><a href="README_rdoc.html">README.rdoc</a></li>
34
+
35
+ </ul>
36
+
37
+
38
+ <h2 id="classes">Classes/Modules</h2>
39
+ <ul>
40
+
41
+ </ul>
42
+
43
+ <h2 id="methods">Methods</h2>
44
+ <ul>
45
+
46
+ </ul>
47
+
48
+ <div id="validator-badges">
49
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
50
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
51
+ Rdoc Generator</a> 1.1.6</small>.</p>
52
+ </div>
53
+ </body>
54
+ </html>
@@ -0,0 +1,116 @@
1
+ /**
2
+ *
3
+ * Darkfish Page Functions
4
+ * $Id: darkfish.js 53 2009-01-07 02:52:03Z deveiant $
5
+ *
6
+ * Author: Michael Granger <mgranger@laika.com>
7
+ *
8
+ */
9
+
10
+ /* Provide console simulation for firebug-less environments */
11
+ if (!("console" in window) || !("firebug" in console)) {
12
+ var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
13
+ "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
14
+
15
+ window.console = {};
16
+ for (var i = 0; i < names.length; ++i)
17
+ window.console[names[i]] = function() {};
18
+ };
19
+
20
+
21
+ /**
22
+ * Unwrap the first element that matches the given @expr@ from the targets and return them.
23
+ */
24
+ $.fn.unwrap = function( expr ) {
25
+ return this.each( function() {
26
+ $(this).parents( expr ).eq( 0 ).after( this ).remove();
27
+ });
28
+ };
29
+
30
+
31
+ function showSource( e ) {
32
+ var target = e.target;
33
+ var codeSections = $(target).
34
+ parents('.method-detail').
35
+ find('.method-source-code');
36
+
37
+ $(target).
38
+ parents('.method-detail').
39
+ find('.method-source-code').
40
+ slideToggle();
41
+ };
42
+
43
+ function hookSourceViews() {
44
+ $('.method-description,.method-heading').click( showSource );
45
+ };
46
+
47
+ function toggleDebuggingSection() {
48
+ $('.debugging-section').slideToggle();
49
+ };
50
+
51
+ function hookDebuggingToggle() {
52
+ $('#debugging-toggle img').click( toggleDebuggingSection );
53
+ };
54
+
55
+ function hookQuickSearch() {
56
+ $('.quicksearch-field').each( function() {
57
+ var searchElems = $(this).parents('.section').find( 'li' );
58
+ var toggle = $(this).parents('.section').find('h3 .search-toggle');
59
+ // console.debug( "Toggle is: %o", toggle );
60
+ var qsbox = $(this).parents('form').get( 0 );
61
+
62
+ $(this).quicksearch( this, searchElems, {
63
+ noSearchResultsIndicator: 'no-class-search-results',
64
+ focusOnLoad: false
65
+ });
66
+ $(toggle).click( function() {
67
+ // console.debug( "Toggling qsbox: %o", qsbox );
68
+ $(qsbox).toggle();
69
+ });
70
+ });
71
+ };
72
+
73
+ function highlightTarget( anchor ) {
74
+ console.debug( "Highlighting target '%s'.", anchor );
75
+
76
+ $("a[name=" + anchor + "]").each( function() {
77
+ if ( !$(this).parent().parent().hasClass('target-section') ) {
78
+ console.debug( "Wrapping the target-section" );
79
+ $('div.method-detail').unwrap( 'div.target-section' );
80
+ $(this).parent().wrap( '<div class="target-section"></div>' );
81
+ } else {
82
+ console.debug( "Already wrapped." );
83
+ }
84
+ });
85
+ };
86
+
87
+ function highlightLocationTarget() {
88
+ console.debug( "Location hash: %s", window.location.hash );
89
+ if ( ! window.location.hash || window.location.hash.length == 0 ) return;
90
+
91
+ var anchor = window.location.hash.substring(1);
92
+ console.debug( "Found anchor: %s; matching %s", anchor, "a[name=" + anchor + "]" );
93
+
94
+ highlightTarget( anchor );
95
+ };
96
+
97
+ function highlightClickTarget( event ) {
98
+ console.debug( "Highlighting click target for event %o", event.target );
99
+ try {
100
+ var anchor = $(event.target).attr( 'href' ).substring(1);
101
+ console.debug( "Found target anchor: %s", anchor );
102
+ highlightTarget( anchor );
103
+ } catch ( err ) {
104
+ console.error( "Exception while highlighting: %o", err );
105
+ };
106
+ };
107
+
108
+
109
+ $(document).ready( function() {
110
+ hookSourceViews();
111
+ hookDebuggingToggle();
112
+ hookQuickSearch();
113
+ highlightLocationTarget();
114
+
115
+ $('ul.link-list a').bind( "click", highlightClickTarget );
116
+ });