├── .gitignore ├── .gitlab-ci.yml ├── LICENSE.txt ├── README.md ├── adl-parser ├── docs │ └── changes.txt ├── pom.xml ├── readme.txt └── src │ ├── main │ ├── java │ │ └── se │ │ │ └── acode │ │ │ └── openehr │ │ │ └── parser │ │ │ ├── ArchetypeValidator.java │ │ │ ├── AttributeValue.java │ │ │ ├── ContentObject.java │ │ │ ├── Invariant.java │ │ │ └── Parsed.java │ └── javacc │ │ └── adl.jj │ └── test │ ├── java │ └── se │ │ └── acode │ │ └── openehr │ │ └── parser │ │ ├── ArchetypeDescriptionTest.java │ │ ├── ArchetypeIdentificationTest.java │ │ ├── ArchetypeInternalRefTest.java │ │ ├── ArchetypeLanguageTest.java │ │ ├── ArchetypeOntologyTest.java │ │ ├── ArchetypeSlotTest.java │ │ ├── ArchetypeUncommonTermKeysTest.java │ │ ├── ArchetypeValidatorTest.java │ │ ├── BasicGenericTypeTest.java │ │ ├── BasicTypesTest.java │ │ ├── CCodePhraseTest.java │ │ ├── CDurationTest.java │ │ ├── CDvOrdinalTest.java │ │ ├── CDvQuantityTest.java │ │ ├── CDvScaleTest.java │ │ ├── ConstraintBindingTest.java │ │ ├── ConstraintRefTest.java │ │ ├── DateTimeTest.java │ │ ├── DvCodedTextTest.java │ │ ├── DvDurationIntervalTest.java │ │ ├── EmptyOtherContributorsTest.java │ │ ├── MissingLanguageTest.java │ │ ├── MissingPurposeTest.java │ │ ├── MixedNodeTypesTest.java │ │ ├── MostMinimalADLTest.java │ │ ├── MultiLanguageTest.java │ │ ├── ParserTestBase.java │ │ ├── PathTest.java │ │ ├── RegularExpressionTest.java │ │ ├── SpecialStringTest.java │ │ ├── StructureTest.java │ │ ├── TermBindingTest.java │ │ ├── UnicodeBOMSupportTest.java │ │ └── UnicodeSupportTest.java │ └── resources │ ├── adl-test-SOME_TYPE.generic_type_basic.draft.adl │ ├── adl-test-SOME_TYPE.generic_type_use_node.draft.adl │ ├── adl-test-car.paths.test.adl │ ├── adl-test-car.use_node.test.adl │ ├── adl-test-composition.dv_coded_text.test.adl │ ├── adl-test-entry.archetype_bindings.test.adl │ ├── adl-test-entry.archetype_desc_missing_purpose.test.adl │ ├── adl-test-entry.archetype_description.test.adl │ ├── adl-test-entry.archetype_description2.test.adl │ ├── adl-test-entry.archetype_identification.test.adl │ ├── adl-test-entry.archetype_internal_ref.test.adl │ ├── adl-test-entry.archetype_internal_ref2.test.adl │ ├── adl-test-entry.archetype_language.test.adl │ ├── adl-test-entry.archetype_language.test2.adl │ ├── adl-test-entry.archetype_language_no_accreditation.test.adl │ ├── adl-test-entry.archetype_language_order_of_translation_details.test.adl │ ├── adl-test-entry.archetype_ontology.test.adl │ ├── adl-test-entry.archetype_slot.test.adl │ ├── adl-test-entry.archetype_slot.test2.adl │ ├── adl-test-entry.archetype_uncommonkeys.test.adl │ ├── adl-test-entry.basic_types.test.adl │ ├── adl-test-entry.c_code_phrase.test.adl │ ├── adl-test-entry.c_dv_ordinal.test.adl │ ├── adl-test-entry.c_dv_quantity_empty.test.adl │ ├── adl-test-entry.c_dv_quantity_full.test.adl │ ├── adl-test-entry.c_dv_quantity_full2.test.adl │ ├── adl-test-entry.c_dv_quantity_full3.test.adl │ ├── adl-test-entry.c_dv_quantity_item_units_only.test.adl │ ├── adl-test-entry.c_dv_quantity_list.test.adl │ ├── adl-test-entry.c_dv_quantity_property.test.adl │ ├── adl-test-entry.c_dv_quantity_reversed.test.adl │ ├── adl-test-entry.c_dv_scale.test.adl │ ├── adl-test-entry.constraint_binding.test.adl │ ├── adl-test-entry.constraint_ref.test.adl │ ├── adl-test-entry.datetime.test.adl │ ├── adl-test-entry.domain_types.test.adl │ ├── adl-test-entry.durations.test.adl │ ├── adl-test-entry.empty_other_contributors.test.adl │ ├── adl-test-entry.missing_language.test.adl │ ├── adl-test-entry.mixed_node_types.draft.adl │ ├── adl-test-entry.most_minimal.test.adl │ ├── adl-test-entry.multi_language.test.adl │ ├── adl-test-entry.regular_expression.test.adl │ ├── adl-test-entry.special_string.test.adl │ ├── adl-test-entry.structure_test1.test.adl │ ├── adl-test-entry.structure_test2.test.adl │ ├── adl-test-entry.term_binding.test.adl │ ├── adl-test-entry.term_binding2.test.adl │ ├── adl-test-entry.testtranslations.test.adl │ ├── adl-test-entry.translations_author_language.test.adl │ ├── adl-test-entry.translations_language_author.test.adl │ ├── adl-test-entry.unicode_BOM_support.test.adl │ ├── adl-test-entry.unicode_support.test.adl │ ├── openEHR-EHR-CLUSTER.auscultation.v1.adl │ ├── openEHR-EHR-CLUSTER.duration_interval_test.v0.adl │ ├── openEHR-EHR-CLUSTER.ordinalandscale.v0.adl │ ├── openEHR-EHR-ELEMENT.uid_test.v1.adl │ ├── openEHR-EHR-ELEMENT.uid_test.v2.adl │ ├── openEHR-EHR-EVALUATION.columna_vertebral.v1.adl │ ├── openEHR-EHR-OBSERVATION.test_internal_ref_binding.v1.adl │ └── openEHR-EHR-OBSERVATION.testassumedvalue.v1.adl ├── adl-serializer ├── docs │ └── changes.txt ├── pom.xml ├── readme.txt └── src │ ├── main │ └── java │ │ └── org │ │ └── openehr │ │ └── am │ │ └── serialize │ │ └── ADLSerializer.java │ └── test │ ├── adl │ ├── adl-test-entry.most_minimal.test.adl │ ├── archetype-internal-ref-test.adl │ ├── archetype-language.adl │ ├── archetype-slot-any-allowed-test.adl │ ├── archetype-slot-empty-excludes-test.adl │ ├── archetype-slot-empty-includes-test.adl │ ├── archetype-slot-test.adl │ ├── c-code-phrase-test-empty.adl │ ├── c-code-phrase-test.adl │ ├── c-dv-ordinal-test-empty.adl │ ├── c-dv-ordinal-test.adl │ ├── c-dv-ordinal-test2.adl │ ├── c-dv-quantity-test-empty.adl │ ├── c-dv-quantity-test.adl │ ├── c-string-test.adl │ ├── empty-attribute-list-test.adl │ ├── empty-children-list-test.adl │ ├── multi-language.adl │ ├── multi-terminology.adl │ ├── ontology.adl │ └── openEHR-EHR-EVALUATION.test_concept.v1.adl │ └── java │ └── org │ └── openehr │ └── am │ └── serialize │ ├── ArchetypeInternalRefTest.java │ ├── ArchetypeLanguageTest.java │ ├── ArchetypeSlotTest.java │ ├── CCodePhraseTest.java │ ├── CDurationTest.java │ ├── CDvOrdinalTest.java │ ├── CDvQuantityTest.java │ ├── CommonTest.java │ ├── DescriptionTest.java │ ├── EmptyAttributeListTest.java │ ├── MultipleLanguageTest.java │ ├── MultipleTerminologyTest.java │ ├── OntologyTest.java │ ├── PrimitiveTypesTest.java │ ├── RoundTripTest.java │ ├── SerializerTestBase.java │ ├── SimpleArchetypeTest.java │ └── StringEscapeTest.java ├── archetype-validator ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── openehr │ │ │ └── am │ │ │ └── validation │ │ │ ├── ArchetypeValidator.java │ │ │ ├── ErrorType.java │ │ │ ├── RMInspectionException.java │ │ │ ├── RMInspector.java │ │ │ ├── SpecialisedArchetypeValidator.java │ │ │ ├── UTF8Control.java │ │ │ └── ValidationError.java │ └── resources │ │ ├── log4j.properties │ │ ├── validations.properties │ │ ├── validations.txt │ │ ├── validations_de.properties │ │ ├── validations_en.properties │ │ └── validations_ru.properties │ └── test │ ├── java │ └── org │ │ └── openehr │ │ └── am │ │ └── validation │ │ ├── ArchetypeDefinitionCodeCheckTest.java │ │ ├── ArchetypeInternalRefCheckTest.java │ │ ├── ArchetypeSlotCheckTest.java │ │ ├── ArchetypeTermValidityTest.java │ │ ├── ArchetypeValidationTestBase.java │ │ ├── AssumedValueTest.java │ │ ├── AttributeNameCheckTest.java │ │ ├── CodeConstraintValidityTest.java │ │ ├── DefinitionTypenameCheckTest.java │ │ ├── DvQuantityUnitsTest.java │ │ ├── MultiValueAttributeChildIdentifierCheckTest.java │ │ ├── MultipleValueAttributeCardinalityTest.java │ │ ├── OntologyCodeSpecialisationCheckTest.java │ │ ├── OntologyTranslationCheckTest.java │ │ ├── RMInspectorTest.java │ │ ├── SectionCardinalityTest.java │ │ ├── SingleValueAttributeChildIdentifierCheckTest.java │ │ ├── SingleValueAttributeChildOccurrencesCheckTest.java │ │ ├── SingleValueAttributeChildUniquenessCheckTest.java │ │ ├── SpecialisedArchetypeCardinalityTest.java │ │ ├── SpecialisedArchetypeExistenceTest.java │ │ ├── SpecialisedArchetypeMultiplicityTest.java │ │ ├── SpecialisedArchetypeNodeIdConformanceTest.java │ │ ├── SpecialisedArchetypeNodeSpecialisedAsRequiredTest.java │ │ ├── SpecialisedArchetypeNonCComplexObjectTest.java │ │ ├── SpecialisedArchetypeOccurrencesTest.java │ │ ├── SpecialisedArchetypeTermExistsTest.java │ │ ├── SpecialisedArchetypeValidationTestBase.java │ │ ├── SpecialisedArchetypeWrongRMTypeTest.java │ │ ├── SpecializationArchetypeIdTest.java │ │ ├── SpecializationDepthCheckTest.java │ │ ├── TermBindingsValidityTest.java │ │ ├── TypeNameCheckTest.java │ │ ├── UniqueSiblingAttributesCheckTest.java │ │ ├── ValidateOpenEHRTerminologyCodesTest.java │ │ └── ValidatorUtilityTest.java │ └── resources │ ├── adl-specialised-EVALUATION.cardinality-specialised.v1 │ ├── adl-specialised-EVALUATION.cardinality-specialised.v2 │ ├── adl-specialised-EVALUATION.cardinality.v1 │ ├── adl-specialised-EVALUATION.existence-specialised.v1 │ ├── adl-specialised-EVALUATION.existence.v1 │ ├── adl-specialised-EVALUATION.multiplicity-specialised.v1 │ ├── adl-specialised-EVALUATION.multiplicity.v1 │ ├── adl-specialised-EVALUATION.node_id_conformance-specialised-again.v1 │ ├── adl-specialised-EVALUATION.node_id_conformance-specialised.v1 │ ├── adl-specialised-EVALUATION.node_specialised_as_required-specialised.v1 │ ├── adl-specialised-EVALUATION.node_specialised_as_required.v1 │ ├── adl-specialised-EVALUATION.occurrences-specialised.v1 │ ├── adl-specialised-EVALUATION.occurrences.v1 │ ├── adl-specialised-EVALUATION.term_existence-specialised.v1 │ ├── adl-specialised-EVALUATION.term_existence-specialised.v2 │ ├── adl-specialised-EVALUATION.term_existence.v1 │ ├── adl-specialised-EVALUATION.term_existence.v2 │ ├── adl-specialised-EVALUATION.wrongrmtype-specialised.v1 │ ├── adl-specialised-EVALUATION.wrongrmtype-specialised.v2 │ ├── adl-specialised-EVALUATION.wrongrmtype-specialised.v3 │ ├── adl-specialised-EVALUATION.wrongrmtype.v1 │ ├── adl-specialised-EVALUATION.wrongrmtype.v2 │ ├── adl-specialised-EVALUATION.wrongrmtype.v3 │ ├── adl-test-ELEMENT.assumed_value_boolean.v1.adl │ ├── adl-test-ELEMENT.assumed_value_count.v1.adl │ ├── adl-test-ELEMENT.assumed_value_quantity.v1.adl │ ├── adl-test-ELEMENT.specialization-archetypeid.v1.adl │ ├── adl-test-ELEMENT.specialization-archetypeid.v2.adl │ ├── adl-test-ELEMENT.specialization-archetypeid.v3.adl │ ├── adl-test-ELEMENT.specialization-depth.v1.adl │ ├── adl-test-ELEMENT.specialization-depth.v2.adl │ ├── adl-test-ELEMENT.specialization-depth.v3.adl │ ├── adl-test-ELEMENT.specialization-depth.v4.adl │ ├── adl-test-ELEMENT.specialization-depth.v5.adl │ ├── adl-test-ELEMENT.specialization.v1.adl │ ├── adl-test-ELEMENT.type_boolean.v1.adl │ ├── adl-test-ELEMENT.type_count.v1.adl │ ├── adl-test-ELEMENT.type_date.v1.adl │ ├── adl-test-ELEMENT.type_date.v2.adl │ ├── adl-test-ELEMENT.type_datetime.v1.adl │ ├── adl-test-ELEMENT.type_duration.v1.adl │ ├── adl-test-ELEMENT.type_ehr_uri.v1.adl │ ├── adl-test-ELEMENT.type_interval.v1.adl │ ├── adl-test-ELEMENT.type_interval.v2.adl │ ├── adl-test-ELEMENT.type_interval.v3.adl │ ├── adl-test-ELEMENT.type_interval.v4.adl │ ├── adl-test-ELEMENT.type_interval.v5.adl │ ├── adl-test-ELEMENT.type_interval.v6.adl │ ├── adl-test-ELEMENT.type_multimedia.v1.adl │ ├── adl-test-ELEMENT.type_multimedia.v2.adl │ ├── adl-test-ELEMENT.type_name.v1 │ ├── adl-test-ELEMENT.type_name.v2 │ ├── adl-test-ELEMENT.type_name.v3 │ ├── adl-test-ELEMENT.type_proportion.v1.adl │ ├── adl-test-ELEMENT.type_uri.v1.adl │ ├── adl-test-ENTRY.attribute_name.v1 │ ├── adl-test-ENTRY.attribute_name.v2 │ ├── adl-test-ENTRY.attribute_name.v3 │ ├── adl-test-ENTRY.code_constraint.v1 │ ├── adl-test-ENTRY.code_constraint.v2 │ ├── adl-test-ENTRY.code_constraint.v3 │ ├── adl-test-ENTRY.definition_code.v1 │ ├── adl-test-ENTRY.definition_code.v2 │ ├── adl-test-ENTRY.definition_typename.v1 │ ├── adl-test-ENTRY.definition_typename.v2 │ ├── adl-test-ENTRY.definition_typename.v3 │ ├── adl-test-ENTRY.ontology-specialisation.v1.adl │ ├── adl-test-ENTRY.ontology-specialisation.v2.adl │ ├── adl-test-ENTRY.ontology-specialisation.v3.adl │ ├── adl-test-ENTRY.ontology-specialisation.v4.adl │ ├── adl-test-ENTRY.ontology-specialisation.v5.adl │ ├── adl-test-ENTRY.ontology-unusedcodes.v1.adl │ ├── adl-test-ENTRY.ontology-unusedcodes.v2.adl │ ├── adl-test-ENTRY.ontology_translation.v1 │ ├── adl-test-ENTRY.ontology_translation.v2 │ ├── adl-test-ENTRY.ontology_translation.v3 │ ├── adl-test-ENTRY.ontology_translation.v4 │ ├── adl-test-ENTRY.ontology_translation.v5 │ ├── adl-test-ENTRY.ontology_translation.v6 │ ├── adl-test-ENTRY.ontology_translation.v7 │ ├── adl-test-ENTRY.ontology_translation.v8 │ ├── adl-test-ENTRY.sibling_nodes.v1 │ ├── adl-test-ENTRY.sibling_nodes.v2 │ ├── adl-test-ENTRY.single_attribute_child_identifier.v1 │ ├── adl-test-ENTRY.single_attribute_child_identifier.v2 │ ├── adl-test-ENTRY.single_attribute_child_occurrences.v1 │ ├── adl-test-ENTRY.single_attribute_child_occurrences.v2 │ ├── adl-test-ENTRY.single_attribute_child_occurrences.v3 │ ├── adl-test-ENTRY.single_attribute_child_uniqueness.v1 │ ├── adl-test-ENTRY.single_attribute_child_uniqueness.v2 │ ├── adl-test-ENTRY.single_attribute_child_uniqueness.v3 │ ├── adl-test-ENTRY.term_bindings.v1 │ ├── adl-test-ENTRY.term_bindings.v2 │ ├── adl-test-ENTRY.term_definition.v1 │ ├── adl-test-ENTRY.term_definition.v2 │ ├── adl-test-ENTRY.term_definition.v3 │ ├── adl-test-ENTRY.term_definition.v4 │ ├── adl-test-ENTRY.term_definition.v5 │ ├── adl-test-ENTRY.term_definition.v6 │ ├── adl-test-ITEM_TREE.attribute_cardinality.v1 │ ├── adl-test-ITEM_TREE.attribute_cardinality.v2 │ ├── adl-test-ITEM_TREE.attribute_cardinality.v3 │ ├── adl-test-ITEM_TREE.multi_attribute_child_identifier.v1 │ ├── adl-test-ITEM_TREE.multi_attribute_child_identifier.v2 │ ├── adl-test-ITEM_TREE.multi_attribute_child_identifier.v3 │ ├── adl-test-PARTY_PROXY.type_name.v1 │ ├── openEHR-EHR-ACTION.follow_up.v1.adl │ ├── openEHR-EHR-CLUSTER.cardinality_occurrences.v1.adl │ ├── openEHR-EHR-CLUSTER.cardinality_occurrences2.v1.adl │ ├── openEHR-EHR-CLUSTER.cardinality_occurrences3.v1.adl │ ├── openEHR-EHR-CLUSTER.internal_reference.v1.adl │ ├── openEHR-EHR-CLUSTER.testNonUniqueInternalRef.v1.adl │ ├── openEHR-EHR-CLUSTER.testNonUniqueInternalRef.v2.adl │ ├── openEHR-EHR-CLUSTER.test_non_ccomplexobject-spec.v1.adl │ ├── openEHR-EHR-CLUSTER.test_non_ccomplexobject.v1.adl │ ├── openEHR-EHR-CLUSTER.units_test.v1.adl │ ├── openEHR-EHR-ELEMENT.doubleontologycode.v1.adl │ ├── openEHR-EHR-EVALUATION.adverse.v1.adl │ ├── openEHR-EHR-EVALUATION.null_flavor.v1.adl │ ├── openEHR-EHR-EVALUATION.null_flavour.v1.adl │ ├── openEHR-EHR-EVALUATION.problem-diagnosis.v1.adl │ ├── openEHR-EHR-OBSERVATION.internal_reference.v1.adl │ ├── openEHR-EHR-OBSERVATION.internal_reference.v2.adl │ ├── openEHR-EHR-OBSERVATION.internal_reference.v3.adl │ ├── openEHR-EHR-OBSERVATION.internal_reference.v4.adl │ ├── openEHR-EHR-OBSERVATION.internal_reference.v5.adl │ ├── openEHR-EHR-OBSERVATION.internal_reference.v6.adl │ ├── openEHR-EHR-OBSERVATION.order1-order2-order3.v1.adl │ ├── openEHR-EHR-OBSERVATION.order1-order2-order3a.v1.adl │ ├── openEHR-EHR-OBSERVATION.order1-order2.v1.adl │ ├── openEHR-EHR-OBSERVATION.slot.v1.adl │ ├── openEHR-EHR-OBSERVATION.slot.v2.adl │ ├── openEHR-EHR-OBSERVATION.slot.v3.adl │ ├── openEHR-EHR-OBSERVATION.slot.v4.adl │ ├── openEHR-EHR-OBSERVATION.slot.v5.adl │ ├── openEHR-EHR-OBSERVATION.slot.v6.adl │ ├── openEHR-EHR-OBSERVATION.slot.v7.adl │ ├── openEHR-EHR-OBSERVATION.type_name.v4.adl │ └── openEHR-EHR-SECTION.testitemscardinality.v1.adl ├── dadl-binding ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── openehr │ │ └── rm │ │ └── binding │ │ ├── DADLBinding.java │ │ ├── DADLBindingException.java │ │ ├── RMInspector.java │ │ └── XPathUtil.java │ └── test │ ├── java │ └── org │ │ └── openehr │ │ └── rm │ │ └── binding │ │ ├── BindRMToDADLTest.java │ │ ├── DADLBindingTest.java │ │ ├── DADLBindingTestBase.java │ │ ├── DuplicatedCodesTest.java │ │ ├── LoadTest.java │ │ └── XPathTest.java │ └── resources │ ├── adl-test-CLUSTER.test_cluster.v1.adl │ ├── adl-test-ITEM_TREE.test_tree.v1.adl │ ├── archetyped.dadl │ ├── body_weight.dadl │ ├── code_phrase.dadl │ ├── demographics.dadl │ ├── duplicated_codes.dadl │ ├── dv_coded_text.dadl │ ├── dv_quantity.dadl │ ├── dv_text.dadl │ ├── element.dadl │ ├── element_with_text.dadl │ ├── empty_element_with_null_flavour.dadl │ ├── empty_item_list.dadl │ ├── history.dadl │ ├── history2.dadl │ ├── item_list.dadl │ ├── item_tree_bp.dadl │ ├── item_tree_bp2.dadl │ ├── lab_test.dadl │ ├── log4j.properties │ ├── observation.dadl │ ├── observation2.dadl │ ├── observation3.dadl │ ├── order_set1.dadl │ ├── point_event.dadl │ ├── point_event2.dadl │ ├── tree_2_slots.dadl │ ├── tree_nested_slot.dadl │ ├── tree_nested_slot2.dadl │ ├── tree_nested_slot3.dadl │ ├── tree_nested_slot4.dadl │ ├── tree_slot.dadl │ ├── typed_archetype_id.dadl │ ├── typed_dv_boolean.dadl │ ├── typed_dv_ordinal.dadl │ ├── typed_dv_quantity.dadl │ ├── typed_dv_quantity2.dadl │ ├── typed_dv_text.dadl │ ├── typed_party_self.dadl │ ├── typed_terminology_id.dadl │ └── weight.dadl ├── dadl-parser ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── openehr │ │ │ └── am │ │ │ └── parser │ │ │ ├── AttributeValue.java │ │ │ ├── BooleanValue.java │ │ │ ├── CharacterValue.java │ │ │ ├── CodeValue.java │ │ │ ├── ComplexObjectBlock.java │ │ │ ├── ContentObject.java │ │ │ ├── DateTimeValue.java │ │ │ ├── DateValue.java │ │ │ ├── DurationValue.java │ │ │ ├── IntegerValue.java │ │ │ ├── KeyedObject.java │ │ │ ├── MultipleAttributeObjectBlock.java │ │ │ ├── ObjectBlock.java │ │ │ ├── Parsed.java │ │ │ ├── PrimitiveObjectBlock.java │ │ │ ├── RealValue.java │ │ │ ├── SimpleValue.java │ │ │ ├── SingleAttributeObjectBlock.java │ │ │ ├── StringValue.java │ │ │ ├── TimeValue.java │ │ │ └── UriValue.java │ └── javacc │ │ └── dadl.jj │ └── test │ ├── java │ └── org │ │ └── openehr │ │ └── am │ │ └── parser │ │ ├── EmptyAttributeListBlockTest.java │ │ ├── ItemListTest.java │ │ ├── KeyedObjectTest.java │ │ ├── ParserTestBase.java │ │ ├── SimpleValuesTest.java │ │ ├── SingleValueListTest.java │ │ ├── StructureTest.java │ │ └── TypedObjectBlockTest.java │ └── resources │ ├── blood_pressure_001.dadl │ ├── empty_attr_list.dadl │ ├── empty_attr_list_without_type.dadl │ ├── keyed_objects.dadl │ ├── keyed_objects2.dadl │ ├── person_001.dadl │ ├── simple_values.dadl │ ├── simple_values_list.dadl │ ├── single_values_list.dadl │ ├── state_item_list.dadl │ └── typed_dv_quantity.dadl ├── measure-serv ├── pom.xml ├── readme.txt └── src │ ├── main │ └── java │ │ └── org │ │ └── openehr │ │ └── rm │ │ └── support │ │ └── measurement │ │ ├── MeasurementService.java │ │ ├── SimpleMeasurementService.java │ │ └── SimpleUCUMValidator.java │ └── test │ └── java │ └── org │ └── openehr │ └── rm │ └── support │ └── measurement │ └── SimpleMeasurementServiceTest.java ├── mini-termserv ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── openehr │ │ │ └── terminology │ │ │ ├── CodeSet.java │ │ │ ├── Concept.java │ │ │ ├── Group.java │ │ │ ├── SimpleCodeSetAccess.java │ │ │ ├── SimpleTerminologyAccess.java │ │ │ ├── SimpleTerminologyService.java │ │ │ ├── TerminologySource.java │ │ │ ├── TerminologySourceFactory.java │ │ │ └── XMLTerminologySource.java │ └── resources │ │ ├── external_terminologies_en.xml │ │ ├── log4j.properties │ │ └── openehr_terminology_en.xml │ └── test │ └── java │ └── org │ └── openehr │ └── terminology │ ├── OpenEHRTerminologyTest.java │ ├── SimpleCodeSetAccessTest.java │ ├── SimpleTerminologyAccessTest.java │ ├── SimpleTerminologyServiceTest.java │ └── TranslationDetailsTest.java ├── oet-parser ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── openehr │ │ │ └── am │ │ │ └── template │ │ │ ├── Flattener.java │ │ │ ├── FlatteningException.java │ │ │ ├── OETParser.java │ │ │ ├── PathMap.java │ │ │ ├── TermMap.java │ │ │ ├── UnknownArchetypeException.java │ │ │ └── UnknownTemplateException.java │ └── xsd │ │ ├── Archetype.xsd │ │ ├── BaseTypes.xsd │ │ ├── CharacterMapping.xsd │ │ ├── Composition.xsd │ │ ├── CompositionTemplate.xsd │ │ ├── Content.xsd │ │ ├── Extract.xsd │ │ ├── OpenehrProfile.xsd │ │ ├── Resource.xsd │ │ ├── Structure.xsd │ │ ├── Template.xsd │ │ └── Version.xsd │ └── test │ ├── java │ └── org │ │ └── openehr │ │ └── am │ │ └── template │ │ ├── ActionDescriptionTest.java │ │ ├── AnnotationTest.java │ │ ├── ArchetypeSlotTest.java │ │ ├── CompositionTemplateTest.java │ │ ├── MultipleConstraintTest.java │ │ ├── PathMapTest.java │ │ ├── QuantityConstraintTest.java │ │ ├── SectionEvaluationTest.java │ │ ├── SectionInstructionTest.java │ │ ├── SectionTemplateTest.java │ │ ├── SetCardinalityConstraintsTest.java │ │ ├── SetConstraintOnNamedNodeWithoutNameTest.java │ │ ├── SetMaxOccurrencesWithoutMinTest.java │ │ ├── SetMixedConstraintsTest.java │ │ ├── SetMultipleEvaluationNameTest.java │ │ ├── SetNestedEvaluationNameTest.java │ │ ├── SetNodeNameTest.java │ │ ├── SetNodeOccurrencesTest.java │ │ ├── SetOccurrencesAndNameTest.java │ │ ├── TemplateParseTest.java │ │ ├── TemplateTestBase.java │ │ ├── TermMapTest.java │ │ ├── TextConstraintTest.java │ │ ├── UTF8EncodingTest.java │ │ └── UtilityTest.java │ └── resources │ ├── archetypes │ ├── openEHR-EHR-ACTION.medication.v1.adl │ ├── openEHR-EHR-ADMIN_ENTRY.heart_failure_contact.v1.adl │ ├── openEHR-EHR-COMPOSITION.prescription.v1.adl │ ├── openEHR-EHR-COMPOSITION.prescription_flattened.v1.adl │ ├── openEHR-EHR-COMPOSITION.test.v1.adl │ ├── openEHR-EHR-EVALUATION.adjusted_node_ids.v1.adl │ ├── openEHR-EHR-EVALUATION.hybrid_path_test.v1.adl │ ├── openEHR-EHR-EVALUATION.medication_review.v1.adl │ ├── openEHR-EHR-EVALUATION.review_of_procedures.v1.adl │ ├── openEHR-EHR-EVALUATION.structured_summary.v1.adl │ ├── openEHR-EHR-INSTRUCTION.medication.v1.adl │ ├── openEHR-EHR-ITEM_TREE.medication.v1.adl │ ├── openEHR-EHR-ITEM_TREE.medication_mod.v1.adl │ ├── openEHR-EHR-ITEM_TREE.medication_multiple_constraint_expected.v1.adl │ ├── openEHR-EHR-ITEM_TREE.medication_multiple_constraint_test.v1.adl │ ├── openEHR-EHR-ITEM_TREE.medication_multiple_constraint_test2.v1.adl │ ├── openEHR-EHR-ITEM_TREE.medication_quantity_test.v1.adl │ ├── openEHR-EHR-ITEM_TREE.medication_quantity_test2.v1.adl │ ├── openEHR-EHR-ITEM_TREE.medication_test_one.v1.adl │ ├── openEHR-EHR-ITEM_TREE.medication_test_one.v2.adl │ ├── openEHR-EHR-ITEM_TREE.medication_test_text_default.v1.adl │ ├── openEHR-EHR-ITEM_TREE.medication_test_text_name.v1.adl │ ├── openEHR-EHR-ITEM_TREE.medication_test_three.v1.adl │ ├── openEHR-EHR-ITEM_TREE.medication_test_two.v1.adl │ ├── openEHR-EHR-OBSERVATION.heart_failure_stage.v2.adl │ ├── openEHR-EHR-OBSERVATION.lab_test.v1.adl │ ├── openEHR-EHR-OBSERVATION.waist_hip.v2.adl │ ├── openEHR-EHR-SECTION.ad_hoc_heading.v1.adl │ ├── openEHR-EHR-SECTION.find_largest_node_id.v1.adl │ ├── openEHR-EHR-SECTION.find_largest_node_id_2.v1.adl │ ├── openEHR-EHR-SECTION.medications.v1.adl │ ├── openEHR-EHR-SECTION.more_nested_sections.v1.adl │ ├── openEHR-EHR-SECTION.nested_sections.v1.adl │ └── openEHR-EHR-SECTION.simple_section_name.v1.adl │ ├── log4j.properties │ ├── templates │ ├── prescription.oet │ ├── test_action_description.oet │ ├── test_annotation.oet │ ├── test_composition.oet │ ├── test_composition2.oet │ ├── test_composition3.oet │ ├── test_composition4.oet │ ├── test_composition5.oet │ ├── test_default_coded_name.oet │ ├── test_default_coded_text.oet │ ├── test_default_text.oet │ ├── test_hybrid_path.oet │ ├── test_max_value.oet │ ├── test_min_value.oet │ ├── test_more_nested_section.oet │ ├── test_multiple_constraint.oet │ ├── test_multiple_constraint2.oet │ ├── test_multiple_constraint3.oet │ ├── test_name_default_coded_text.oet │ ├── test_named_path.oet │ ├── test_named_path2.oet │ ├── test_named_path3.oet │ ├── test_nested_section.oet │ ├── test_nested_section_evaluation.oet │ ├── test_quantity_constraint_excluded_units.oet │ ├── test_quantity_constraint_included_units.oet │ ├── test_quantity_constraint_included_units2.oet │ ├── test_quantity_constraint_included_units3.oet │ ├── test_quantity_constraint_magnitude.oet │ ├── test_quantity_constraint_mixed.oet │ ├── test_quantity_constraint_precision.oet │ ├── test_section_evaluation.oet │ ├── test_section_evaluation2.oet │ ├── test_section_instruction.oet │ ├── test_section_instruction_tree.oet │ ├── test_set_cardinality_with_prohibited_node.oet │ ├── test_set_cardinality_with_prohibited_node2.oet │ ├── test_set_cardinality_with_prohibited_node3.oet │ ├── test_set_evaluation_name.oet │ ├── test_set_evaluation_name_.oet │ ├── test_set_mixed_constraints.oet │ ├── test_set_multiple_evaluation_name.oet │ ├── test_set_named_node_constraint_without_name.oet │ ├── test_set_occurrences_and_name.oet │ ├── test_set_occurrences_without_min.oet │ ├── test_set_occurrences_without_min2.oet │ ├── test_simple_section.oet │ ├── test_text_constraints.oet │ ├── test_text_name.oet │ └── test_utf8_encoding.oet │ ├── terms.txt │ ├── terms_path.txt │ └── test_path_map.txt ├── openehr-aom ├── docs │ └── changes.txt ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── openehr │ │ └── am │ │ └── archetype │ │ ├── Archetype.java │ │ ├── assertion │ │ ├── Assertion.java │ │ ├── AssertionVariable.java │ │ ├── ExpressionBinaryOperator.java │ │ ├── ExpressionItem.java │ │ ├── ExpressionLeaf.java │ │ ├── ExpressionOperator.java │ │ ├── ExpressionUnaryOperator.java │ │ └── OperatorKind.java │ │ ├── constraintmodel │ │ ├── ArchetypeConstraint.java │ │ ├── ArchetypeInternalRef.java │ │ ├── ArchetypeSlot.java │ │ ├── CAttribute.java │ │ ├── CComplexObject.java │ │ ├── CDefinedObject.java │ │ ├── CDomainType.java │ │ ├── CMultipleAttribute.java │ │ ├── CObject.java │ │ ├── CPrimitiveObject.java │ │ ├── CReferenceObject.java │ │ ├── CSingleAttribute.java │ │ ├── Cardinality.java │ │ ├── ConstraintRef.java │ │ └── primitive │ │ │ ├── CBoolean.java │ │ │ ├── CDate.java │ │ │ ├── CDateTime.java │ │ │ ├── CDuration.java │ │ │ ├── CInteger.java │ │ │ ├── CPrimitive.java │ │ │ ├── CReal.java │ │ │ ├── CString.java │ │ │ └── CTime.java │ │ └── ontology │ │ ├── ArchetypeOntology.java │ │ ├── ArchetypeTerm.java │ │ ├── ConstraintBinding.java │ │ ├── DefinitionItem.java │ │ ├── OntologyBinding.java │ │ ├── OntologyBindingItem.java │ │ ├── OntologyDefinitions.java │ │ ├── Query.java │ │ ├── QueryBindingItem.java │ │ └── TermBindingItem.java │ └── test │ └── java │ └── org │ └── openehr │ └── am │ └── archetype │ ├── ArchetypePathTest.java │ ├── assertion │ ├── AssertionTest.java │ └── ExpressionToStringTest.java │ ├── constraintmodel │ ├── ArchetypeSlotTest.java │ ├── CAttributeTest.java │ ├── CObjectTest.java │ ├── CPrimitiveObjectTest.java │ └── primitive │ │ ├── CBooleanTest.java │ │ ├── CDateTest.java │ │ ├── CDateTimeTest.java │ │ ├── CDurationTest.java │ │ ├── CIntegerTest.java │ │ ├── CRealTest.java │ │ ├── CStringTest.java │ │ └── CTimeTest.java │ └── ontology │ ├── ArchetypeOntologyTest.java │ └── ArchetypeTermTest.java ├── openehr-ap ├── docs │ └── changes.txt ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── openehr │ │ └── am │ │ └── openehrprofile │ │ └── datatypes │ │ ├── basic │ │ ├── CDvState.java │ │ ├── NonTerminalState.java │ │ ├── State.java │ │ ├── StateMachine.java │ │ ├── TerminalState.java │ │ └── Transition.java │ │ ├── quantity │ │ ├── CDvOrdinal.java │ │ ├── CDvQuantity.java │ │ ├── CDvQuantityItem.java │ │ ├── CDvScale.java │ │ ├── Ordinal.java │ │ └── Scale.java │ │ └── text │ │ └── CCodePhrase.java │ └── test │ └── java │ └── org │ └── openehr │ └── am │ └── openehrprofile │ └── datatypes │ ├── basic │ └── CDvStateTest.java │ ├── quantity │ ├── CDvOrdinalTest.java │ ├── CDvQuantityItemTest.java │ ├── CDvQuantityTest.java │ └── OrdinalTest.java │ └── text │ └── CCodePhraseTest.java ├── openehr-rm-core ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── openehr │ │ └── rm │ │ ├── Attribute.java │ │ ├── FullConstructor.java │ │ ├── RMObject.java │ │ ├── common │ │ ├── archetyped │ │ │ ├── Archetyped.java │ │ │ ├── FeederAudit.java │ │ │ ├── FeederAuditDetails.java │ │ │ ├── Link.java │ │ │ ├── Locatable.java │ │ │ ├── Pathable.java │ │ │ └── Settable.java │ │ ├── changecontrol │ │ │ ├── Contribution.java │ │ │ ├── ImportedVersion.java │ │ │ ├── OriginalVersion.java │ │ │ ├── Version.java │ │ │ └── VersionedObject.java │ │ ├── directory │ │ │ ├── Folder.java │ │ │ └── VersionedFolder.java │ │ ├── generic │ │ │ ├── Attestation.java │ │ │ ├── AuditDetails.java │ │ │ ├── Participation.java │ │ │ ├── PartyIdentified.java │ │ │ ├── PartyProxy.java │ │ │ ├── PartyRelated.java │ │ │ ├── PartySelf.java │ │ │ ├── RevisionHistory.java │ │ │ └── RevisionHistoryItem.java │ │ └── resource │ │ │ ├── AuthoredResource.java │ │ │ ├── ResourceDescription.java │ │ │ ├── ResourceDescriptionItem.java │ │ │ └── TranslationDetails.java │ │ ├── datastructure │ │ ├── DataStructure.java │ │ ├── history │ │ │ ├── Event.java │ │ │ ├── History.java │ │ │ ├── IntervalEvent.java │ │ │ └── PointEvent.java │ │ └── itemstructure │ │ │ ├── ItemList.java │ │ │ ├── ItemSingle.java │ │ │ ├── ItemStructure.java │ │ │ ├── ItemTable.java │ │ │ ├── ItemTree.java │ │ │ └── representation │ │ │ ├── Cluster.java │ │ │ ├── Element.java │ │ │ └── Item.java │ │ ├── datatypes │ │ ├── basic │ │ │ ├── DataValue.java │ │ │ ├── DvBoolean.java │ │ │ ├── DvIdentifier.java │ │ │ ├── DvState.java │ │ │ └── ReferenceModelName.java │ │ ├── encapsulated │ │ │ ├── DvEncapsulated.java │ │ │ ├── DvMultimedia.java │ │ │ └── DvParsable.java │ │ ├── quantity │ │ │ ├── DvAbsoluteQuantity.java │ │ │ ├── DvAmount.java │ │ │ ├── DvCount.java │ │ │ ├── DvInterval.java │ │ │ ├── DvOrdered.java │ │ │ ├── DvOrdinal.java │ │ │ ├── DvProportion.java │ │ │ ├── DvQuantified.java │ │ │ ├── DvQuantity.java │ │ │ ├── DvScale.java │ │ │ ├── ProportionKind.java │ │ │ ├── ReferenceRange.java │ │ │ └── datetime │ │ │ │ ├── DvDate.java │ │ │ │ ├── DvDateTime.java │ │ │ │ ├── DvDateTimeParser.java │ │ │ │ ├── DvDuration.java │ │ │ │ ├── DvTemporal.java │ │ │ │ └── DvTime.java │ │ ├── text │ │ │ ├── CodePhrase.java │ │ │ ├── DvCodedText.java │ │ │ ├── DvParagraph.java │ │ │ ├── DvText.java │ │ │ ├── Match.java │ │ │ └── TermMapping.java │ │ ├── timespec │ │ │ ├── DvGeneralTimeSpecification.java │ │ │ ├── DvPeriodicTimeSpecification.java │ │ │ └── DvTimeSpecification.java │ │ └── uri │ │ │ ├── DvEHRURI.java │ │ │ └── DvURI.java │ │ ├── security │ │ └── AccessControlSettings.java │ │ ├── support │ │ ├── ExternalEnvironment.java │ │ ├── basic │ │ │ └── Interval.java │ │ ├── definition │ │ │ └── OpenehrDefinitions.java │ │ ├── identification │ │ │ ├── AccessGroupRef.java │ │ │ ├── ArchetypeID.java │ │ │ ├── GenericID.java │ │ │ ├── HierObjectID.java │ │ │ ├── ISO_OID.java │ │ │ ├── InternetID.java │ │ │ ├── LocatableRef.java │ │ │ ├── ObjectID.java │ │ │ ├── ObjectRef.java │ │ │ ├── ObjectVersionID.java │ │ │ ├── PartyRef.java │ │ │ ├── TemplateID.java │ │ │ ├── TerminologyID.java │ │ │ ├── UID.java │ │ │ ├── UIDBasedID.java │ │ │ ├── UUID.java │ │ │ └── VersionTreeID.java │ │ └── terminology │ │ │ ├── CodeSetAccess.java │ │ │ ├── OpenEHRCodeSetIdentifiers.java │ │ │ ├── OpenEHRTerminologyGroupIdentifiers.java │ │ │ ├── TerminologyAccess.java │ │ │ └── TerminologyService.java │ │ └── util │ │ └── ItemUtil.java │ └── test │ └── java │ └── org │ └── openehr │ └── rm │ ├── common │ ├── archetyped │ │ ├── AddChildTest.java │ │ ├── ArchetypedTest.java │ │ ├── FeederAuditDetailsTest.java │ │ ├── LocatableTest.java │ │ ├── PathBasedQueryTest.java │ │ ├── PathBasedValueSettingTest.java │ │ ├── PathUtilTest.java │ │ └── RemoveChildTest.java │ ├── changecontrol │ │ ├── ChangeControlTestBase.java │ │ ├── ImportedVersionTest.java │ │ ├── OriginalVersionTest.java │ │ └── VersionedObjectTest.java │ ├── directory │ │ └── FolderTest.java │ ├── generic │ │ ├── AuditDetailsCreateTest.java │ │ ├── PartyIdentifiedTest.java │ │ └── RevisionHistoryTest.java │ └── resource │ │ ├── AuthoredResourceTest.java │ │ ├── ResourceDescriptionTest.java │ │ └── ResourceTestBase.java │ ├── datastructure │ ├── DataStructureTestBase.java │ ├── history │ │ ├── HistoryTest.java │ │ ├── IntervalEventTest.java │ │ └── PointEventTest.java │ └── itemstructure │ │ ├── ItemListTest.java │ │ ├── ItemSingleTest.java │ │ ├── ItemTableTest.java │ │ ├── ItemTreeTest.java │ │ └── representation │ │ └── CreateEmptyElementTest.java │ ├── datatypes │ ├── basic │ │ ├── DvBooleanTest.java │ │ ├── DvStateTest.java │ │ └── ParseDataValueTest.java │ ├── encapsulated │ │ └── DvMultimediaTest.java │ ├── quantity │ │ ├── DvCountTest.java │ │ ├── DvOrderedTest.java │ │ ├── DvOrdinalTest.java │ │ ├── DvProportionTest.java │ │ ├── DvQuantityTest.java │ │ ├── ProportionKindTest.java │ │ └── datetime │ │ │ ├── DvDateTest.java │ │ │ ├── DvDateTimeParserTest.java │ │ │ ├── DvDateTimeParserTimeZoneTest.java │ │ │ ├── DvDateTimeTest.java │ │ │ ├── DvDurationTest.java │ │ │ └── DvTimeTest.java │ └── text │ │ ├── DvCodedTextTest.java │ │ ├── DvTextTest.java │ │ └── TestCodePhrase.java │ └── support │ ├── basic │ └── IntervalTest.java │ ├── identification │ ├── ArchetypeIDTest.java │ ├── HierObjectIDTest.java │ ├── ISO_OIDTest.java │ ├── InternetIDTest.java │ ├── ObjectRefTest.java │ ├── ObjectVersionIDTest.java │ ├── TerminologyIDTest.java │ ├── TestTerminologyID.java │ ├── UUIDTest.java │ └── VersionTreeIDTest.java │ ├── measurement │ └── TestMeasurementService.java │ └── terminology │ ├── OpenEHRCodeSetIdentifiersTest.java │ ├── OpenEHRTerminologyGroupIdentifiersTest.java │ ├── TestCodeSetAccess.java │ ├── TestTerminologyAccess.java │ └── TestTerminologyService.java ├── openehr-rm-domain ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── openehr │ │ └── rm │ │ ├── composition │ │ ├── Composition.java │ │ ├── EventContext.java │ │ └── content │ │ │ ├── ContentItem.java │ │ │ ├── entry │ │ │ ├── Action.java │ │ │ ├── Activity.java │ │ │ ├── AdminEntry.java │ │ │ ├── CareEntry.java │ │ │ ├── Entry.java │ │ │ ├── Evaluation.java │ │ │ ├── ISMTransition.java │ │ │ ├── Instruction.java │ │ │ ├── InstructionDetails.java │ │ │ └── Observation.java │ │ │ └── navigation │ │ │ └── Section.java │ │ ├── demographic │ │ ├── Actor.java │ │ ├── Address.java │ │ ├── Agent.java │ │ ├── Capability.java │ │ ├── Contact.java │ │ ├── Group.java │ │ ├── Organisation.java │ │ ├── Party.java │ │ ├── PartyIdentity.java │ │ ├── PartyRelationship.java │ │ ├── Person.java │ │ ├── Role.java │ │ └── VersionedParty.java │ │ ├── ehr │ │ ├── EHR.java │ │ ├── EHRAccess.java │ │ ├── EHRStatus.java │ │ ├── VersionedComposition.java │ │ ├── VersionedEHRAccess.java │ │ └── VersionedEHRStatus.java │ │ ├── ehrextract │ │ ├── EHRExtract.java │ │ ├── XAccessControl.java │ │ ├── XComposition.java │ │ ├── XDemographics.java │ │ ├── XFolder.java │ │ └── XTerminology.java │ │ ├── integration │ │ └── GenericEntry.java │ │ └── message │ │ ├── Message.java │ │ └── MessageContent.java │ └── test │ └── java │ └── org │ └── openehr │ └── rm │ ├── composition │ ├── CompositionTest.java │ ├── CompositionTestBase.java │ ├── EventContextTest.java │ └── content │ │ ├── entry │ │ ├── ActionTest.java │ │ ├── ActivityTest.java │ │ ├── AdminEntryTest.java │ │ ├── EvaluationTest.java │ │ ├── ISMTransitionTest.java │ │ ├── InstructionTest.java │ │ └── ObservationTest.java │ │ └── navigation │ │ └── SectionTest.java │ ├── datastructure │ ├── DataStructureTestBase.java │ └── DataStructureTestBase2.java │ ├── demographic │ ├── AddressTest.java │ ├── CapabilityTest.java │ ├── ContactTest.java │ ├── DemographicTestBase.java │ ├── PartyIdentityTest.java │ ├── PartyRelationshipTest.java │ ├── PartyTest.java │ ├── PersonTest.java │ └── VersionedPartyTest.java │ ├── ehr │ ├── EHRStatusTest.java │ └── VersionedCompositionTest.java │ ├── integration │ ├── GenericEntryCreationTest.java │ └── GenericEntryPathTest.java │ └── support │ ├── measurement │ └── TestMeasurementService.java │ └── terminology │ ├── TestCodeSetAccess.java │ ├── TestTerminologyAccess.java │ └── TestTerminologyService.java ├── pom.xml ├── rm-builder ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── openehr │ │ │ └── build │ │ │ ├── AttributeFormatException.java │ │ │ ├── AttributeMissingException.java │ │ │ ├── ErrorType.java │ │ │ ├── RMObjectBuilder.java │ │ │ ├── RMObjectBuildingException.java │ │ │ └── SystemValue.java │ └── resources │ │ └── log4j.properties │ └── test │ └── java │ └── org │ └── openehr │ └── build │ ├── BuildDvCountTest.java │ ├── BuildTestBase.java │ ├── CommonSupportBuildTest.java │ ├── CreateDvMultimediaTest.java │ ├── DataStructuresBuildTest.java │ ├── DataTypesBuildTest.java │ ├── DemographicBuildTest.java │ ├── EHRBuildTest.java │ └── FindMatchingRMClassTest.java ├── rm-skeleton ├── hypersensitivity_drug.dadl ├── hypersensitivity_drug_sulfa.dadl ├── hypersensitivity_food_milk.dadl ├── hypersensitivity_maximum.dadl ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── openehr │ │ └── rm │ │ └── util │ │ ├── GenerationStrategy.java │ │ ├── RMUtil.java │ │ └── SkeletonGenerator.java │ └── test │ ├── java │ └── org │ │ └── openehr │ │ └── rm │ │ └── util │ │ ├── CodedTextTest.java │ │ ├── GenerateHypersensitivityTest.java │ │ ├── GenerateNestedSectionsTest.java │ │ ├── OrdinalTest.java │ │ ├── RMUtilTest.java │ │ ├── RootNodeNameTest.java │ │ ├── SimpleDvMultimediaTest.java │ │ ├── SkeletonGeneratorTestBase.java │ │ ├── TemplateIdTest.java │ │ ├── TestActions.java │ │ ├── TestEvents.java │ │ ├── TestFlattenedTemplate.java │ │ ├── TestItemTreeGeneration.java │ │ ├── TestObservations.java │ │ ├── TestStrategy.java │ │ └── UtilityTest.java │ └── resources │ ├── adl │ ├── openEHR-EHR-ACTION.medication.v1.adl │ ├── openEHR-EHR-EVALUATION.hypersensitivity.v1.adl │ ├── openEHR-EHR-INSTRUCTION.medication.v1.adl │ ├── openEHR-EHR-ITEM_TREE.blood_pressure.v1.adl │ ├── openEHR-EHR-ITEM_TREE.medication.v1.adl │ ├── openEHR-EHR-ITEM_TREE.medication_test_eight.v1.adl │ ├── openEHR-EHR-ITEM_TREE.medication_test_five.v1.adl │ ├── openEHR-EHR-ITEM_TREE.medication_test_four.v1.adl │ ├── openEHR-EHR-ITEM_TREE.medication_test_nine.v1.adl │ ├── openEHR-EHR-ITEM_TREE.medication_test_one.v1.adl │ ├── openEHR-EHR-ITEM_TREE.medication_test_seven.v1.adl │ ├── openEHR-EHR-ITEM_TREE.medication_test_six.v1.adl │ ├── openEHR-EHR-ITEM_TREE.medication_test_three.v1.adl │ ├── openEHR-EHR-ITEM_TREE.medication_test_two.v1.adl │ ├── openEHR-EHR-OBSERVATION.apgar.v1.adl │ ├── openEHR-EHR-OBSERVATION.blood_pressure.v2.adl │ ├── openEHR-EHR-OBSERVATION.body_weight.v2.adl │ ├── openEHR-EHR-OBSERVATION.heart_rate.v2.adl │ ├── openEHR-EHR-OBSERVATION.height.v2.adl │ ├── openEHR-EHR-OBSERVATION.lab_test.v1.adl │ ├── openEHR-EHR-OBSERVATION.waist_hip.v2.adl │ ├── openEHR-EHR-SECTION.ad_hoc_heading.v1.adl │ └── openEHR-EHR-SECTION.medications.v1.adl │ ├── dadl │ ├── item_tree_blood_pressure_1.dadl │ ├── item_tree_medicataion_1.dadl │ ├── item_tree_medicataion_10.dadl │ ├── item_tree_medicataion_11.dadl │ ├── item_tree_medicataion_12.dadl │ ├── item_tree_medicataion_2.dadl │ ├── item_tree_medicataion_3.dadl │ ├── item_tree_medicataion_4.dadl │ ├── item_tree_medicataion_5.dadl │ ├── item_tree_medicataion_6.dadl │ ├── item_tree_medicataion_7.dadl │ ├── item_tree_medicataion_8.dadl │ └── item_tree_medicataion_9.dadl │ ├── log4j.properties │ ├── oet │ ├── test_nested_sections_with_optional_children.oet │ ├── test_section_instruction_tree.oet │ └── test_text_name.oet │ ├── terms.txt │ └── xml │ ├── purged.xml │ └── to_purge.xml ├── xml-binding ├── pom.xml └── src │ ├── main │ ├── groovy │ │ └── load-observation.groovy │ ├── java │ │ └── org │ │ │ └── openehr │ │ │ └── binding │ │ │ ├── RMInspector.java │ │ │ ├── XMLBinding.java │ │ │ └── XMLBindingException.java │ └── xsd │ │ ├── Archetype.xsd │ │ ├── BaseTypes.xsd │ │ ├── Composition.xsd │ │ ├── Content.xsd │ │ ├── Extract.xsd │ │ ├── OpenehrProfile.xsd │ │ ├── Resource.xsd │ │ ├── Structure.xsd │ │ └── Version.xsd │ └── test │ ├── java │ └── org │ │ └── openehr │ │ └── binding │ │ ├── BindDataTypesTest.java │ │ ├── BindEmptyItemTreeTest.java │ │ ├── BindItemTreeWithDvProportionTest.java │ │ ├── BindStructureToXMLTest.java │ │ ├── CreateXMLObjectTest.java │ │ ├── RMBindingTest.java │ │ ├── VersionedDocumentTest.java │ │ ├── XMLBindingTestBase.java │ │ └── XMLParsingTest.java │ └── resources │ ├── composition-discharge.xml │ ├── composition-prescription.xml │ ├── composition.xml │ ├── dv_proportion.xml │ ├── empty_item_tree.xml │ ├── item_tree.xml │ ├── item_tree_002.xml │ ├── item_tree_003.xml │ ├── log4j.properties │ ├── original_version_001.xml │ ├── original_version_002.xml │ └── simple_composition.xml └── xml-serializer ├── pom.xml ├── readme.txt └── src └── main └── java └── org └── openehr └── am └── serialize └── XMLSerializer.java /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | *.iml 3 | target 4 | dadl-binding/tree_2_slots.dadl 5 | oet-parser/term_map.txt 6 | oet-parser/test_paths.txt 7 | rm-skeleton/hypersensitivity_max.dadl 8 | rm-skeleton/hypersensitivity_min.dadl 9 | build.sh 10 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Version: MPL 2.0/GPL 2.0/LGPL 2.1 2 | 3 | The contents of this file are subject to the Mozilla Public License Version 2.0 (the 'License'); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ 4 | 5 | Software distributed under the License is distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. 6 | 7 | 8 | The Initial Developer of the Original Code is Rong Chen. Portions created by the Initial Developer are Copyright (C) 2013 the Initial Developer. All Rights Reserved. 9 | 10 | Contributor(s): 11 | 12 | Software distributed under the License is distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # java-libs 2 | Java openEHR Implementation project (ADL 1.4) 3 | 4 | ## Getting Started 5 | 6 | ### Requirements 7 | 8 | * Java 8 or higher 9 | * Maven 3.0.4 or higher 10 | 11 | ### Usage 12 | 13 | The java-libs project is available at [Maven Central](http://search.maven.org/). 14 | 15 | For example, if you need to use the adl-parser, add into your _pom.xml_: 16 | 17 | ```xml 18 | 19 | org.openehr.java-libs 20 | adl-parser 21 | 1.0.71 22 | 23 | ``` 24 | 25 | ### Installation 26 | 27 | To build the whole project, first clone it, and once inside the project's folder (by default _java-libs_), run: 28 | ```bash 29 | mvn clean install 30 | ``` 31 | This will create binary files in the _target_ directories of each submodule. 32 | 33 | -------------------------------------------------------------------------------- /adl-parser/readme.txt: -------------------------------------------------------------------------------- 1 | Java ADL Parser 2 | =============== 3 | 4 | DESCRIPTION 5 | This is a Java implementation of a parser that can read openEHR 6 | archetypes in Archetype Definition Language (ADL) format and 7 | output a object tree in the form of Archetype Object Model (AOM). 8 | It also provides some validation of archetypes after parsing. 9 | 10 | STATUS 11 | Based on Archetype Definition Language (ADL) 1.4 and Archetype 12 | Object Model and other related Information Models from openEHR 13 | release 1.0.1. -------------------------------------------------------------------------------- /adl-parser/src/main/java/se/acode/openehr/parser/AttributeValue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * component: "openEHR Java Reference Implementation" 3 | * description: "Java ADL Parser" 4 | * keywords: "binding" 5 | * 6 | * author: "Rong Chen " 7 | * copyright: "Copyright (C) 2005,2006,2007 ACODE HB, Sweden" 8 | * copyright: "Copyright (C) 2008,2009 Cambio Healthcare Systems, Sweden" 9 | * license: "See notice at bottom of class" 10 | * 11 | * file: "$URL$" 12 | * revision: "$LastChangedRevision$" 13 | * last_change: "$LastChangedDate$" 14 | */ 15 | 16 | package se.acode.openehr.parser; 17 | 18 | /** 19 | * AttributeValue 20 | * 21 | * @author Rong Chen 22 | * @version 1.0 23 | */ 24 | public class AttributeValue extends Parsed { 25 | 26 | /* fields */ 27 | String id; 28 | Object qualifier; 29 | Object value; 30 | } 31 | -------------------------------------------------------------------------------- /adl-parser/src/main/java/se/acode/openehr/parser/ContentObject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * component: "openEHR Java Reference Implementation" 3 | * description: "Java ADL Parser" 4 | * keywords: "binding" 5 | * 6 | * author: "Rong Chen " 7 | * copyright: "Copyright (C) 2005,2006,2007 ACODE HB, Sweden" 8 | * copyright: "Copyright (C) 2008,2009 Cambio Healthcare Systems, Sweden" 9 | * license: "See notice at bottom of class" 10 | * 11 | * file: "$URL$" 12 | * revision: "$LastChangedRevision$" 13 | * last_change: "$LastChangedDate$" 14 | */ 15 | 16 | package se.acode.openehr.parser; 17 | 18 | import java.util.List; 19 | 20 | /** 21 | * IdentifiedObject 22 | * 23 | * @author Rong Chen 24 | * @version 1.0 25 | */ 26 | public class ContentObject extends Parsed { 27 | 28 | /* fields */ 29 | String id; // null for anonymous object 30 | String constraint; // null for anonymous object 31 | List attributes; 32 | } 33 | -------------------------------------------------------------------------------- /adl-parser/src/main/java/se/acode/openehr/parser/Invariant.java: -------------------------------------------------------------------------------- 1 | /* 2 | * component: "openEHR Java Reference Implementation" 3 | * description: "Java ADL Parser" 4 | * keywords: "binding" 5 | * 6 | * author: "Rong Chen " 7 | * copyright: "Copyright (C) 2005,2006,2007 ACODE HB, Sweden" 8 | * copyright: "Copyright (C) 2008,2009 Cambio Healthcare Systems, Sweden" 9 | * license: "See notice at bottom of class" 10 | * 11 | * file: "$URL$" 12 | * revision: "$LastChangedRevision$" 13 | * last_change: "$LastChangedDate$" 14 | */ 15 | 16 | package se.acode.openehr.parser; 17 | 18 | /** 19 | * Invariant 20 | * 21 | * @author Rong Chen 22 | * @version 1.0 23 | */ 24 | public class Invariant extends Parsed { 25 | 26 | // todo: implement it 27 | } 28 | -------------------------------------------------------------------------------- /adl-parser/src/test/java/se/acode/openehr/parser/BasicGenericTypeTest.java: -------------------------------------------------------------------------------- 1 | package se.acode.openehr.parser; 2 | 3 | import org.openehr.am.archetype.Archetype; 4 | 5 | public class BasicGenericTypeTest extends ParserTestBase { 6 | public void testParse() throws Exception { 7 | ADLParser parser = new ADLParser(loadFromClasspath( 8 | "adl-test-SOME_TYPE.generic_type_basic.draft.adl")); 9 | Archetype archetype = parser.parse(); 10 | assertNotNull(archetype); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /adl-parser/src/test/java/se/acode/openehr/parser/MissingLanguageTest.java: -------------------------------------------------------------------------------- 1 | package se.acode.openehr.parser; 2 | 3 | import org.openehr.am.archetype.Archetype; 4 | 5 | /** 6 | * Testcase that verifies parser compatibility with archetypes 7 | * that have missing language part 8 | * 9 | * @author Rong Chen 10 | */ 11 | public class MissingLanguageTest extends ParserTestBase { 12 | 13 | public void testMissingLanguageCompatibility() throws Exception { 14 | boolean missingLanguageCompatible = true; 15 | boolean emptyPurposeCompatible = false; 16 | ADLParser parser = new ADLParser(loadFromClasspath( 17 | "adl-test-entry.missing_language.test.adl"), 18 | missingLanguageCompatible, emptyPurposeCompatible); 19 | Archetype archetype = parser.parse(); 20 | assertNotNull(archetype); 21 | 22 | assertEquals("originalLanguage wrong", "zh", 23 | archetype.getOriginalLanguage().getCodeString()); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /adl-parser/src/test/java/se/acode/openehr/parser/MissingPurposeTest.java: -------------------------------------------------------------------------------- 1 | package se.acode.openehr.parser; 2 | 3 | import org.openehr.am.archetype.Archetype; 4 | 5 | public class MissingPurposeTest extends ParserTestBase { 6 | public void testMissingLanguageCompatibility() throws Exception { 7 | boolean missingLanguageCompatible = false; 8 | boolean emptyPurposeCompatible = true; 9 | ADLParser parser = new ADLParser(loadFromClasspath( 10 | "adl-test-entry.archetype_desc_missing_purpose.test.adl"), 11 | missingLanguageCompatible, emptyPurposeCompatible); 12 | Archetype archetype = parser.parse(); 13 | assertNotNull(archetype); 14 | 15 | assertNotNull("purpose null", 16 | archetype.getDescription().getDetails().get("en").getPurpose()); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /adl-parser/src/test/java/se/acode/openehr/parser/MixedNodeTypesTest.java: -------------------------------------------------------------------------------- 1 | package se.acode.openehr.parser; 2 | 3 | import org.openehr.am.archetype.Archetype; 4 | 5 | public class MixedNodeTypesTest extends ParserTestBase { 6 | 7 | public void testMixedNodeTypes() throws Exception { 8 | ADLParser parser = new ADLParser(loadFromClasspath( 9 | "adl-test-entry.mixed_node_types.draft.adl")); 10 | 11 | try { 12 | Archetype archetype = parser.parse(); 13 | assertNotNull(archetype); 14 | } catch(Exception e) { 15 | e.printStackTrace(); 16 | fail("failed to parse mixed node types"); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /adl-parser/src/test/java/se/acode/openehr/parser/MostMinimalADLTest.java: -------------------------------------------------------------------------------- 1 | package se.acode.openehr.parser; 2 | 3 | import org.openehr.am.archetype.Archetype; 4 | 5 | /** 6 | * MostMinimalADLTest 7 | * 8 | * @author Rong Chen 9 | * @version 1.0 10 | */ 11 | public class MostMinimalADLTest extends ParserTestBase { 12 | 13 | /** 14 | * Create new test case 15 | * 16 | * @param test 17 | * @throws Exception 18 | */ 19 | public MostMinimalADLTest(String test) throws Exception { 20 | super(test); 21 | } 22 | 23 | public void testParse() throws Exception { 24 | ADLParser parser = new ADLParser(loadFromClasspath( 25 | "adl-test-entry.most_minimal.test.adl")); 26 | Archetype archetype = parser.parse(); 27 | 28 | assertNotNull(archetype); 29 | 30 | assertEquals("originalLanguage wrong", "en", 31 | archetype.getOriginalLanguage().getCodeString()); 32 | 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /adl-parser/src/test/java/se/acode/openehr/parser/RegularExpressionTest.java: -------------------------------------------------------------------------------- 1 | package se.acode.openehr.parser; 2 | 3 | public class RegularExpressionTest extends ParserTestBase { 4 | 5 | public RegularExpressionTest(String test) throws Exception { 6 | super(test); 7 | } 8 | 9 | public void testParseRegularExpressions() throws Exception { 10 | ADLParser parser = new ADLParser(loadFromClasspath( 11 | "adl-test-entry.regular_expression.test.adl")); 12 | assertNotNull(parser.parse().getDefinition()); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /adl-parser/src/test/resources/adl-test-composition.dv_coded_text.test.adl: -------------------------------------------------------------------------------- 1 | archetype (adl_version=1.4) 2 | openEHR-EHR-COMPOSITION.dv_coded_text.test 3 | 4 | concept 5 | [at0000] -- Problem list 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | COMPOSITION[at0000] matches { -- Problem list 12 | category matches { 13 | DV_CODED_TEXT matches { 14 | defining_code matches {[openehr::431]} 15 | } 16 | } 17 | } 18 | 19 | ontology 20 | term_definitions = < 21 | ["en"] = < 22 | items = < 23 | ["at0000"] = < 24 | description = <"A list of the ongoing health problems of this person."> 25 | text = <"Problem list"> 26 | > 27 | > 28 | > 29 | > 30 | -------------------------------------------------------------------------------- /adl-parser/src/test/resources/adl-test-entry.archetype_identification.test.adl: -------------------------------------------------------------------------------- 1 | archetype (adl_version=1.4) 2 | adl-test-ENTRY.archetype_identification.draft 3 | 4 | concept 5 | [at0000] -- test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ENTRY[at0000] matches {*} 12 | 13 | ontology 14 | primary_language = <"en"> 15 | languages_available = <"en", ...> 16 | 17 | term_definitions = < 18 | ["en"] = < 19 | items = < 20 | ["at0000"] = < 21 | text = <"test">; 22 | description = <"test"> 23 | > 24 | > 25 | > 26 | > -------------------------------------------------------------------------------- /adl-parser/src/test/resources/adl-test-entry.archetype_internal_ref.test.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-entry.archetype_internal_ref.test 3 | 4 | concept 5 | [at0000] 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | Entry[at0000] matches { -- Encounter 12 | attribute1 matches { 13 | SECTION[at0001] occurrences matches {0..1} matches {*} 14 | } 15 | attribute2 matches { 16 | use_node SECTION occurrences matches {1..2} /attribute1 17 | } 18 | attribute3 matches { 19 | use_node COMPLEX_OBJECT /items[at0001] 20 | use_node COMPLEX_OBJECT /items[at0002] 21 | } 22 | attribute4 matches { 23 | use_node SECTION[at0005] /items[at0001] 24 | use_node SECTION[at0006] /items[at0002] 25 | } 26 | } 27 | 28 | ontology 29 | primary_language = <"en"> 30 | languages_available = <"en", ...> 31 | term_definitions = < 32 | ["en"] = < 33 | items = < 34 | ["at0000"] = < 35 | text = <"test composition">; 36 | description = <"test composition"> 37 | > 38 | > 39 | > 40 | > -------------------------------------------------------------------------------- /adl-parser/src/test/resources/adl-test-entry.archetype_internal_ref2.test.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-entry.archetype_internal_ref.test 3 | 4 | concept 5 | [at0000] 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | Entry[at0000] matches { -- Encounter 12 | attribute1 matches { 13 | SECTION[at0001] occurrences matches {0..1} matches {*} 14 | } 15 | attribute2 matches { 16 | use_node SECTION occurrences matches {1..2} /attribute1 -- /test withslash in comment after use node 17 | } 18 | attribute3 matches { 19 | use_node COMPLEX_OBJECT /items[at0001] 20 | use_node COMPLEX_OBJECT /items[at0002] 21 | } 22 | } 23 | 24 | ontology 25 | primary_language = <"en"> 26 | languages_available = <"en", ...> 27 | term_definitions = < 28 | ["en"] = < 29 | items = < 30 | ["at0000"] = < 31 | text = <"test composition">; 32 | description = <"test composition"> 33 | > 34 | > 35 | > 36 | > -------------------------------------------------------------------------------- /adl-parser/src/test/resources/adl-test-entry.archetype_language_no_accreditation.test.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ENTRY.archetype_language.draft 3 | 4 | concept 5 | [at0000] -- test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | translations = < 10 | ["de"] = < 11 | language = <[ISO_639-1::de]> 12 | author = < 13 | ["name"] = <"Harry Potter"> 14 | ["email"] = <"harry@something.somewhere.co.uk"> 15 | > 16 | other_details = < 17 | ["review 1"] = <"Ron Weasley"> 18 | ["review 2"] = <"Rubeus Hagrid"> 19 | > 20 | > 21 | > 22 | definition 23 | ENTRY[at0000] matches {*} 24 | 25 | ontology 26 | primary_language = <"en"> 27 | languages_available = <"en", ...> 28 | 29 | term_definitions = < 30 | ["en"] = < 31 | items = < 32 | ["at0000"] = < 33 | text = <"test">; 34 | description = <"test"> 35 | > 36 | > 37 | > 38 | > -------------------------------------------------------------------------------- /adl-parser/src/test/resources/adl-test-entry.archetype_ontology.test.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ENTRY.archetype_ontology.draft 3 | concept 4 | [at0000] -- empty definition test 5 | language 6 | original_language = <[ISO_639-1::en]> 7 | 8 | definition 9 | ENTRY[at0000] matches {*} 10 | 11 | ontology 12 | primary_language = <"en"> 13 | languages_available = <"en", ...> 14 | 15 | term_definitions = < 16 | ["en"] = < 17 | items = < 18 | ["at0000"] = < 19 | text = <"some text">; 20 | description = <"some description"> 21 | comment = <"some comment"> 22 | > 23 | > 24 | > 25 | > -------------------------------------------------------------------------------- /adl-parser/src/test/resources/adl-test-entry.archetype_slot.test.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-entry.archetype_slot.test 3 | 4 | concept 5 | [at0000] 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | Entry[at0000] matches { -- Encounter 12 | content matches { 13 | allow_archetype SECTION [at0001] occurrences matches {0..1} matches { 14 | include 15 | domain_concept matches {/blood_pressure.v1/} 16 | exclude 17 | domain_concept matches {/blood_pressure.v2/} 18 | domain_concept matches {/.*/} 19 | } 20 | } 21 | } 22 | 23 | 24 | ontology 25 | primary_language = <"en"> 26 | languages_available = <"en", ...> 27 | term_definitions = < 28 | ["en"] = < 29 | items = < 30 | ["at0000"] = < 31 | text = <"test composition">; 32 | description = <"test composition"> 33 | > 34 | ["at0001"] = < 35 | text = <"slot">; 36 | description = <"slot"> 37 | > 38 | > 39 | > 40 | > -------------------------------------------------------------------------------- /adl-parser/src/test/resources/adl-test-entry.archetype_slot.test2.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-entry.archetype_slot.test 3 | 4 | concept 5 | [at0000] 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | Entry[at0000] matches { -- Encounter 12 | content matches { 13 | allow_archetype SECTION [at0001] occurrences matches {0..1} matches { 14 | include 15 | archetype_id/value matches {/openEHR-EHR-CLUSTER\.device\.v1/} 16 | } 17 | } 18 | } 19 | 20 | 21 | ontology 22 | primary_language = <"en"> 23 | languages_available = <"en", ...> 24 | term_definitions = < 25 | ["en"] = < 26 | items = < 27 | ["at0000"] = < 28 | text = <"test composition">; 29 | description = <"test composition"> 30 | > 31 | ["at0001"] = < 32 | text = <"slot">; 33 | description = <"slot"> 34 | > 35 | > 36 | > 37 | > -------------------------------------------------------------------------------- /adl-parser/src/test/resources/adl-test-entry.archetype_uncommonkeys.test.adl: -------------------------------------------------------------------------------- 1 | archetype (adl_version=1.4) 2 | adl-test-ENTRY.archetype_uncommonkeys.v1 3 | 4 | concept 5 | [at0000] -- test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ENTRY[at0000] matches {*} 12 | 13 | ontology 14 | primary_language = <"en"> 15 | languages_available = <"en", ...> 16 | 17 | term_definitions = < 18 | ["en"] = < 19 | items = < 20 | ["at0000"] = < 21 | text = <"test text">; 22 | description = <"test description"> 23 | anotherkey = <"another key value"> 24 | status = <"status value"> 25 | revision = <"revision value"> 26 | > 27 | > 28 | > 29 | > -------------------------------------------------------------------------------- /adl-parser/src/test/resources/adl-test-entry.constraint_binding.test.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ENTRY.constraint_binding.draft 3 | concept 4 | [at0000] -- empty definition test 5 | 6 | language 7 | original_language = <[ISO_639-1::en]> 8 | 9 | definition 10 | ENTRY[at0000] matches {*} 11 | 12 | ontology 13 | primary_language = <"en"> 14 | languages_available = <"en", ...> 15 | 16 | term_definitions = < 17 | ["en"] = < 18 | items = < 19 | ["at0000"] = < 20 | text = <"most minimal">; 21 | description = <"most minimal"> 22 | > 23 | > 24 | > 25 | > 26 | constraint_binding = < 27 | ["SNOMED_CT"] = < 28 | items = < 29 | ["ac0001"] = 30 | > 31 | > 32 | ["ICD10"] = < 33 | items = < 34 | ["ac0001"] = 35 | > 36 | > 37 | > -------------------------------------------------------------------------------- /adl-parser/src/test/resources/adl-test-entry.empty_other_contributors.test.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ENTRY.empty_other_contributors.draft 3 | 4 | concept 5 | [at0000] -- test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | description 11 | original_author = < 12 | ["name"] = <"name"> 13 | > 14 | details = < 15 | ["en"] = < 16 | language = <[ISO_639-1::en]> 17 | purpose = <"purpose"> 18 | use = <"use"> 19 | misuse = <"misuse"> 20 | copyright = <"copyright"> 21 | > 22 | > 23 | lifecycle_state = <"AuthorDraft"> 24 | other_contributors = <> 25 | 26 | definition 27 | ENTRY[at0000] matches {*} 28 | 29 | ontology 30 | primary_language = <"en"> 31 | languages_available = <"en", ...> 32 | 33 | term_definitions = < 34 | ["en"] = < 35 | items = < 36 | ["at0000"] = < 37 | text = <"text">; 38 | description = <"description"> 39 | > 40 | > 41 | > 42 | > -------------------------------------------------------------------------------- /adl-parser/src/test/resources/adl-test-entry.missing_language.test.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ENTRY.missing_language.draft 3 | 4 | concept 5 | [at0000] -- testing missing language compatibility 6 | 7 | definition 8 | ENTRY[at0000] matches {*} 9 | 10 | ontology 11 | primary_language = <"zh"> 12 | languages_available = <"zh", ...> 13 | 14 | term_definitions = < 15 | ["en"] = < 16 | items = < 17 | ["at0000"] = < 18 | text = <"most minimal">; 19 | description = <"most minimal"> 20 | > 21 | > 22 | > 23 | > -------------------------------------------------------------------------------- /adl-parser/src/test/resources/adl-test-entry.most_minimal.test.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ENTRY.most_minimal.draft 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ENTRY[at0000] matches {*} 12 | 13 | ontology 14 | term_definitions = < 15 | ["en"] = < 16 | items = < 17 | ["at0000"] = < 18 | text = <"most minimal">; 19 | description = <"most minimal"> 20 | > 21 | > 22 | > 23 | > -------------------------------------------------------------------------------- /adl-parser/src/test/resources/adl-test-entry.term_binding.test.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ENTRY.term_binding.draft 3 | concept 4 | [at0000] -- empty definition test 5 | language 6 | original_language = <[ISO_639-1::en]> 7 | 8 | 9 | definition 10 | ENTRY[at0000] matches {*} 11 | 12 | ontology 13 | primary_language = <"en"> 14 | languages_available = <"en", ...> 15 | 16 | term_definitions = < 17 | ["en"] = < 18 | items = < 19 | ["at0000"] = < 20 | text = <"most minimal">; 21 | description = <"most minimal"> 22 | > 23 | > 24 | > 25 | > 26 | term_binding = < 27 | ["SNOMED_CT"] = < 28 | items = < 29 | ["at0000"] = <[snomed_ct::1000339]> 30 | > 31 | > 32 | ["ICD10"] = < 33 | items = < 34 | ["at0000"] = <[icd10::1000],[icd10::1001]> 35 | > 36 | > 37 | > -------------------------------------------------------------------------------- /adl-parser/src/test/resources/adl-test-entry.term_binding2.test.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ENTRY.term_binding.draft 3 | concept 4 | [at0000] -- path-based binding test 5 | language 6 | original_language = <[ISO_639-1::en]> 7 | 8 | 9 | definition 10 | ENTRY[at0000] matches {*} 11 | 12 | ontology 13 | primary_language = <"en"> 14 | languages_available = <"en", ...> 15 | 16 | term_definitions = < 17 | ["en"] = < 18 | items = < 19 | ["at0000"] = < 20 | text = <"most minimal">; 21 | description = <"most minimal"> 22 | > 23 | > 24 | > 25 | > 26 | term_binding = < 27 | ["LNC205"] = < 28 | items = < 29 | ["/data[at0002]/events[at0003]/data[at0001]/item[at0004]"] = <[LNC205::8310-5]> 30 | > 31 | > 32 | > -------------------------------------------------------------------------------- /adl-parser/src/test/resources/adl-test-entry.translations_author_language.test.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ENTRY.translation_author_language.draft 3 | 4 | concept 5 | [at0000] -- test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | translations = < 10 | ["de"] = < 11 | author = < 12 | ["name"] = <"Harry Potter"> 13 | ["email"] = <"harry@something.somewhere.co.uk"> 14 | > 15 | language = <[ISO_639-1::de]> 16 | > 17 | > 18 | definition 19 | ENTRY[at0000] matches {*} 20 | 21 | ontology 22 | primary_language = <"en"> 23 | languages_available = <"en", ...> 24 | 25 | term_definitions = < 26 | ["en"] = < 27 | items = < 28 | ["at0000"] = < 29 | text = <"test">; 30 | description = <"test"> 31 | > 32 | > 33 | > 34 | > -------------------------------------------------------------------------------- /adl-parser/src/test/resources/adl-test-entry.translations_language_author.test.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ENTRY.translation_language_author.draft 3 | 4 | concept 5 | [at0000] -- test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | translations = < 10 | ["de"] = < 11 | language = <[ISO_639-1::de]> 12 | author = < 13 | ["name"] = <"Harry Potter"> 14 | ["email"] = <"harry@something.somewhere.co.uk"> 15 | > 16 | > 17 | > 18 | definition 19 | ENTRY[at0000] matches {*} 20 | 21 | ontology 22 | primary_language = <"en"> 23 | languages_available = <"en", ...> 24 | 25 | term_definitions = < 26 | ["en"] = < 27 | items = < 28 | ["at0000"] = < 29 | text = <"test">; 30 | description = <"test"> 31 | > 32 | > 33 | > 34 | > -------------------------------------------------------------------------------- /adl-parser/src/test/resources/adl-test-entry.unicode_BOM_support.test.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ENTRY.unicode_BOM_support.draft 3 | concept 4 | [at0000] -- empty definition test 5 | language 6 | original_language = <[ISO_639-1::en]> 7 | 8 | 9 | definition 10 | ENTRY[at0000] matches {*} 11 | 12 | ontology 13 | primary_language = <"en"> 14 | languages_available = <"en", "zh", "sv"> 15 | 16 | term_definitions = < 17 | ["en"] = < 18 | items = < 19 | ["at0000"] = < 20 | text = <"concept">; 21 | description = <"description"> 22 | > 23 | > 24 | > 25 | ["zh"] = < 26 | items = < 27 | ["at0000"] = < 28 | text = <"概念">; -- "concept" in Chinese 29 | description = <"描述"> -- "description" in Chinese 30 | > 31 | > 32 | > 33 | ["sv"] = < 34 | items = < 35 | ["at0000"] = < 36 | text = <"språk">; -- "language" in Swedish 37 | description = <"Hjälp"> -- "help" in Swedish 38 | > 39 | > 40 | > 41 | > -------------------------------------------------------------------------------- /adl-parser/src/test/resources/adl-test-entry.unicode_support.test.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ENTRY.unicode_support.draft 3 | concept 4 | [at0000] -- empty definition test 5 | language 6 | original_language = <[ISO_639-1::en]> 7 | 8 | 9 | definition 10 | ENTRY[at0000] matches {*} 11 | 12 | ontology 13 | primary_language = <"en"> 14 | languages_available = <"en", "zh", "sv"> 15 | 16 | term_definitions = < 17 | ["en"] = < 18 | items = < 19 | ["at0000"] = < 20 | text = <"concept">; 21 | description = <"description"> 22 | > 23 | > 24 | > 25 | ["zh"] = < 26 | items = < 27 | ["at0000"] = < 28 | text = <"概念">; -- "concept" in Chinese 29 | description = <"描述"> -- "description" in Chinese 30 | > 31 | > 32 | > 33 | ["sv"] = < 34 | items = < 35 | ["at0000"] = < 36 | text = <"språk">; -- "language" in Swedish 37 | description = <"Hjälp"> -- "help" in Swedish 38 | > 39 | > 40 | > 41 | > -------------------------------------------------------------------------------- /adl-parser/src/test/resources/openEHR-EHR-ELEMENT.uid_test.v1.adl: -------------------------------------------------------------------------------- 1 | archetype (adl_version=1.4; uid=1.2.456) 2 | openEHR-EHR-ELEMENT.uid_test.v1 3 | 4 | concept 5 | [at0000] -- Uid test 6 | language 7 | original_language = <[ISO_639-1::en]> 8 | description 9 | original_author = < 10 | ["name"] = <""> 11 | > 12 | details = < 13 | ["en"] = < 14 | language = <[ISO_639-1::en]> 15 | purpose = <"test"> 16 | use = <""> 17 | misuse = <""> 18 | copyright = <""> 19 | > 20 | > 21 | lifecycle_state = <"Initial"> 22 | other_contributors = <> 23 | other_details = < 24 | ["MD5-CAM-1.0.1"] = <"826347FFD4FDDD289CB364144AB51BFB"> 25 | > 26 | 27 | definition 28 | ELEMENT[at0000] matches { -- Uid test 29 | value matches { 30 | DV_TEXT matches {*} 31 | } 32 | } 33 | 34 | ontology 35 | term_definitions = < 36 | ["en"] = < 37 | items = < 38 | ["at0000"] = < 39 | text = <"Uid test"> 40 | description = <"unknown"> 41 | > 42 | > 43 | > 44 | > 45 | -------------------------------------------------------------------------------- /adl-parser/src/test/resources/openEHR-EHR-ELEMENT.uid_test.v2.adl: -------------------------------------------------------------------------------- 1 | archetype (adl_version=1.4; uncontrolled; uid=1.2.456::22) 2 | openEHR-EHR-ELEMENT.uid_test.v2 3 | 4 | concept 5 | [at0000] -- Uid test 6 | language 7 | original_language = <[ISO_639-1::en]> 8 | description 9 | original_author = < 10 | ["name"] = <""> 11 | > 12 | details = < 13 | ["en"] = < 14 | language = <[ISO_639-1::en]> 15 | purpose = <"test"> 16 | use = <""> 17 | misuse = <""> 18 | copyright = <""> 19 | > 20 | > 21 | lifecycle_state = <"Initial"> 22 | other_contributors = <> 23 | other_details = < 24 | ["MD5-CAM-1.0.1"] = <"826347FFD4FDDD289CB364144AB51BFB"> 25 | > 26 | 27 | definition 28 | ELEMENT[at0000] matches { -- Uid test 29 | value matches { 30 | DV_TEXT matches {*} 31 | } 32 | } 33 | 34 | ontology 35 | term_definitions = < 36 | ["en"] = < 37 | items = < 38 | ["at0000"] = < 39 | text = <"Uid test"> 40 | description = <"unknown"> 41 | > 42 | > 43 | > 44 | > 45 | -------------------------------------------------------------------------------- /adl-serializer/docs/changes.txt: -------------------------------------------------------------------------------- 1 | 2007/02/14 2 | .better interval output for same lower and upper limit 3 | .added precision in CDvQuantity output 4 | .added ConstraintRef output 5 | 6 | 2007/02/13 7 | .added support for translations 8 | .fixed archetypeInternalRef output bug 9 | .fixed unclosed brace when code list is empty 10 | 11 | 2007/02/11 12 | .archetype language support 13 | 14 | 2007/01/24 15 | .added assumedValue in all CPrimitive types 16 | .added assumedValue in CDvOrdinal output 17 | .added pattern in CDuration output 18 | 19 | 2007/01/20 20 | .bug fix related to null includes or excludes in printArchetypeSlot 21 | .added support for assumedValue in CCodePhrase 22 | 23 | 2007/01/14 24 | .added support for CCodePhrase 25 | .added support for archetype language 26 | 27 | 2006/12/16 28 | .updated support for ArchetypeSlot -------------------------------------------------------------------------------- /adl-serializer/readme.txt: -------------------------------------------------------------------------------- 1 | ADL serializer for Archetype Object Model 2 | -------------------------------------------------------------------------------- /adl-serializer/src/test/adl/adl-test-entry.most_minimal.test.adl: -------------------------------------------------------------------------------- 1 | archetype (adl_version=1.4) 2 | adl-test-ENTRY.most_minimal.draft 3 | concept 4 | [at0000] 5 | language 6 | original_language = <[ISO_639-1::en]> 7 | definition 8 | ENTRY[at0000] matches {*} 9 | ontology 10 | term_definitions = < 11 | ["en"] = < 12 | items = < 13 | ["at0000"] = < 14 | text = <"most minimal"> 15 | description = <"most minimal"> 16 | > 17 | > 18 | > 19 | > -------------------------------------------------------------------------------- /adl-serializer/src/test/adl/archetype-internal-ref-test.adl: -------------------------------------------------------------------------------- 1 | use_node SECTION occurrences matches {1..2} /attribute1 -------------------------------------------------------------------------------- /adl-serializer/src/test/adl/archetype-language.adl: -------------------------------------------------------------------------------- 1 | language 2 | original_language = <[ISO_639-1::en]> 3 | translations = < 4 | ["de"] = < 5 | language = <[ISO_639-1::de]> 6 | author = < 7 | ["email"] = <"harry@something.somewhere.co.uk"> 8 | ["name"] = <"Harry Potter"> 9 | > 10 | accreditation = <"British Medical Translator id 00400595"> 11 | other_details = < 12 | ["reviewer 1"] = <"Ron Weasley"> 13 | ["reviewer 2"] = <"Rubeus Hagrid"> 14 | > 15 | > 16 | > -------------------------------------------------------------------------------- /adl-serializer/src/test/adl/archetype-slot-any-allowed-test.adl: -------------------------------------------------------------------------------- 1 | allow_archetype OBSERVATION[at0001] matches {*} -------------------------------------------------------------------------------- /adl-serializer/src/test/adl/archetype-slot-empty-excludes-test.adl: -------------------------------------------------------------------------------- 1 | allow_archetype OBSERVATION[at0001] occurrences matches {1..*} matches { 2 | include 3 | domain_concept matches {/blood_pressure.v1/} 4 | domain_concept matches {/blood_pressure.v2/} 5 | } -------------------------------------------------------------------------------- /adl-serializer/src/test/adl/archetype-slot-empty-includes-test.adl: -------------------------------------------------------------------------------- 1 | allow_archetype OBSERVATION[at0001] occurrences matches {1..*} matches { 2 | exclude 3 | domain_concept matches {/.*/} 4 | } -------------------------------------------------------------------------------- /adl-serializer/src/test/adl/archetype-slot-test.adl: -------------------------------------------------------------------------------- 1 | allow_archetype OBSERVATION[at0001] occurrences matches {1..*} matches { 2 | include 3 | domain_concept matches {/blood_pressure.v1/} 4 | domain_concept matches {/blood_pressure.v2/} 5 | exclude 6 | domain_concept matches {/.*/} 7 | } -------------------------------------------------------------------------------- /adl-serializer/src/test/adl/c-code-phrase-test-empty.adl: -------------------------------------------------------------------------------- 1 | C_CODE_PHRASE < 2 | > -------------------------------------------------------------------------------- /adl-serializer/src/test/adl/c-code-phrase-test.adl: -------------------------------------------------------------------------------- 1 | [icd10:: 2 | F43.00, 3 | F43.01, 4 | F32.02; 5 | F43.01] -------------------------------------------------------------------------------- /adl-serializer/src/test/adl/c-dv-ordinal-test-empty.adl: -------------------------------------------------------------------------------- 1 | C_DV_ORDINAL < 2 | > -------------------------------------------------------------------------------- /adl-serializer/src/test/adl/c-dv-ordinal-test.adl: -------------------------------------------------------------------------------- 1 | 1|[local::at2001], 2 | 2|[local::at2002], 3 | 3|[local::at2003], 4 | 4|[local::at2004]; 5 | 1|[local::at2001] -------------------------------------------------------------------------------- /adl-serializer/src/test/adl/c-dv-ordinal-test2.adl: -------------------------------------------------------------------------------- 1 | 1|[local::at2001], 2 | 2|[local::at2002], 3 | 3|[local::at2003], 4 | 4|[local::at2004] -------------------------------------------------------------------------------- /adl-serializer/src/test/adl/c-dv-quantity-test-empty.adl: -------------------------------------------------------------------------------- 1 | C_DV_QUANTITY < 2 | > -------------------------------------------------------------------------------- /adl-serializer/src/test/adl/c-dv-quantity-test.adl: -------------------------------------------------------------------------------- 1 | C_DV_QUANTITY < 2 | property = <[openehr::128]> 3 | list = < 4 | ["1"] = < 5 | units = <"year"> 6 | magnitude = <|0.0..200.0|> 7 | precision = <|2|> 8 | > 9 | ["2"] = < 10 | units = <"month"> 11 | magnitude = <|1.0..36.0|> 12 | > 13 | > 14 | > -------------------------------------------------------------------------------- /adl-serializer/src/test/adl/c-string-test.adl: -------------------------------------------------------------------------------- 1 | "value"; "assumed value" -------------------------------------------------------------------------------- /adl-serializer/src/test/adl/empty-attribute-list-test.adl: -------------------------------------------------------------------------------- 1 | DV_TEXT[at0001] matches {*} -------------------------------------------------------------------------------- /adl-serializer/src/test/adl/empty-children-list-test.adl: -------------------------------------------------------------------------------- 1 | value matches {*} -------------------------------------------------------------------------------- /adl-serializer/src/test/java/org/openehr/am/serialize/ArchetypeInternalRefTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.serialize; 2 | 3 | import org.openehr.am.archetype.constraintmodel.ArchetypeInternalRef; 4 | import org.openehr.am.archetype.constraintmodel.CAttribute; 5 | import org.openehr.rm.support.basic.Interval; 6 | 7 | public class ArchetypeInternalRefTest extends SerializerTestBase { 8 | 9 | public void testPrintArchetypeInternalRef() throws Exception { 10 | String path = "/attribute2"; 11 | String type = "SECTION"; 12 | Interval occurrences = new Interval(1, 2); 13 | CAttribute parent = null; 14 | String target = "/attribute1"; 15 | 16 | ArchetypeInternalRef ref = new ArchetypeInternalRef(path, type, 17 | occurrences, null, parent, target); 18 | clean(); 19 | outputter.printArchetypeInternalRef(ref, 0, out); 20 | verifyByFile("archetype-internal-ref-test.adl"); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /archetype-validator/src/main/java/org/openehr/am/validation/RMInspectionException.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.validation; 2 | 3 | public class RMInspectionException extends Exception { 4 | 5 | public RMInspectionException(String value) { 6 | super(value); 7 | } 8 | 9 | public RMInspectionException() { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /archetype-validator/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Set root logger level to DEBUG (or WARN) and its only appender to stdout. 2 | log4j.rootLogger=WARN , stdout 3 | 4 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 5 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 6 | log4j.appender.stdout.layout.ConversionPattern=%-5p %c %x - %m%n 7 | 8 | # package logging level WARN or DEBUG 9 | log4j.logger.org.openehr.am.validation=WARN -------------------------------------------------------------------------------- /archetype-validator/src/main/resources/validations.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openEHR/java-libs/214a1704abadc42034ff01a52961c872080433b8/archetype-validator/src/main/resources/validations.properties -------------------------------------------------------------------------------- /archetype-validator/src/main/resources/validations_de.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openEHR/java-libs/214a1704abadc42034ff01a52961c872080433b8/archetype-validator/src/main/resources/validations_de.properties -------------------------------------------------------------------------------- /archetype-validator/src/main/resources/validations_en.properties: -------------------------------------------------------------------------------- 1 | // This file is intentionally empty to indicate that en is a supported language, even if all English terms are actually in the top-level fallback file validations.properties. 2 | // This is to essentially trick Java into falling back to the root, and not to the JVM's Default locale. If that is e.g. set to de, en would otherwise fallback to de, insteado f the desired root. -------------------------------------------------------------------------------- /archetype-validator/src/test/java/org/openehr/am/validation/ArchetypeDefinitionCodeCheckTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.validation; 2 | 3 | public class ArchetypeDefinitionCodeCheckTest extends ArchetypeValidationTestBase { 4 | 5 | public void testCheckWithCorrectCode() throws Exception { 6 | checkCode("adl-test-ENTRY.definition_code.v1"); 7 | assertEquals("unexpected validation error: " + errors, 0, 8 | errors.size()); 9 | } 10 | 11 | public void testCheckWithWrongCode() throws Exception { 12 | checkCode("adl-test-ENTRY.definition_code.v2"); 13 | assertFirstErrorType(ErrorType.VACCD); 14 | } 15 | 16 | private void checkCode(String name) throws Exception { 17 | archetype = loadArchetype(name); 18 | validator.checkArchetypeDefinitionCodeValidity(archetype, errors); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /archetype-validator/src/test/java/org/openehr/am/validation/DefinitionTypenameCheckTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.validation; 2 | 3 | public class DefinitionTypenameCheckTest extends ArchetypeValidationTestBase { 4 | 5 | public void testCheckTypenameWithWrongType() throws Exception { 6 | checkTypename("adl-test-ENTRY.definition_typename.v1"); 7 | assertEquals("expected validation error", 1, errors.size()); 8 | assertFirstErrorType(ErrorType.VARDT); 9 | } 10 | 11 | public void testCheckTypenameWithRightType() throws Exception { 12 | checkTypename("adl-test-ENTRY.definition_typename.v2"); 13 | assertEquals("expected no validation error", 0, errors.size()); 14 | 15 | checkTypename("adl-test-ENTRY.definition_typename.v3"); 16 | assertEquals("expected no validation error", 0, errors.size()); 17 | } 18 | 19 | private void checkTypename(String name) throws Exception { 20 | archetype = loadArchetype(name); 21 | validator.checkArchetypeDefinitionTypename(archetype, errors); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /archetype-validator/src/test/java/org/openehr/am/validation/DvQuantityUnitsTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.validation; 2 | 3 | public class DvQuantityUnitsTest extends ArchetypeValidationTestBase { 4 | 5 | public void testCheckUnits() throws Exception { 6 | CheckUnits("openEHR-EHR-CLUSTER.units_test.v1.adl"); 7 | assertEquals("expected 10 wrong units", 10, errors.size()); 8 | assertFirstErrorType(ErrorType.VUI); 9 | assertSecondErrorType(ErrorType.VUI); 10 | } 11 | 12 | 13 | private void CheckUnits(String name) throws Exception { 14 | archetype = loadArchetype(name); 15 | validator.checkObjectConstraints(archetype, errors); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /archetype-validator/src/test/java/org/openehr/am/validation/SectionCardinalityTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.validation; 2 | 3 | public class SectionCardinalityTest 4 | extends ArchetypeValidationTestBase { 5 | 6 | public void testCheckSectionItemsCardinality() throws Exception { 7 | checkObjectConstraints("openEHR-EHR-SECTION.testitemscardinality.v1.adl"); 8 | assertEquals("expected NO validation error", 0, errors.size()); 9 | } 10 | 11 | 12 | private void checkObjectConstraints(String name) throws Exception { 13 | archetype = loadArchetype(name); 14 | validator.checkObjectConstraints(archetype, errors); 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /archetype-validator/src/test/java/org/openehr/am/validation/SingleValueAttributeChildIdentifierCheckTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.validation; 2 | 3 | public class SingleValueAttributeChildIdentifierCheckTest 4 | extends ArchetypeValidationTestBase { 5 | 6 | public void testCheckSingleAttributeChildIdentifierWithGoodIds() throws Exception { 7 | checkAttribute("adl-test-ENTRY.single_attribute_child_identifier.v1"); 8 | assertEquals("expected no validation error", 0, errors.size()); 9 | } 10 | 11 | public void testCheckSingleAttributeChildIdentifierWithDuplicatedIds() throws Exception { 12 | checkAttribute("adl-test-ENTRY.single_attribute_child_identifier.v2"); 13 | assertEquals("expected validation error", 1, errors.size()); 14 | assertFirstErrorType(ErrorType.VACSI); 15 | } 16 | 17 | private void checkAttribute(String name) throws Exception { 18 | archetype = loadArchetype(name); 19 | validator.checkObjectConstraints(archetype, errors); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /archetype-validator/src/test/java/org/openehr/am/validation/SpecialisedArchetypeExistenceTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.validation; 2 | 3 | public class SpecialisedArchetypeExistenceTest extends SpecialisedArchetypeValidationTestBase{ 4 | 5 | public void testCheckArchetypesWithNonConformantExistence() throws Exception { 6 | checkSpecialization("adl-specialised-EVALUATION.existence-specialised.v1", "adl-specialised-EVALUATION.existence.v1"); 7 | assertEquals("expected one validation error", 1, errors.size()); 8 | assertFirstErrorType(ErrorType.VSANCE); 9 | } 10 | 11 | 12 | private void checkSpecialization(String name, String parentName) throws Exception { 13 | archetype = loadArchetype(name); 14 | parentArchetype = loadArchetype(parentName); 15 | 16 | errors = validator.validate(archetype, parentArchetype, true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /archetype-validator/src/test/java/org/openehr/am/validation/SpecialisedArchetypeMultiplicityTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.validation; 2 | 3 | public class SpecialisedArchetypeMultiplicityTest extends SpecialisedArchetypeValidationTestBase{ 4 | 5 | public void testCheckArchetypesWithNonConformantMultiplicity() throws Exception { 6 | checkSpecialization("adl-specialised-EVALUATION.multiplicity-specialised.v1", "adl-specialised-EVALUATION.multiplicity.v1"); 7 | assertEquals("expected one validation error", 1, errors.size()); 8 | assertFirstErrorType(ErrorType.VSAM); 9 | } 10 | 11 | 12 | private void checkSpecialization(String name, String parentName) throws Exception { 13 | archetype = loadArchetype(name); 14 | parentArchetype = loadArchetype(parentName); 15 | 16 | errors = validator.validate(archetype, parentArchetype, true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /archetype-validator/src/test/java/org/openehr/am/validation/SpecialisedArchetypeNodeIdConformanceTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.validation; 2 | 3 | public class SpecialisedArchetypeNodeIdConformanceTest extends SpecialisedArchetypeValidationTestBase{ 4 | 5 | public void testCheckArchetypesWithNonConformantMultiplicity() throws Exception { 6 | checkSpecialization("adl-specialised-EVALUATION.node_id_conformance-specialised-again.v1", "adl-specialised-EVALUATION.node_id_conformance-specialised.v1"); 7 | assertEquals("expected one validation error", 1, errors.size()); 8 | assertFirstErrorType(ErrorType.VSONCI); 9 | } 10 | 11 | 12 | private void checkSpecialization(String name, String parentName) throws Exception { 13 | archetype = loadArchetype(name); 14 | parentArchetype = loadArchetype(parentName); 15 | errors = validator.validate(archetype, parentArchetype, true); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /archetype-validator/src/test/java/org/openehr/am/validation/SpecialisedArchetypeNodeSpecialisedAsRequiredTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.validation; 2 | 3 | public class SpecialisedArchetypeNodeSpecialisedAsRequiredTest extends SpecialisedArchetypeValidationTestBase{ 4 | 5 | public void testCheckArchetypesWithNodeThatShouldBeSpecialised() throws Exception { 6 | checkSpecialization("adl-specialised-EVALUATION.node_specialised_as_required-specialised.v1", "adl-specialised-EVALUATION.node_specialised_as_required.v1"); 7 | assertEquals("expected one validation error", 1, errors.size()); 8 | assertFirstErrorType(ErrorType.VSONIR); 9 | } 10 | 11 | 12 | private void checkSpecialization(String name, String parentName) throws Exception { 13 | archetype = loadArchetype(name); 14 | parentArchetype = loadArchetype(parentName); 15 | 16 | errors = validator.validate(archetype, parentArchetype, true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /archetype-validator/src/test/java/org/openehr/am/validation/SpecialisedArchetypeOccurrencesTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.validation; 2 | 3 | public class SpecialisedArchetypeOccurrencesTest extends SpecialisedArchetypeValidationTestBase{ 4 | 5 | public void testCheckArchetypesWithNonConformantOccurrences() throws Exception { 6 | checkSpecialization("adl-specialised-EVALUATION.occurrences-specialised.v1", "adl-specialised-EVALUATION.occurrences.v1"); 7 | assertEquals("expected one validation error", 1, errors.size()); 8 | assertFirstErrorType(ErrorType.VSONCO); 9 | } 10 | 11 | 12 | private void checkSpecialization(String name, String parentName) throws Exception { 13 | archetype = loadArchetype(name); 14 | parentArchetype = loadArchetype(parentName); 15 | 16 | errors = validator.validate(archetype, parentArchetype, true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /archetype-validator/src/test/java/org/openehr/am/validation/TermBindingsValidityTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.validation; 2 | 3 | public class TermBindingsValidityTest extends ArchetypeValidationTestBase { 4 | 5 | public void testTermBindingCorrectOnly() throws Exception { 6 | checkTermBinding("adl-test-ENTRY.term_bindings.v1"); 7 | assertEquals("expected no error in term binding checking", 8 | 0, errors.size()); 9 | } 10 | 11 | public void testTermBindingWrongPaths() throws Exception { 12 | checkTermBinding("adl-test-ENTRY.term_bindings.v2"); 13 | assertEquals("expected validation errors in term binding checking", 4, 14 | errors.size()); 15 | for(ValidationError error : errors) { 16 | assertEquals("validation error type wrong", ErrorType.WITB, 17 | error.getType()); 18 | } 19 | } 20 | 21 | private void checkTermBinding(String name) throws Exception { 22 | archetype = loadArchetype(name); 23 | validator.checkArchetypeTermBindingsValidity(archetype, errors); 24 | } 25 | 26 | 27 | } 28 | -------------------------------------------------------------------------------- /archetype-validator/src/test/java/org/openehr/am/validation/UniqueSiblingAttributesCheckTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.validation; 2 | 3 | public class UniqueSiblingAttributesCheckTest extends ArchetypeValidationTestBase { 4 | 5 | public void testCheckUniqueSiblingAttribute() throws Exception { 6 | checkSiblings("adl-test-ENTRY.sibling_nodes.v1"); 7 | assertEquals("encountered unexpected validation error", 0, 8 | errors.size()); 9 | } 10 | 11 | public void testCheckNonUniqueSiblingAttributes() throws Exception { 12 | checkSiblings("adl-test-ENTRY.sibling_nodes.v2"); 13 | assertEquals("wrong number of validation error in sibling node checking", 1, 14 | errors.size()); 15 | for(ValidationError error : errors) { 16 | assertEquals("validation error type wrong", ErrorType.VCATU, 17 | error.getType()); 18 | } 19 | } 20 | 21 | private void checkSiblings(String name) throws Exception { 22 | archetype = loadArchetype(name); 23 | validator.checkObjectConstraints(archetype, errors); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /archetype-validator/src/test/java/org/openehr/am/validation/ValidateOpenEHRTerminologyCodesTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.validation; 2 | 3 | public class ValidateOpenEHRTerminologyCodesTest 4 | extends ArchetypeValidationTestBase { 5 | 6 | public void testCheckTypeNameDvIntervalWithWrongGenericType() throws Exception { 7 | CheckCodes("adl-test-ELEMENT.type_multimedia.v2.adl"); 8 | // assertFirstErrorType(ErrorType.VOTC); 9 | } 10 | 11 | private void CheckCodes(String name) throws Exception { 12 | archetype = loadArchetype(name); 13 | validator.checkObjectConstraints(archetype, errors); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ELEMENT.assumed_value_boolean.v1.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.assumed_value_boolean.v1 3 | 4 | concept 5 | [at0000] -- wrong assumed value for Boolean test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ELEMENT[at0000] occurrences matches {0..1} matches { -- most minimal 12 | value matches { 13 | DV_BOOLEAN matches { 14 | value matches {True; False} 15 | } 16 | } 17 | } 18 | 19 | ontology 20 | term_definitions = < 21 | ["en"] = < 22 | items = < 23 | ["at0000"] = < 24 | text = <"most minimal">; 25 | description = <"most minimal"> 26 | > 27 | > 28 | > 29 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ELEMENT.assumed_value_count.v1.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.assumed_value_count.v1 3 | 4 | concept 5 | [at0000] -- wrong assumed value for count test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ELEMENT[at0011] occurrences matches {0..1} matches { -- most minimal 12 | value matches { 13 | DV_COUNT matches { 14 | magnitude matches {|0..5|; -4} 15 | } 16 | } 17 | } 18 | 19 | ontology 20 | term_definitions = < 21 | ["en"] = < 22 | items = < 23 | ["at0000"] = < 24 | text = <"most minimal">; 25 | description = <"most minimal"> 26 | > 27 | > 28 | > 29 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ELEMENT.specialization-archetypeid.v1.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.specialization-archetypeid.v1 3 | 4 | specialize 5 | adl-test-ELEMENT.specialization.v1 6 | 7 | concept 8 | [at0000.1] -- empty definition test 9 | 10 | language 11 | original_language = <[ISO_639-1::en]> 12 | 13 | definition 14 | ELEMENT[at0000.1] matches { -- Diagnosis 15 | value matches { 16 | DV_CODED_TEXT matches { 17 | defining_code matches {*} 18 | } 19 | } 20 | } 21 | 22 | ontology 23 | term_definitions = < 24 | ["en"] = < 25 | items = < 26 | ["at0000.1"] = < 27 | text = <"most minimal">; 28 | description = <"most minimal"> 29 | > 30 | > 31 | > 32 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ELEMENT.specialization-archetypeid.v2.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.specialization-archetypeid.v1 3 | 4 | specialize 5 | adl-test-ELEMENT.specializationwrong.v1 6 | 7 | concept 8 | [at0000.1] -- empty definition test 9 | 10 | language 11 | original_language = <[ISO_639-1::en]> 12 | 13 | definition 14 | ELEMENT[at0000.1] matches { -- Diagnosis 15 | value matches { 16 | DV_CODED_TEXT matches { 17 | defining_code matches {*} 18 | } 19 | } 20 | } 21 | 22 | ontology 23 | term_definitions = < 24 | ["en"] = < 25 | items = < 26 | ["at0000.1"] = < 27 | text = <"most minimal">; 28 | description = <"most minimal"> 29 | > 30 | > 31 | > 32 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ELEMENT.specialization-archetypeid.v3.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.specialization-archetypeid.v3 3 | 4 | specialize 5 | adl-test-ELEMENT.specialization.v3draft 6 | 7 | concept 8 | [at0000.1] -- empty definition test 9 | 10 | language 11 | original_language = <[ISO_639-1::en]> 12 | 13 | definition 14 | ELEMENT[at0000.1] matches { -- Diagnosis 15 | value matches { 16 | DV_CODED_TEXT matches { 17 | defining_code matches {*} 18 | } 19 | } 20 | } 21 | 22 | ontology 23 | term_definitions = < 24 | ["en"] = < 25 | items = < 26 | ["at0000.1"] = < 27 | text = <"most minimal">; 28 | description = <"most minimal"> 29 | > 30 | > 31 | > 32 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ELEMENT.specialization-depth.v1.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.specialization-depth.v1 3 | 4 | specialize 5 | adl-test-ELEMENT.specialization.v1 6 | 7 | concept 8 | [at0000.1] -- empty definition test 9 | 10 | language 11 | original_language = <[ISO_639-1::en]> 12 | 13 | definition 14 | ELEMENT[at0000.1] matches { -- Diagnosis 15 | value matches { 16 | DV_CODED_TEXT matches { 17 | defining_code matches {*} 18 | } 19 | } 20 | } 21 | 22 | ontology 23 | term_definitions = < 24 | ["en"] = < 25 | items = < 26 | ["at0000.1"] = < 27 | text = <"most minimal">; 28 | description = <"most minimal"> 29 | > 30 | > 31 | > 32 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ELEMENT.specialization-depth.v2.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.specialization-depth.v2 3 | 4 | specialize 5 | adl-test-ELEMENT.specialization.v1 6 | 7 | concept 8 | [at0000] -- empty definition test 9 | 10 | language 11 | original_language = <[ISO_639-1::en]> 12 | 13 | definition 14 | ELEMENT[at0000] matches { -- Diagnosis 15 | value matches { 16 | DV_CODED_TEXT matches { 17 | defining_code matches {*} 18 | } 19 | } 20 | } 21 | 22 | ontology 23 | term_definitions = < 24 | ["en"] = < 25 | items = < 26 | ["at0000.1"] = < 27 | text = <"most minimal">; 28 | description = <"most minimal"> 29 | > 30 | > 31 | > 32 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ELEMENT.specialization-depth.v3.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.specialization-depth.v3 3 | 4 | specialize 5 | adl-test-ELEMENT.specialization.v1 6 | 7 | concept 8 | [at0000.1.1] -- empty definition test 9 | 10 | language 11 | original_language = <[ISO_639-1::en]> 12 | 13 | definition 14 | ELEMENT[at0000.1.1] matches { -- Diagnosis 15 | value matches { 16 | DV_CODED_TEXT matches { 17 | defining_code matches {*} 18 | } 19 | } 20 | } 21 | 22 | ontology 23 | term_definitions = < 24 | ["en"] = < 25 | items = < 26 | ["at0000.1.1"] = < 27 | text = <"most minimal - the specialisation hierarchy of this code is higher than the specialisation hierarchy of the archetype.">; 28 | description = <"most minimal"> 29 | > 30 | > 31 | > 32 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ELEMENT.specialization.v1.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.specialization.v1 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ELEMENT[at0000] matches { -- Diagnosis 12 | value matches { * } 13 | } 14 | 15 | ontology 16 | term_definitions = < 17 | ["en"] = < 18 | items = < 19 | ["at0000"] = < 20 | text = <"most minimal">; 21 | description = <"most minimal"> 22 | > 23 | > 24 | > 25 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ELEMENT.type_boolean.v1.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.type_boolean.v1 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ELEMENT[at0000] matches { -- Diagnosis 12 | value matches { 13 | DV_BOOLEAN matches { 14 | value matches {True, False} 15 | } 16 | } 17 | } 18 | 19 | ontology 20 | term_definitions = < 21 | ["en"] = < 22 | items = < 23 | ["at0000"] = < 24 | text = <"most minimal">; 25 | description = <"most minimal"> 26 | > 27 | > 28 | > 29 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ELEMENT.type_count.v1.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.type_count.v1 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ELEMENT[at0000] matches { -- Diagnosis 12 | value matches { 13 | DV_COUNT matches { 14 | magnitude matches {|>=0|} 15 | } 16 | } 17 | } 18 | 19 | ontology 20 | term_definitions = < 21 | ["en"] = < 22 | items = < 23 | ["at0000"] = < 24 | text = <"most minimal">; 25 | description = <"most minimal"> 26 | > 27 | > 28 | > 29 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ELEMENT.type_date.v1.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.type_datetime.v1 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ELEMENT[at0000] matches { -- Diagnosis 12 | value matches { 13 | DV_DATE_TIME matches { 14 | value matches {yyyy-??-??T??:??:??} 15 | } 16 | } 17 | } 18 | 19 | ontology 20 | term_definitions = < 21 | ["en"] = < 22 | items = < 23 | ["at0000"] = < 24 | text = <"most minimal">; 25 | description = <"most minimal"> 26 | > 27 | > 28 | > 29 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ELEMENT.type_date.v2.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.type_date.v2 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ELEMENT[at0000] matches { -- Diagnosis 12 | value matches {yyyy-??-??} 13 | } 14 | 15 | ontology 16 | term_definitions = < 17 | ["en"] = < 18 | items = < 19 | ["at0000"] = < 20 | text = <"most minimal">; 21 | description = <"most minimal"> 22 | > 23 | > 24 | > 25 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ELEMENT.type_datetime.v1.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.type_date.v1 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ELEMENT[at0000] matches { -- Diagnosis 12 | value matches { 13 | DV_DATE matches { 14 | value matches {yyyy-??-??} 15 | } 16 | } 17 | } 18 | 19 | ontology 20 | term_definitions = < 21 | ["en"] = < 22 | items = < 23 | ["at0000"] = < 24 | text = <"most minimal">; 25 | description = <"most minimal"> 26 | > 27 | > 28 | > 29 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ELEMENT.type_duration.v1.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.type_duration.v1 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ELEMENT[at0000] matches { -- Diagnosis 12 | value matches { 13 | DV_DURATION matches { 14 | value matches {PW} 15 | } 16 | } 17 | } 18 | 19 | ontology 20 | term_definitions = < 21 | ["en"] = < 22 | items = < 23 | ["at0000"] = < 24 | text = <"most minimal">; 25 | description = <"most minimal"> 26 | > 27 | > 28 | > 29 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ELEMENT.type_ehr_uri.v1.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.type_uri.v1 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ELEMENT[at0000] matches { -- Diagnosis 12 | value matches { 13 | DV_EHR_URI matches {*} 14 | } 15 | } 16 | 17 | ontology 18 | term_definitions = < 19 | ["en"] = < 20 | items = < 21 | ["at0000"] = < 22 | text = <"most minimal">; 23 | description = <"most minimal"> 24 | > 25 | > 26 | > 27 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ELEMENT.type_interval.v1.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.type_interval.v1 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ELEMENT[at0000] matches { -- Diagnosis 12 | value matches { 13 | DV_INTERVAL matches {*} 14 | } 15 | } 16 | 17 | ontology 18 | term_definitions = < 19 | ["en"] = < 20 | items = < 21 | ["at0000"] = < 22 | text = <"most minimal">; 23 | description = <"most minimal"> 24 | > 25 | > 26 | > 27 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ELEMENT.type_interval.v2.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.type_interval.v2 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ELEMENT[at0000] matches { -- Diagnosis 12 | value matches { 13 | DV_INTERVAL matches { 14 | upper matches { 15 | DV_COUNT matches {*} 16 | } 17 | lower matches { 18 | DV_COUNT matches { 19 | magnitude matches {|>=1|} 20 | } 21 | } 22 | } 23 | 24 | } 25 | } 26 | 27 | ontology 28 | term_definitions = < 29 | ["en"] = < 30 | items = < 31 | ["at0000"] = < 32 | text = <"most minimal">; 33 | description = <"most minimal"> 34 | > 35 | > 36 | > 37 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ELEMENT.type_interval.v4.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.type_interval.v4 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ELEMENT[at0000] matches { -- Diagnosis 12 | value matches { 13 | DV_INTERVAL matches { --VCORMT error 14 | * 15 | } 16 | 17 | } 18 | } 19 | 20 | ontology 21 | term_definitions = < 22 | ["en"] = < 23 | items = < 24 | ["at0000"] = < 25 | text = <"most minimal">; 26 | description = <"most minimal"> 27 | > 28 | > 29 | > 30 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ELEMENT.type_interval.v5.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.type_interval.v5 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ELEMENT[at0000] matches { -- Diagnosis 12 | value matches { 13 | DV_INTERVAL matches { --VCORM error 14 | * 15 | } 16 | 17 | } 18 | } 19 | 20 | ontology 21 | term_definitions = < 22 | ["en"] = < 23 | items = < 24 | ["at0000"] = < 25 | text = <"most minimal">; 26 | description = <"most minimal"> 27 | > 28 | > 29 | > 30 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ELEMENT.type_multimedia.v1.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.type_multimedia.v1 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ELEMENT[at0000] matches { -- Diagnosis 12 | value matches { 13 | DV_MULTIMEDIA matches { 14 | media_type matches { 15 | [iana:: 16 | 425, 17 | 426, 18 | 427, 19 | 428, 20 | 429] 21 | } 22 | } 23 | } 24 | } 25 | 26 | ontology 27 | term_definitions = < 28 | ["en"] = < 29 | items = < 30 | ["at0000"] = < 31 | text = <"most minimal">; 32 | description = <"most minimal"> 33 | > 34 | > 35 | > 36 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ELEMENT.type_multimedia.v2.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.type_multimedia.v2 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ELEMENT[at0000] matches { -- Diagnosis 12 | value matches { 13 | DV_MULTIMEDIA matches { 14 | media_type matches { 15 | [openEHR:: 16 | 425, 17 | 426, 18 | 427, 19 | 428, 20 | 429] 21 | } 22 | } 23 | } 24 | } 25 | 26 | ontology 27 | term_definitions = < 28 | ["en"] = < 29 | items = < 30 | ["at0000"] = < 31 | text = <"most minimal">; 32 | description = <"most minimal"> 33 | > 34 | > 35 | > 36 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ELEMENT.type_name.v1: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.type_name.v1 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ELEMENT[at0000] matches { -- Diagnosis 12 | value matches { 13 | DV_CODED_TEXT matches { 14 | defining_code matches {*} 15 | } 16 | } 17 | } 18 | 19 | ontology 20 | term_definitions = < 21 | ["en"] = < 22 | items = < 23 | ["at0000"] = < 24 | text = <"most minimal">; 25 | description = <"most minimal"> 26 | > 27 | > 28 | > 29 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ELEMENT.type_name.v2: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.type_name.v2 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ELEMENT[at0000] matches { -- Diagnosis 12 | value matches { 13 | UNKNOWN_RM_TYPE matches { -- unkown rm type 14 | defining_code matches {*} 15 | } 16 | } 17 | } 18 | 19 | ontology 20 | term_definitions = < 21 | ["en"] = < 22 | items = < 23 | ["at0000"] = < 24 | text = <"most minimal">; 25 | description = <"most minimal"> 26 | > 27 | > 28 | > 29 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ELEMENT.type_name.v3: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.type_name.v3 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ELEMENT[at0000] matches { -- Diagnosis 12 | value matches { 13 | OBSERVATION matches { -- unassignable rm type here! 14 | defining_code matches {*} 15 | } 16 | } 17 | } 18 | 19 | ontology 20 | term_definitions = < 21 | ["en"] = < 22 | items = < 23 | ["at0000"] = < 24 | text = <"most minimal">; 25 | description = <"most minimal"> 26 | > 27 | > 28 | > 29 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ELEMENT.type_proportion.v1.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.type_proportion.v1 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ELEMENT[at0000] matches { 12 | value matches { 13 | DV_PROPORTION matches { 14 | numerator matches {|>=1.0|} 15 | denominator matches {|1.0..4.0|} 16 | type matches {1, 2, 4} 17 | } 18 | } 19 | } 20 | 21 | ontology 22 | term_definitions = < 23 | ["en"] = < 24 | items = < 25 | ["at0000"] = < 26 | text = <"most minimal">; 27 | description = <"most minimal"> 28 | > 29 | > 30 | > 31 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ELEMENT.type_uri.v1.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.type_uri.v1 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ELEMENT[at0000] matches { -- Diagnosis 12 | value matches { 13 | DV_URI matches {*} 14 | } 15 | } 16 | 17 | ontology 18 | term_definitions = < 19 | ["en"] = < 20 | items = < 21 | ["at0000"] = < 22 | text = <"most minimal">; 23 | description = <"most minimal"> 24 | > 25 | > 26 | > 27 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ENTRY.attribute_name.v1: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.attribute_name.v1 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ELEMENT[at0000] matches { -- Diagnosis 12 | value matches { 13 | DV_CODED_TEXT matches { 14 | defining_code matches {[ac0000]} -- Any term that 'is_a' diagnosis 15 | } 16 | } 17 | } 18 | 19 | ontology 20 | term_definitions = < 21 | ["en"] = < 22 | items = < 23 | ["at0000"] = < 24 | text = <"most minimal">; 25 | description = <"most minimal"> 26 | > 27 | > 28 | > 29 | > 30 | constraint_definitions = < 31 | ["en"] = < 32 | items = < 33 | ["ac0000"] = < 34 | description = <"An anatomical structure with qualifiers"> 35 | text = <"Any term that describes a body site"> 36 | > 37 | > 38 | > 39 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ENTRY.attribute_name.v3: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.attribute_name.v3 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | POINT_EVENT[at0000] matches { 12 | offset matches { * 13 | } 14 | } 15 | 16 | ontology 17 | term_definitions = < 18 | ["en"] = < 19 | items = < 20 | ["at0000"] = < 21 | text = <"most minimal">; 22 | description = <"most minimal"> 23 | > 24 | > 25 | > 26 | > 27 | constraint_definitions = < 28 | ["en"] = < 29 | items = < 30 | ["ac0000"] = < 31 | description = <"An anatomical structure with qualifiers"> 32 | text = <"Any term that describes a body site"> 33 | > 34 | > 35 | > 36 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ENTRY.code_constraint.v1: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ENTRY.code_constraint.v1 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | DV_CODED_TEXT matches { 12 | defining_code matches {[ac0000]} -- Any term that describes a body site 13 | } 14 | 15 | ontology 16 | term_definitions = < 17 | ["en"] = < 18 | items = < 19 | ["at0002"] = < 20 | text = <"most minimal">; 21 | description = <"most minimal"> 22 | > 23 | > 24 | > 25 | > 26 | constraint_definitions = < 27 | ["en"] = < 28 | items = < 29 | ["ac0000"] = < 30 | description = <"An anatomical structure with qualifiers"> 31 | text = <"Any term that describes a body site"> 32 | > 33 | > 34 | > 35 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ENTRY.code_constraint.v2: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ENTRY.code_constraint.v2 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | DV_CODED_TEXT matches { 12 | defining_code matches {[ac0000]} -- Any term that describes a body site 13 | } 14 | 15 | ontology 16 | term_definitions = < 17 | ["en"] = < 18 | items = < 19 | ["at0002"] = < 20 | text = <"most minimal">; 21 | description = <"most minimal"> 22 | > 23 | > 24 | > 25 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ENTRY.definition_code.v1: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.definition_code.v1 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ELEMENT[at0000] matches { -- Diagnosis 12 | value matches { 13 | DV_CODED_TEXT matches { 14 | defining_code matches {[ac0000]} -- Any term that 'is_a' diagnosis 15 | } 16 | } 17 | } 18 | 19 | ontology 20 | term_definitions = < 21 | ["en"] = < 22 | items = < 23 | ["at0000"] = < 24 | text = <"most minimal">; 25 | description = <"most minimal"> 26 | > 27 | > 28 | > 29 | > 30 | constraint_definitions = < 31 | ["en"] = < 32 | items = < 33 | ["ac0000"] = < 34 | description = <"An anatomical structure with qualifiers"> 35 | text = <"Any term that describes a body site"> 36 | > 37 | > 38 | > 39 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ENTRY.definition_typename.v1: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ENTRY.definition_typename.v1 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ELEMENT[at0000] matches {*} 12 | 13 | ontology 14 | term_definitions = < 15 | ["en"] = < 16 | items = < 17 | ["at0000"] = < 18 | text = <"most minimal">; 19 | description = <"most minimal"> 20 | > 21 | > 22 | > 23 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ENTRY.definition_typename.v2: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ELEMENT.definition_typename.v2 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ELEMENT[at0000] matches {*} 12 | 13 | ontology 14 | term_definitions = < 15 | ["en"] = < 16 | items = < 17 | ["at0000"] = < 18 | text = <"most minimal">; 19 | description = <"most minimal"> 20 | > 21 | > 22 | > 23 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ENTRY.definition_typename.v3: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-PARTY_PROXY.definition_typename.v1 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | PARTY_PROXY[at0000] matches {*} 12 | 13 | ontology 14 | term_definitions = < 15 | ["en"] = < 16 | items = < 17 | ["at0000"] = < 18 | text = <"most minimal">; 19 | description = <"most minimal"> 20 | > 21 | > 22 | > 23 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ENTRY.ontology-specialisation.v1.adl: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ENTRY.ontology-specialisation.v1 3 | 4 | concept 5 | [at0000] -- 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ELEMENT[at0000] matches { -- Diagnosis 12 | value matches { 13 | DV_CODED_TEXT matches { 14 | defining_code matches {[ac0000]} -- Any term that 'is_a' diagnosis 15 | } 16 | } 17 | } 18 | 19 | ontology 20 | term_definitions = < 21 | ["en"] = < 22 | items = < 23 | ["at0000"] = < 24 | text = <"most minimal">; 25 | description = <"most minimal"> 26 | > 27 | > 28 | > 29 | > 30 | constraint_definitions = < 31 | ["en"] = < 32 | items = < 33 | ["ac0000"] = < 34 | description = <"An anatomical structure with qualifiers"> 35 | text = <"Any term that describes a body site"> 36 | > 37 | > 38 | > 39 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ENTRY.ontology_translation.v1: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ENTRY.ontology_translation.v1 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | DV_CODED_TEXT matches { 12 | defining_code matches {[ac0000]} 13 | } 14 | 15 | ontology 16 | term_definitions = < 17 | ["en"] = < 18 | items = < 19 | ["at0000"] = < 20 | text = <"most minimal">; 21 | description = <"most minimal"> 22 | > 23 | > 24 | > 25 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ENTRY.term_definition.v1: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ENTRY.term_definition.v1 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ENTRY[at0001] matches {*} 12 | 13 | ontology 14 | term_definitions = < 15 | ["en"] = < 16 | items = < 17 | > 18 | > 19 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ENTRY.term_definition.v2: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ENTRY.term_definition.v2 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ENTRY[at0000] matches {*} 12 | 13 | ontology 14 | term_definitions = < 15 | ["en"] = < 16 | items = < 17 | ["at0000"] = < 18 | text = <"most minimal">; 19 | description = <"most minimal"> 20 | > 21 | > 22 | > 23 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ENTRY.term_definition.v3: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ENTRY.missing_term_definition.v3 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ENTRY[at0000] matches {*} 12 | 13 | ontology 14 | term_definitions = < 15 | ["de"] = < 16 | items = < 17 | ["at0000"] = < 18 | text = <"most minimal">; 19 | description = <"most minimal"> 20 | > 21 | > 22 | > 23 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ENTRY.term_definition.v4: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ENTRY.missing_term_definition.v4 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | translations = < 10 | ["de"] = < 11 | language = <[ISO_639-1::de]> 12 | author = < 13 | ["organisation"] = <"Central Queensland University, University of Heidelberg"> 14 | ["name"] = <"Sebastian Garde, Jasmin Buck"> 15 | > 16 | > 17 | > 18 | 19 | definition 20 | ENTRY[at0000] matches {*} 21 | 22 | ontology 23 | term_definitions = < 24 | ["en"] = < 25 | items = < 26 | ["at0000"] = < 27 | text = <"most minimal">; 28 | description = <"most minimal"> 29 | > 30 | > 31 | > 32 | ["de"] = < 33 | items = < 34 | > 35 | > 36 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ENTRY.term_definition.v5: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ENTRY.term_definition.v5 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | description 10 | original_author = < 11 | ["name"] = <"test"> 12 | > 13 | lifecycle_state = <"published"> 14 | details = < 15 | ["en"] = < 16 | language = <[ISO_639-1::en]> 17 | purpose = <"test"> 18 | use = <"test"> 19 | misuse = <"test"> 20 | > 21 | ["de"] = < 22 | language = <[ISO_639-1::de]> 23 | purpose = <"test"> 24 | use = <"test"> 25 | misuse = <"test"> 26 | > 27 | ["en"] = < 28 | language = <[ISO_639-1::en]> 29 | purpose = <"test"> 30 | use = <"test"> 31 | misuse = <"test"> 32 | > 33 | > 34 | definition 35 | ENTRY[at0001] matches {*} 36 | 37 | ontology 38 | term_definitions = < 39 | ["en"] = < 40 | items = < 41 | > 42 | > 43 | ["de"] = < 44 | items = < 45 | > 46 | > 47 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ENTRY.term_definition.v6: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ENTRY.term_definition.v5 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | description 10 | original_author = < 11 | ["name"] = <"test"> 12 | > 13 | lifecycle_state = <"published"> 14 | details = < 15 | ["en"] = < 16 | language = <[ISO_639-1::en]> 17 | purpose = <"test"> 18 | use = <"test"> 19 | misuse = <"test"> 20 | > 21 | ["de"] = < 22 | language = <[ISO_639-1::de]> 23 | purpose = <"test"> 24 | use = <"test"> 25 | misuse = <"test"> 26 | > 27 | > 28 | definition 29 | ENTRY[at0001] matches {*} 30 | 31 | ontology 32 | term_definitions = < 33 | ["en"] = < 34 | items = < 35 | > 36 | > 37 | ["de"] = < 38 | items = < 39 | > 40 | > 41 | ["en"] = < 42 | items = < 43 | > 44 | > 45 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ITEM_TREE.attribute_cardinality.v1: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-ITEM_TREE.attribute_cardinality.v1 3 | 4 | concept 5 | [at0000] -- cardinality test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ITEM_TREE[at0000] matches { -- most minimal 12 | items cardinality matches {0..1; ordered} matches { 13 | allow_archetype CLUSTER[at0001] occurrences matches {0..*} matches { -- Device 14 | include 15 | archetype_id/value matches {/openEHR-EHR-CLUSTER\.device\.v1/} 16 | } 17 | } 18 | } 19 | 20 | 21 | ontology 22 | term_definitions = < 23 | ["en"] = < 24 | items = < 25 | ["at0000"] = < 26 | text = <"cardinality test">; 27 | description = <"most minimal cardinality test"> 28 | > 29 | ["at0001"] = < 30 | text = <"cluster with wrong cardinality for occurences">; 31 | description = <"most minimal cardinality test cluster"> 32 | > 33 | > 34 | > 35 | > 36 | -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-ITEM_TREE.attribute_cardinality.v3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openEHR/java-libs/214a1704abadc42034ff01a52961c872080433b8/archetype-validator/src/test/resources/adl-test-ITEM_TREE.attribute_cardinality.v3 -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/adl-test-PARTY_PROXY.type_name.v1: -------------------------------------------------------------------------------- 1 | archetype 2 | adl-test-PARTY_PROXY.type_name.v1 3 | 4 | concept 5 | [at0000] -- empty definition test 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | PARTY_PROXY[at0000] matches { -- most minimal 12 | * 13 | } 14 | 15 | ontology 16 | term_definitions = < 17 | ["en"] = < 18 | items = < 19 | ["at0000"] = < 20 | text = <"most minimal">; 21 | description = <"most minimal"> 22 | > 23 | > 24 | > 25 | > -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/openEHR-EHR-EVALUATION.adverse.v1.adl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openEHR/java-libs/214a1704abadc42034ff01a52961c872080433b8/archetype-validator/src/test/resources/openEHR-EHR-EVALUATION.adverse.v1.adl -------------------------------------------------------------------------------- /archetype-validator/src/test/resources/openEHR-EHR-EVALUATION.problem-diagnosis.v1.adl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openEHR/java-libs/214a1704abadc42034ff01a52961c872080433b8/archetype-validator/src/test/resources/openEHR-EHR-EVALUATION.problem-diagnosis.v1.adl -------------------------------------------------------------------------------- /dadl-binding/src/test/java/org/openehr/rm/binding/DuplicatedCodesTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.rm.binding; 2 | 3 | import org.openehr.am.parser.ContentObject; 4 | import org.openehr.am.parser.DADLParser; 5 | 6 | public class DuplicatedCodesTest extends DADLBindingTestBase { 7 | 8 | public void testDuplicatedCodesInMap() throws Exception { 9 | DADLParser parser = new DADLParser(fromClasspath("duplicated_codes.dadl")); 10 | ContentObject contentObj = parser.parse(); 11 | 12 | System.out.println(""); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /dadl-binding/src/test/java/org/openehr/rm/binding/LoadTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.rm.binding; 2 | 3 | import org.openehr.rm.composition.content.entry.Observation; 4 | 5 | public class LoadTest extends DADLBindingTestBase { 6 | 7 | public void testLoadHeight() throws Exception { 8 | rmObj = bind("observation2.dadl"); 9 | assertNotNull("rmObject null", rmObj); 10 | assertTrue("rmObject not Observation: " + rmObj.getClass().getName(), 11 | rmObj instanceof Observation); 12 | } 13 | 14 | public void testLoadBodyWegith() throws Exception { 15 | rmObj = bind("body_weight.dadl"); 16 | assertNotNull("rmObject null", rmObj); 17 | assertTrue("rmObject not Observation: " + rmObj.getClass().getName(), 18 | rmObj instanceof Observation); 19 | } 20 | 21 | public void testLoadDemographics() throws Exception { 22 | rmObj = bind("demographics.dadl"); 23 | assertNotNull("rmObject null", rmObj); 24 | assertTrue("rmObject not Observation: " + rmObj.getClass().getName(), 25 | rmObj instanceof Observation); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /dadl-binding/src/test/resources/archetyped.dadl: -------------------------------------------------------------------------------- 1 | < 2 | archetype_id = (ARCHETYPE_ID) < 3 | value = <"openEHR-EHR-OBSERVATION.blood_pressure.v1"> 4 | > 5 | rm_version = <"1.0.1"> 6 | > -------------------------------------------------------------------------------- /dadl-binding/src/test/resources/body_weight.dadl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openEHR/java-libs/214a1704abadc42034ff01a52961c872080433b8/dadl-binding/src/test/resources/body_weight.dadl -------------------------------------------------------------------------------- /dadl-binding/src/test/resources/code_phrase.dadl: -------------------------------------------------------------------------------- 1 | < 2 | terminology_id = (TERMINOLOGY_ID) < 3 | value = <"ISO_639-1"> 4 | > 5 | code_string = <"en"> 6 | > -------------------------------------------------------------------------------- /dadl-binding/src/test/resources/duplicated_codes.dadl: -------------------------------------------------------------------------------- 1 | ontology = (GUIDE_ONTOLOGY) < 2 | term_bindings = < 3 | codes = <"ddd",...> 4 | > 5 | > -------------------------------------------------------------------------------- /dadl-binding/src/test/resources/dv_coded_text.dadl: -------------------------------------------------------------------------------- 1 | < 2 | defining_code = < 3 | terminology_id = (TERMINOLOGY_ID) < 4 | value = <"ISO_639-1"> 5 | > 6 | code_string = <"en"> 7 | > 8 | value = <"sitting"> 9 | > -------------------------------------------------------------------------------- /dadl-binding/src/test/resources/dv_quantity.dadl: -------------------------------------------------------------------------------- 1 | < 2 | magnitude = <120.0> 3 | units = <"mmHg"> 4 | > -------------------------------------------------------------------------------- /dadl-binding/src/test/resources/dv_text.dadl: -------------------------------------------------------------------------------- 1 | < 2 | value = <"sitting"> 3 | > -------------------------------------------------------------------------------- /dadl-binding/src/test/resources/element.dadl: -------------------------------------------------------------------------------- 1 | < 2 | name = < 3 | value = <"systolic"> 4 | > 5 | archetype_node_id = <"at0004"> 6 | value = < 7 | magnitude = <120.0> 8 | units = <"mmHg"> 9 | > 10 | > -------------------------------------------------------------------------------- /dadl-binding/src/test/resources/element_with_text.dadl: -------------------------------------------------------------------------------- 1 | (ELEMENT) < 2 | name = < 3 | value = <"text"> 4 | > 5 | archetype_node_id = <"at0001"> 6 | value = < 7 | value = <"text value"> 8 | > 9 | > -------------------------------------------------------------------------------- /dadl-binding/src/test/resources/empty_element_with_null_flavour.dadl: -------------------------------------------------------------------------------- 1 | (ELEMENT) < 2 | name = < 3 | value = <"systolic"> 4 | > 5 | archetype_node_id = <"at0004"> 6 | null_flavour = < 7 | defining_code = < 8 | terminology_id = (TERMINOLOGY_ID) < 9 | value = <"openehr"> 10 | > 11 | code_string = <"271"> 12 | > 13 | value = <"no information"> 14 | > 15 | > -------------------------------------------------------------------------------- /dadl-binding/src/test/resources/empty_item_list.dadl: -------------------------------------------------------------------------------- 1 | < 2 | archetype_node_id = <"at0003"> 3 | name = < 4 | value = <"item list"> 5 | > 6 | items = (LIST) <> 7 | > -------------------------------------------------------------------------------- /dadl-binding/src/test/resources/item_list.dadl: -------------------------------------------------------------------------------- 1 | < 2 | archetype_node_id = <"at0003"> 3 | name = < 4 | value = <"item list"> 5 | > 6 | items = < 7 | [1] = < 8 | name = < 9 | value = <"systolic"> 10 | > 11 | archetype_node_id = <"at0004"> 12 | value = < 13 | magnitude = <120.0> 14 | units = <"mmHg"> 15 | > 16 | > 17 | [2] = < 18 | name = < 19 | value = <"diastolic"> 20 | > 21 | archetype_node_id = <"at0005"> 22 | value = < 23 | magnitude = <80.0> 24 | units = <"mmHg"> 25 | > 26 | > 27 | > 28 | > -------------------------------------------------------------------------------- /dadl-binding/src/test/resources/item_tree_bp2.dadl: -------------------------------------------------------------------------------- 1 | (ITEM_TREE) < 2 | archetype_node_id = <"at0003"> 3 | name = < 4 | value = <"item tree"> 5 | > 6 | items = < 7 | [1] = < 8 | name = < 9 | value = <"systolic"> 10 | > 11 | archetype_node_id = <"at0004"> 12 | value = < 13 | magnitude = <120.0> 14 | units = <"mmHg"> 15 | > 16 | > 17 | [2] = < 18 | name = < 19 | value = <"diastolic"> 20 | > 21 | archetype_node_id = <"at0005"> 22 | value = < 23 | magnitude = <80.0> 24 | units = <"mmHg"> 25 | > 26 | > 27 | > 28 | > -------------------------------------------------------------------------------- /dadl-binding/src/test/resources/lab_test.dadl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openEHR/java-libs/214a1704abadc42034ff01a52961c872080433b8/dadl-binding/src/test/resources/lab_test.dadl -------------------------------------------------------------------------------- /dadl-binding/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Set root logger level to DEBUG and its only appender to stdout. 2 | log4j.rootLogger=stdout 3 | 4 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 5 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 6 | log4j.appender.stdout.layout.ConversionPattern=%-5p %c %x - %m%n 7 | 8 | # package logging level 9 | log4j.logger.org.openehr.build=ERROR 10 | log4j.logger.org.openehr.binding=ERROR -------------------------------------------------------------------------------- /dadl-binding/src/test/resources/point_event.dadl: -------------------------------------------------------------------------------- 1 | (POINT_EVENT) < 2 | archetype_node_id = <"at0006"> 3 | data = (ITEM_LIST) < 4 | archetype_node_id = <"at0003"> 5 | items = < 6 | [1] = (ELEMENT) < 7 | archetype_node_id = <"at0004"> 8 | name = (DV_TEXT) < 9 | value = <"systolic"> 10 | > 11 | value = < 12 | magnitude = <120.0> 13 | units = <"mmHg"> 14 | > 15 | > 16 | [2] = (ELEMENT) < 17 | name = < 18 | value = <"diastolic"> 19 | > 20 | archetype_node_id = <"at0005"> 21 | value = < 22 | magnitude = <80.0> 23 | units = <"mmHg"> 24 | > 25 | > 26 | > 27 | name = < 28 | value = <"item list"> 29 | > 30 | > 31 | name = < 32 | value = <"sitting"> 33 | > 34 | time = <2005-12-03T09:22:00> 35 | > -------------------------------------------------------------------------------- /dadl-binding/src/test/resources/typed_archetype_id.dadl: -------------------------------------------------------------------------------- 1 | (ARCHETYPE_ID) < 2 | value = <"openEHR-EHR-OBSERVATION.blood_pressure.v1"> 3 | > -------------------------------------------------------------------------------- /dadl-binding/src/test/resources/typed_dv_boolean.dadl: -------------------------------------------------------------------------------- 1 | (DV_BOOLEAN) < 2 | value = <"true"> 3 | > -------------------------------------------------------------------------------- /dadl-binding/src/test/resources/typed_dv_ordinal.dadl: -------------------------------------------------------------------------------- 1 | (DV_ORDINAL) < 2 | symbol = (DV_CODED_TEXT) < 3 | defining_code = (CODE_PHRASE) < 4 | code_string = <"12345678"> 5 | terminology_id = (TERMINOLOGY_ID) < 6 | value = <"SNOMED-CT"> 7 | > 8 | > 9 | value = <"Sitting"> 10 | > 11 | value = <1> 12 | > -------------------------------------------------------------------------------- /dadl-binding/src/test/resources/typed_dv_quantity.dadl: -------------------------------------------------------------------------------- 1 | (DV_QUANTITY) < 2 | magnitude = <120.0> 3 | units = <"mmHg"> 4 | > -------------------------------------------------------------------------------- /dadl-binding/src/test/resources/typed_dv_quantity2.dadl: -------------------------------------------------------------------------------- 1 | (DV_QUANTITY) < 2 | accuracy = <0.0> 3 | magnitude = <120.0> 4 | precision = <1> 5 | units = <"mmHg"> 6 | > -------------------------------------------------------------------------------- /dadl-binding/src/test/resources/typed_dv_text.dadl: -------------------------------------------------------------------------------- 1 | (DV_TEXT) < 2 | value = <"sitting"> 3 | > -------------------------------------------------------------------------------- /dadl-binding/src/test/resources/typed_party_self.dadl: -------------------------------------------------------------------------------- 1 | (PARTY_SELF) <> -------------------------------------------------------------------------------- /dadl-binding/src/test/resources/typed_terminology_id.dadl: -------------------------------------------------------------------------------- 1 | (TERMINOLOGY_ID) < 2 | value = <"openehr"> 3 | > -------------------------------------------------------------------------------- /dadl-binding/src/test/resources/weight.dadl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openEHR/java-libs/214a1704abadc42034ff01a52961c872080433b8/dadl-binding/src/test/resources/weight.dadl -------------------------------------------------------------------------------- /dadl-parser/src/main/java/org/openehr/am/parser/BooleanValue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007,2008 Cambio Healthcare Systems AB, Sweden 3 | * All Rights Reserved. 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You may obtain a copy of the License at 16 | * http://www.gnu.org/licenses/gpl.txt 17 | * 18 | */ 19 | 20 | package org.openehr.am.parser; 21 | 22 | public class BooleanValue extends SimpleValue { 23 | public BooleanValue(Boolean value) { 24 | super(value); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /dadl-parser/src/main/java/org/openehr/am/parser/CharacterValue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007,2008 Cambio Healthcare Systems AB, Sweden 3 | * All Rights Reserved. 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You may obtain a copy of the License at 16 | * http://www.gnu.org/licenses/gpl.txt 17 | * 18 | */ 19 | 20 | package org.openehr.am.parser; 21 | 22 | public class CharacterValue extends SimpleValue { 23 | public CharacterValue(Character value) { 24 | super(value); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /dadl-parser/src/main/java/org/openehr/am/parser/CodeValue.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.parser; 2 | 3 | import org.openehr.rm.datatypes.text.CodePhrase; 4 | 5 | public class CodeValue extends SimpleValue { 6 | public CodeValue(CodePhrase code) { 7 | super(code); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dadl-parser/src/main/java/org/openehr/am/parser/ComplexObjectBlock.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007,2008 Cambio Healthcare Systems AB, Sweden 3 | * All Rights Reserved. 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You may obtain a copy of the License at 16 | * http://www.gnu.org/licenses/gpl.txt 17 | * 18 | */ 19 | 20 | package org.openehr.am.parser; 21 | 22 | public class ComplexObjectBlock extends ObjectBlock { 23 | public ComplexObjectBlock(String type) { 24 | super(type); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /dadl-parser/src/main/java/org/openehr/am/parser/IntegerValue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007,2008 Cambio Healthcare Systems AB, Sweden 3 | * All Rights Reserved. 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You may obtain a copy of the License at 16 | * http://www.gnu.org/licenses/gpl.txt 17 | * 18 | */ 19 | 20 | package org.openehr.am.parser; 21 | 22 | public class IntegerValue extends SimpleValue { 23 | public IntegerValue(Integer value) { 24 | super(value); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /dadl-parser/src/main/java/org/openehr/am/parser/RealValue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007,2008 Cambio Healthcare Systems AB, Sweden 3 | * All Rights Reserved. 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You may obtain a copy of the License at 16 | * http://www.gnu.org/licenses/gpl.txt 17 | * 18 | */ 19 | 20 | package org.openehr.am.parser; 21 | 22 | public class RealValue extends SimpleValue { 23 | public RealValue(Double value) { 24 | super(value); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /dadl-parser/src/main/java/org/openehr/am/parser/StringValue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007,2008 Cambio Healthcare Systems AB, Sweden 3 | * All Rights Reserved. 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You may obtain a copy of the License at 16 | * http://www.gnu.org/licenses/gpl.txt 17 | * 18 | */ 19 | 20 | package org.openehr.am.parser; 21 | 22 | public class StringValue extends SimpleValue { 23 | public StringValue(String value) { 24 | super(value); 25 | } 26 | } -------------------------------------------------------------------------------- /dadl-parser/src/main/java/org/openehr/am/parser/UriValue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007,2008 Cambio Healthcare Systems AB, Sweden 3 | * All Rights Reserved. 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You may obtain a copy of the License at 16 | * http://www.gnu.org/licenses/gpl.txt 17 | * 18 | */ 19 | 20 | package org.openehr.am.parser; 21 | 22 | import org.openehr.rm.datatypes.uri.DvURI; 23 | 24 | public class UriValue extends SimpleValue{ 25 | public UriValue(DvURI value) { 26 | super(value); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /dadl-parser/src/test/java/org/openehr/am/parser/ItemListTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.parser; 2 | 3 | public class ItemListTest extends ParserTestBase { 4 | 5 | public void testParseBlockWithEmptyAttrList() throws Exception { 6 | DADLParser parser = new DADLParser(loadFromClasspath( 7 | "state_item_list.dadl")); 8 | ContentObject obj = parser.parse(); 9 | 10 | AttributeValue av = obj.getAttributeValues().get(0); 11 | assertEquals("state", av.getId()); 12 | 13 | assertTrue(av.getValue() instanceof SingleAttributeObjectBlock); 14 | 15 | SingleAttributeObjectBlock saob = (SingleAttributeObjectBlock) av.getValue(); 16 | assertEquals(3, saob.getAttributeValues().size()); 17 | 18 | av = saob.getAttributeValues().get(2); 19 | assertEquals("items", av.getId()); 20 | 21 | ObjectBlock ob = av.getValue(); 22 | assertTrue(ob instanceof SingleAttributeObjectBlock); 23 | 24 | saob = (SingleAttributeObjectBlock) ob; 25 | assertTrue(saob.getAttributeValues().isEmpty()); 26 | } 27 | } -------------------------------------------------------------------------------- /dadl-parser/src/test/java/org/openehr/am/parser/StructureTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.parser; 2 | 3 | public class StructureTest extends ParserTestBase { 4 | 5 | public StructureTest(String test) { 6 | super(test); 7 | } 8 | 9 | public void testParseSimpleDADL() throws Exception { 10 | DADLParser parser = new DADLParser(loadFromClasspath( 11 | "blood_pressure_001.dadl")); 12 | parser.parse(); 13 | } 14 | 15 | public void testTypedObjectWithKeyedAttributes() throws Exception { 16 | DADLParser parser = new DADLParser(loadFromClasspath( 17 | "person_001.dadl")); 18 | parser.parse(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /dadl-parser/src/test/java/org/openehr/am/parser/TypedObjectBlockTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.parser; 2 | 3 | public class TypedObjectBlockTest extends ParserTestBase { 4 | 5 | public void testParseTypedDvQuantity() throws Exception { 6 | DADLParser parser = new DADLParser(loadFromClasspath("typed_dv_quantity.dadl")); 7 | ContentObject obj = parser.parse(); 8 | 9 | assertNotNull("contentObj null", obj); 10 | 11 | // message, expected, actual 12 | assertEquals("type identifier missing", "DV_QUANTITY", 13 | obj.getComplexObjectBlock().getTypeIdentifier()); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /dadl-parser/src/test/resources/empty_attr_list.dadl: -------------------------------------------------------------------------------- 1 | (DESTINATION_PROFILE) <> -------------------------------------------------------------------------------- /dadl-parser/src/test/resources/empty_attr_list_without_type.dadl: -------------------------------------------------------------------------------- 1 | <> -------------------------------------------------------------------------------- /dadl-parser/src/test/resources/keyed_objects.dadl: -------------------------------------------------------------------------------- 1 | items = < 2 | [1] = < 3 | name = <"systolic"> 4 | > 5 | [2] = < 6 | name = <"diastolic"> 7 | > 8 | > -------------------------------------------------------------------------------- /dadl-parser/src/test/resources/keyed_objects2.dadl: -------------------------------------------------------------------------------- 1 | items = < 2 | [[ISO_639-1::en]] = < 3 | name = <"systolic"> 4 | > 5 | [[ISO_639-1::es]] = < 6 | name = <"diastolic"> 7 | > 8 | > -------------------------------------------------------------------------------- /dadl-parser/src/test/resources/person_001.dadl: -------------------------------------------------------------------------------- 1 | (PERSON)< 2 | details = (ITEM_TREE)< 3 | archetype_node_id = <"at0001"> 4 | items = (List)< 5 | [1] = (ELEMENT)< 6 | archetype_node_id = <"at0002"> 7 | > 8 | [2] = (ELEMENT)< 9 | > 10 | [3] = (CLUSTER)< 11 | > 12 | > 13 | > 14 | > -------------------------------------------------------------------------------- /dadl-parser/src/test/resources/simple_values.dadl: -------------------------------------------------------------------------------- 1 | simple_values = < 2 | datetime_value = <2007-10-30T09:22:00> 3 | date_value = <2008-04-02> 4 | time_value = <11:09:40> 5 | duration_value = 6 | string_value = <"a string value"> 7 | character_value = <'a'> 8 | integer_value = <100> 9 | real_value = <9.5> 10 | boolean_value = 11 | code_value = <[ISO_639-1::en]> 12 | > -------------------------------------------------------------------------------- /dadl-parser/src/test/resources/simple_values_list.dadl: -------------------------------------------------------------------------------- 1 | simple_values = < 2 | datetime_value = <2007-10-30T09:22:00> 3 | date_value = <2008-04-02> 4 | time_value = <11:09:40> 5 | duration_value = 6 | string_value = <"a string value", "2nd string value", "3rd value"> 7 | character_value = <'a'> 8 | integer_value = <100> 9 | real_value = <9.5> 10 | boolean_value = 11 | code_value = <[ISO_639-1::en]> 12 | codes =<[SNOMEDCT::1111111], [SNOMEDCT::22222222], [SNOMEDCT::33333333]> 13 | > -------------------------------------------------------------------------------- /dadl-parser/src/test/resources/single_values_list.dadl: -------------------------------------------------------------------------------- 1 | single_values = < 2 | datetime = <2007-10-30T09:22:00,...> 3 | date = <2008-04-02,...> 4 | time = <11:09:40,...> 5 | duration = 6 | string = <"a string value",...> 7 | char = <'a',...> 8 | integer = <100,...> 9 | real = <9.5,...> 10 | boolean = 11 | code_phrase = <[ISO_639-1::en],...> 12 | > -------------------------------------------------------------------------------- /dadl-parser/src/test/resources/state_item_list.dadl: -------------------------------------------------------------------------------- 1 | state = (ITEM_LIST) < 2 | archetype_node_id = <"at0007"> 3 | name = < 4 | value = <"item list"> 5 | > 6 | items = <> 7 | > -------------------------------------------------------------------------------- /dadl-parser/src/test/resources/typed_dv_quantity.dadl: -------------------------------------------------------------------------------- 1 | (DV_QUANTITY) < 2 | magnitude = <120.0> 3 | units = <"mmHg"> 4 | > -------------------------------------------------------------------------------- /measure-serv/readme.txt: -------------------------------------------------------------------------------- 1 | A simple implementation of the openEHR meausrement service -------------------------------------------------------------------------------- /mini-termserv/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Set root logger level to DEBUG and its only appender to stdout. 2 | log4j.rootLogger=INFO, stdout 3 | 4 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 5 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 6 | log4j.appender.stdout.layout.ConversionPattern=%-5p %c %x - %m%n 7 | 8 | # logging level 9 | log4j.logger.org.openehr.terminology=DEBUG -------------------------------------------------------------------------------- /mini-termserv/src/test/java/org/openehr/terminology/TranslationDetailsTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.terminology; 2 | 3 | import java.util.*; 4 | 5 | import org.openehr.rm.common.resource.TranslationDetails; 6 | import org.openehr.rm.datatypes.text.CodePhrase; 7 | import org.openehr.rm.support.terminology.TerminologyService; 8 | 9 | import junit.framework.TestCase; 10 | 11 | public class TranslationDetailsTest extends TestCase { 12 | 13 | public void testCreateTranslationDetails() throws Exception { 14 | CodePhrase language = new CodePhrase("ISO_639-1", "en"); 15 | Map author = new HashMap(); 16 | author.put("rong", "openehr"); 17 | String accreditation = null; 18 | Map otherDetails = null; 19 | TerminologyService terminologyService = 20 | SimpleTerminologyService.getInstance(); 21 | TranslationDetails td = new TranslationDetails(language, 22 | author, accreditation, otherDetails, terminologyService); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /oet-parser/src/main/java/org/openehr/am/template/UnknownArchetypeException.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.template; 2 | 3 | /** 4 | * User: Iago.Corbal 5 | * Date: 2014-05-27 6 | * Time: 14:40 7 | */ 8 | public class UnknownArchetypeException extends FlatteningException { 9 | 10 | private String archetypeId; 11 | 12 | public UnknownArchetypeException(String archetypeId) { 13 | super("Unknown archetype: "+archetypeId); 14 | this.archetypeId = archetypeId; 15 | } 16 | 17 | public String getArchetypeId() { 18 | return archetypeId; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /oet-parser/src/main/java/org/openehr/am/template/UnknownTemplateException.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.template; 2 | 3 | /** 4 | * User: Iago.Corbal 5 | * Date: 2014-05-27 6 | * Time: 14:40 7 | */ 8 | public class UnknownTemplateException extends FlatteningException { 9 | 10 | private String templateId; 11 | 12 | public UnknownTemplateException(String templateId) { 13 | super("Unknown template: "+templateId); 14 | this.templateId = templateId; 15 | } 16 | 17 | public String getTemplateId() { 18 | return templateId; 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /oet-parser/src/main/xsd/CharacterMapping.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /oet-parser/src/test/java/org/openehr/am/template/ActionDescriptionTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.template; 2 | 3 | import org.openehr.am.archetype.constraintmodel.ArchetypeConstraint; 4 | 5 | public class ActionDescriptionTest extends TemplateTestBase { 6 | 7 | /** 8 | * Verify flattened section with a single evaluation 9 | * 10 | * @throws Exception 11 | */ 12 | public void testActionDescriptionSlotFilling() throws Exception { 13 | flattenTemplate("test_action_description.oet"); 14 | 15 | // section level 16 | ac = flattened.node("/description[openEHR-EHR-ITEM_TREE.medication.v1]"); 17 | assertItemTreeConstraint(ac); 18 | } 19 | 20 | private ArchetypeConstraint ac; 21 | } 22 | -------------------------------------------------------------------------------- /oet-parser/src/test/java/org/openehr/am/template/AnnotationTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.template; 2 | 3 | import org.openehr.am.archetype.constraintmodel.ArchetypeConstraint; 4 | 5 | public class AnnotationTest extends TemplateTestBase { 6 | 7 | public void testSingleSectionWithName() throws Exception { 8 | flattenTemplate("test_annotation.oet"); 9 | 10 | ArchetypeConstraint ac = flattened.node("/items[at0001]"); 11 | assertEquals("status", ac.getAnnotation()); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /oet-parser/src/test/java/org/openehr/am/template/PathMapTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.template; 2 | 3 | public class PathMapTest extends TemplateTestBase { 4 | 5 | public void tearDown() { 6 | map = null; 7 | } 8 | 9 | public void testCreateNewAndWriteToFile() throws Exception { 10 | map = new PathMap(); 11 | map.addPath("key1", "path1"); 12 | map.addPath("key2", "path2"); 13 | map.addPath("key2", "path2"); 14 | map.writeToFile("test_paths.txt"); 15 | } 16 | 17 | public void testLoadPathMapAndGetPath() throws Exception { 18 | map= PathMap.load(fromClasspath("test_path_map.txt")); 19 | 20 | assertEquals("unexpected total paths", 2, 21 | map.countPaths()); 22 | 23 | assertEquals("/path1", map.getPath("key1")); 24 | assertEquals("/path2[at0001 and name/value='text']", map.getPath("key2")); 25 | } 26 | 27 | private PathMap map; 28 | } 29 | -------------------------------------------------------------------------------- /oet-parser/src/test/java/org/openehr/am/template/SetConstraintOnNamedNodeWithoutNameTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.template; 2 | 3 | public class SetConstraintOnNamedNodeWithoutNameTest extends TemplateTestBase { 4 | 5 | public void setUp() throws Exception { 6 | super.setUp(); 7 | } 8 | 9 | /* 10 | * Test to set a constraint on named node, at0002 in this case, 11 | * without using the actual name in the following rule 12 | * 13 | * 14 | */ 15 | public void testSeNodeOccurrencesAndNameConstraint() throws Exception { 16 | flattenTemplate("test_set_named_node_constraint_without_name.oet"); 17 | 18 | path = "/items[openEHR-EHR-EVALUATION.review_of_procedures.v1]/" + 19 | "data[at0001]/items[at0002 and name/value='named']/items[at0005]"; 20 | 21 | assertRequired(path); 22 | } 23 | 24 | private String path; 25 | } 26 | -------------------------------------------------------------------------------- /oet-parser/src/test/java/org/openehr/am/template/SetMultipleEvaluationNameTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.template; 2 | 3 | import org.openehr.am.archetype.constraintmodel.*; 4 | 5 | public class SetMultipleEvaluationNameTest extends TemplateTestBase { 6 | 7 | public void setUp() throws Exception { 8 | super.setUp(); 9 | } 10 | 11 | public void testTopNodeNameConstraint() throws Exception { 12 | flattenTemplate("test_set_multiple_evaluation_name.oet"); 13 | 14 | String path = "/items[openEHR-EHR-EVALUATION.review_of_procedures.v1" + 15 | " and name/value='eval_1']/name/value"; 16 | 17 | // name attribute 18 | ArchetypeConstraint nameConstraint = flattened.node(path); 19 | assertCStringWithSingleValue(nameConstraint, "eval_1"); 20 | 21 | path = "/items[openEHR-EHR-EVALUATION.review_of_procedures.v1" + 22 | " and name/value='eval_2']/name/value"; 23 | 24 | nameConstraint = flattened.node(path); 25 | assertCStringWithSingleValue(nameConstraint, "eval_2"); 26 | 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /oet-parser/src/test/java/org/openehr/am/template/SetNestedEvaluationNameTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.template; 2 | 3 | import org.openehr.am.archetype.constraintmodel.*; 4 | 5 | public class SetNestedEvaluationNameTest extends TemplateTestBase { 6 | 7 | public void setUp() throws Exception { 8 | super.setUp(); 9 | } 10 | 11 | public void testTopNodeNameConstraint() throws Exception { 12 | flattenTemplate("test_set_evaluation_name.oet"); 13 | 14 | String path = "/items[openEHR-EHR-EVALUATION.review_of_procedures.v1" + 15 | " and name/value='eval']/name/value"; 16 | 17 | // name attribute 18 | ArchetypeConstraint nameConstraint = flattened.node(path); 19 | this.assertCStringWithSingleValue(nameConstraint, "eval"); 20 | } 21 | 22 | private String path; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /oet-parser/src/test/java/org/openehr/am/template/SetOccurrencesAndNameTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.template; 2 | 3 | public class SetOccurrencesAndNameTest extends TemplateTestBase { 4 | 5 | /* 6 | * Setting leaf-level node name doesn't involving copying nodes 7 | */ 8 | public void testSeNodeOccurrencesAndNameConstraint() throws Exception { 9 | flattenTemplate("test_set_occurrences_and_name.oet"); 10 | 11 | String path = "/description[openEHR-EHR-ITEM_TREE.medication.v1]/"; 12 | 13 | assertNotAllowed(path + "items[at0003]"); 14 | assertNotAllowed(path + "items[at0004]"); 15 | 16 | path += "items[at0033 and name/value='dos']/items[at0035]"; 17 | 18 | assertRequired(path); 19 | assertNotAllowed(path + "/items[at0036]"); 20 | assertRequired(path + "/items[at0037]"); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /oet-parser/src/test/java/org/openehr/am/template/UTF8EncodingTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.template; 2 | 3 | import java.nio.charset.Charset; 4 | 5 | import org.openehr.am.archetype.constraintmodel.ArchetypeConstraint; 6 | import org.openehr.am.archetype.constraintmodel.primitive.CString; 7 | 8 | public class UTF8EncodingTest extends TemplateTestBase { 9 | 10 | public void setUp() throws Exception { 11 | super.setUp(); 12 | 13 | archetype = loadArchetype( 14 | "openEHR-EHR-ITEM_TREE.medication_test_one.v1.adl"); 15 | } 16 | 17 | public void testSwedishSpecialChars() throws Exception { 18 | flattenTemplate("test_utf8_encoding.oet"); 19 | 20 | constraint = flattened.node("/data[at0001]/items[at0002]/" + 21 | "items[at0003]/value/value"); 22 | 23 | CString cs = assertCString(constraint); 24 | 25 | // compare to string value "åäö" in unicode 26 | assertCStringWithDefaultValue(constraint, "\u00e5\u00e4\u00f6"); 27 | } 28 | 29 | private ArchetypeConstraint constraint; 30 | } 31 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/archetypes/openEHR-EHR-COMPOSITION.test.v1.adl: -------------------------------------------------------------------------------- 1 | archetype (adl_version=1.4) 2 | openEHR-EHR-COMPOSITION.test.v1 3 | 4 | concept 5 | [at0000] -- test 6 | language 7 | original_language = <[ISO_639-1::en]> 8 | 9 | definition 10 | COMPOSITION[at0000] matches { -- template test 11 | content cardinality matches {0..*; unordered} matches { 12 | allow_archetype SECTION matches { 13 | include 14 | archetype_id/value matches {/medications\.v1/} 15 | exclude 16 | archetype_id/value matches {/.*/} 17 | } 18 | } 19 | } 20 | 21 | ontology 22 | term_definitions = < 23 | ["en"] = < 24 | items = < 25 | ["at0000"] = < 26 | text = <"test"> 27 | description = <"test"> 28 | > 29 | > 30 | > 31 | > 32 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/archetypes/openEHR-EHR-ITEM_TREE.medication_multiple_constraint_expected.v1.adl: -------------------------------------------------------------------------------- 1 | archetype (adl_version=1.4) 2 | openEHR-EHR-ITEM_TREE.medication_multiple_constraint_expected.v1 3 | 4 | concept 5 | [at0000] -- Medication description 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ITEM_TREE[at0000] occurrences matches {0..*} matches { 12 | items cardinality matches {0..*; ordered} matches { 13 | ELEMENT[at0001] matches { -- Name of medication 14 | value matches { 15 | DV_COUNT matches { 16 | magnitude matches {|>=1|} 17 | } 18 | } 19 | } 20 | } 21 | } 22 | 23 | ontology 24 | term_definitions = < 25 | ["en"] = < 26 | items = < 27 | ["at0000"] = < 28 | text = <"Medication description"> 29 | description = <"The description of a medication"> 30 | > 31 | > 32 | > 33 | > -------------------------------------------------------------------------------- /oet-parser/src/test/resources/archetypes/openEHR-EHR-ITEM_TREE.medication_multiple_constraint_test2.v1.adl: -------------------------------------------------------------------------------- 1 | archetype (adl_version=1.4) 2 | openEHR-EHR-ITEM_TREE.medication_multiple_constraint_test2.v1 3 | 4 | concept 5 | [at0000] -- Medication description 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ITEM_TREE[at0000] occurrences matches {0..*} matches { 12 | items cardinality matches {0..*; ordered} matches { 13 | ELEMENT[at0001] occurrences matches {0..*} matches {*} 14 | } 15 | } 16 | 17 | ontology 18 | term_definitions = < 19 | ["en"] = < 20 | items = < 21 | ["at0000"] = < 22 | text = <"Medication description"> 23 | description = <"The description of a medication"> 24 | > 25 | > 26 | > 27 | > -------------------------------------------------------------------------------- /oet-parser/src/test/resources/archetypes/openEHR-EHR-ITEM_TREE.medication_quantity_test.v1.adl: -------------------------------------------------------------------------------- 1 | archetype (adl_version=1.4) 2 | openEHR-EHR-ITEM_TREE.medication_quantity_test.v1 3 | 4 | concept 5 | [at0000] -- Medication description 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ITEM_TREE[at0000] occurrences matches {0..*} matches { 12 | items cardinality matches {0..*; ordered} matches { 13 | ELEMENT[at0001] occurrences matches {0..*} matches {*} 14 | } 15 | } 16 | 17 | ontology 18 | term_definitions = < 19 | ["en"] = < 20 | items = < 21 | ["at0000"] = < 22 | text = <"Medication description"> 23 | description = <"The description of a medication"> 24 | > 25 | ["at0001"] = < 26 | text = <"Result"> 27 | description = <"The description of a medication"> 28 | > 29 | > 30 | > 31 | > -------------------------------------------------------------------------------- /oet-parser/src/test/resources/archetypes/openEHR-EHR-ITEM_TREE.medication_test_one.v1.adl: -------------------------------------------------------------------------------- 1 | archetype (adl_version=1.4) 2 | openEHR-EHR-ITEM_TREE.medication_test_one.v1 3 | 4 | concept 5 | [at0000] -- Medication description 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ITEM_TREE[at0000] occurrences matches {0..*} matches { 12 | items cardinality matches {0..*; ordered} matches { 13 | ELEMENT[at0001] matches { -- Name of medication 14 | value matches { 15 | DV_TEXT matches {*} 16 | } 17 | } 18 | } 19 | } 20 | 21 | ontology 22 | term_definitions = < 23 | ["en"] = < 24 | items = < 25 | ["at0000"] = < 26 | text = <"Medication description"> 27 | description = <"The description of a medication"> 28 | > 29 | > 30 | > 31 | > -------------------------------------------------------------------------------- /oet-parser/src/test/resources/archetypes/openEHR-EHR-ITEM_TREE.medication_test_one.v2.adl: -------------------------------------------------------------------------------- 1 | archetype (adl_version=1.4) 2 | openEHR-EHR-ITEM_TREE.medication_test_one.v2 3 | 4 | concept 5 | [at0000] -- Medication description 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ITEM_TREE[at0000] occurrences matches {0..*} matches { 12 | items cardinality matches {0..*; ordered} matches { 13 | ELEMENT[at0001] matches { -- Name of medication 14 | value matches { 15 | DV_TEXT matches {*} 16 | DV_URI matches {*} 17 | } 18 | } 19 | } 20 | } 21 | 22 | ontology 23 | term_definitions = < 24 | ["en"] = < 25 | items = < 26 | ["at0000"] = < 27 | text = <"Medication description"> 28 | description = <"The description of a medication"> 29 | > 30 | > 31 | > 32 | > -------------------------------------------------------------------------------- /oet-parser/src/test/resources/archetypes/openEHR-EHR-ITEM_TREE.medication_test_text_default.v1.adl: -------------------------------------------------------------------------------- 1 | archetype (adl_version=1.4) 2 | openEHR-EHR-ITEM_TREE.medication_test_one.v1 3 | 4 | concept 5 | [at0000] -- Medication description 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ITEM_TREE[at0000] occurrences matches {0..*} matches { 12 | items cardinality matches {0..*; ordered} matches { 13 | ELEMENT[at0001] matches { -- Name of medication 14 | value matches { "Ipren"} 15 | } 16 | } 17 | } 18 | 19 | ontology 20 | term_definitions = < 21 | ["en"] = < 22 | items = < 23 | ["at0000"] = < 24 | text = <"Medication description"> 25 | description = <"The description of a medication"> 26 | > 27 | > 28 | > 29 | > -------------------------------------------------------------------------------- /oet-parser/src/test/resources/archetypes/openEHR-EHR-ITEM_TREE.medication_test_text_name.v1.adl: -------------------------------------------------------------------------------- 1 | archetype (adl_version=1.4) 2 | openEHR-EHR-ITEM_TREE.medication_test_one.v1 3 | 4 | concept 5 | [at0000] -- Medication description 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ITEM_TREE[at0000] occurrences matches {0..*} matches { 12 | items cardinality matches {0..*; ordered} matches { 13 | ELEMENT[at0001] matches { -- Name of medication 14 | value matches { 15 | DV_TEXT matches {*} 16 | } 17 | name matches { "Drug Name"} 18 | } 19 | } 20 | } 21 | 22 | ontology 23 | term_definitions = < 24 | ["en"] = < 25 | items = < 26 | ["at0000"] = < 27 | text = <"Medication description"> 28 | description = <"The description of a medication"> 29 | > 30 | > 31 | > 32 | > -------------------------------------------------------------------------------- /oet-parser/src/test/resources/archetypes/openEHR-EHR-ITEM_TREE.medication_test_three.v1.adl: -------------------------------------------------------------------------------- 1 | archetype (adl_version=1.4) 2 | openEHR-EHR-ITEM_TREE.medication_test_three.v1 3 | 4 | concept 5 | [at0000] -- Medication description 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ITEM_TREE[at0000] matches { 12 | items cardinality matches {0..*; ordered} matches { 13 | ELEMENT[at0001] occurrences matches {0..*} matches { -- Name of medication 14 | value matches { 15 | DV_TEXT matches {*} 16 | } 17 | } 18 | } 19 | } 20 | 21 | ontology 22 | term_definitions = < 23 | ["en"] = < 24 | items = < 25 | ["at0000"] = < 26 | text = <"Medication description"> 27 | description = <"The description of a medication"> 28 | > 29 | > 30 | > 31 | > -------------------------------------------------------------------------------- /oet-parser/src/test/resources/archetypes/openEHR-EHR-ITEM_TREE.medication_test_two.v1.adl: -------------------------------------------------------------------------------- 1 | archetype (adl_version=1.4) 2 | openEHR-EHR-ITEM_TREE.medication_test_two.v1 3 | 4 | concept 5 | [at0000] -- Medication description 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ITEM_TREE[at0000] occurrences matches {0..*} matches { 12 | items cardinality matches {0..*; ordered} matches { 13 | ELEMENT[at0001] matches { -- Name of medication 14 | value matches { 15 | DV_CODED_TEXT matches {*} 16 | } 17 | } 18 | } 19 | } 20 | 21 | ontology 22 | term_definitions = < 23 | ["en"] = < 24 | items = < 25 | ["at0000"] = < 26 | text = <"Medication description"> 27 | description = <"The description of a medication"> 28 | > 29 | > 30 | > 31 | > -------------------------------------------------------------------------------- /oet-parser/src/test/resources/archetypes/openEHR-EHR-SECTION.ad_hoc_heading.v1.adl: -------------------------------------------------------------------------------- 1 | archetype (adl_version=1.4) 2 | openEHR-EHR-SECTION.ad_hoc_heading.v1 3 | 4 | concept 5 | [at0000] -- Heading 6 | language 7 | original_language = <[ISO_639-1::en]> 8 | description 9 | original_author = < 10 | ["name"] = <""> 11 | > 12 | details = < 13 | ["en"] = < 14 | language = <[ISO_639-1::en]> 15 | purpose = <"ad hoc heading"> 16 | use = <""> 17 | misuse = <""> 18 | > 19 | > 20 | lifecycle_state = <"0"> 21 | other_contributors = <> 22 | other_details = < 23 | ["references"] = <""> 24 | ["MD5-CAM-1.0.1"] = <"6211E600D00A019604319C19B8303CF6"> 25 | > 26 | 27 | definition 28 | SECTION[at0000] matches {*} 29 | 30 | ontology 31 | term_definitions = < 32 | ["en"] = < 33 | items = < 34 | ["at0000"] = < 35 | text = <"Heading"> 36 | description = <"An ad-hoc heading"> 37 | > 38 | > 39 | > 40 | > 41 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Set root logger level to ERROR and its only appender to stdout. 2 | log4j.rootLogger=ERROR, stdout 3 | 4 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 5 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 6 | log4j.appender.stdout.layout.ConversionPattern=%-5p %c %x - %m%n 7 | 8 | # logging level 9 | log4j.logger.org.openehr.am.template.Flattener= 10 | log4j.logger.org.openehr.am.template.TermMap= 11 | log4j.logger.org.openehr.am.template.PathMap= -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/prescription.oet: -------------------------------------------------------------------------------- 1 | 2 | 13 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_action_description.oet: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_annotation.oet: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_composition.oet: -------------------------------------------------------------------------------- 1 | 2 | 10 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_composition2.oet: -------------------------------------------------------------------------------- 1 | 2 | 10 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_composition3.oet: -------------------------------------------------------------------------------- 1 | 2 | 12 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_composition4.oet: -------------------------------------------------------------------------------- 1 | 2 | 10 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_composition5.oet: -------------------------------------------------------------------------------- 1 | 2 | 13 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_default_coded_name.oet: -------------------------------------------------------------------------------- 1 | 2 | 9 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_default_coded_text.oet: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_default_text.oet: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_hybrid_path.oet: -------------------------------------------------------------------------------- 1 |  2 | 13 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_max_value.oet: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_min_value.oet: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_more_nested_section.oet: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_multiple_constraint.oet: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_multiple_constraint2.oet: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_multiple_constraint3.oet: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_name_default_coded_text.oet: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_named_path.oet: -------------------------------------------------------------------------------- 1 | 2 | 9 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_named_path2.oet: -------------------------------------------------------------------------------- 1 | 2 | 10 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_named_path3.oet: -------------------------------------------------------------------------------- 1 | 2 | 10 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_nested_section.oet: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_nested_section_evaluation.oet: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_quantity_constraint_excluded_units.oet: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_quantity_constraint_included_units.oet: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_quantity_constraint_included_units2.oet: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_quantity_constraint_included_units3.oet: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_quantity_constraint_magnitude.oet: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_quantity_constraint_precision.oet: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_section_evaluation.oet: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_section_evaluation2.oet: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_section_instruction.oet: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_section_instruction_tree.oet: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_set_cardinality_with_prohibited_node.oet: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_set_cardinality_with_prohibited_node3.oet: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_set_evaluation_name.oet: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_set_evaluation_name_.oet: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_set_multiple_evaluation_name.oet: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_set_named_node_constraint_without_name.oet: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_set_occurrences_without_min.oet: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_set_occurrences_without_min2.oet: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_simple_section.oet: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_text_constraints.oet: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_text_name.oet: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/templates/test_utf8_encoding.oet: -------------------------------------------------------------------------------- 1 | 2 | 9 | -------------------------------------------------------------------------------- /oet-parser/src/test/resources/terms.txt: -------------------------------------------------------------------------------- 1 | ATC::C07AA03::Pindolol 2 | ATC::C07AA05::Propranolol 3 | ATC::C07AA06::Timolol 4 | ATC::C07AA07::Sotalol 5 | ATC::C07AA28::Karvedilol 6 | SNOMED-CT::10018::Loopdiuretika 7 | SNOMED-CT::10019::Thiazider -------------------------------------------------------------------------------- /oet-parser/src/test/resources/terms_path.txt: -------------------------------------------------------------------------------- 1 | ATC::C07AA03::Pindolol::/path1 2 | ATC::C07AA05::Propranolol::/path1 3 | ATC::C07AA06::Timolol::/path1 4 | ATC::C07AA07::Sotalol::/path1 5 | ATC::C07AA28::Karvedilol::/path1 6 | SNOMED-CT::10018::Loopdiuretika::/path1 7 | SNOMED-CT::10019::Thiazider::/path1 -------------------------------------------------------------------------------- /oet-parser/src/test/resources/test_path_map.txt: -------------------------------------------------------------------------------- 1 | # some comment 2 | key1=/path1 3 | key2=/path2[at0001 and name/value='text'] -------------------------------------------------------------------------------- /openehr-aom/docs/changes.txt: -------------------------------------------------------------------------------- 1 | 2006/1/20 2 | .updated CDomainType to add default and assumed value 3 | .removed CCount and domain package 4 | 5 | 2006/1/09 6 | .take away unnecessary rmTypeName from CPrimitiveObject constructor 7 | 8 | 2006/1/07 9 | .Archetype extends AuthoredResource 10 | 11 | 2006/12/30 12 | .added parent attribute to CObject and its children 13 | .adjusted the constructor of CDomainType to support allowAny 14 | .removed obsolete CDomainType concrete classes in the AOM package 15 | 16 | 2006/12/16 17 | .added convenient factory methods in ExpressionLeaf 18 | .added STRING as constant type in ExpressionItem 19 | 20 | 2007/04/18 21 | .added class ArchetypeTerm 22 | .added constraintDefinition() and termDefinition() in ArchetypeOntology 23 | 24 | 2007/05/29 25 | .fixed a path related issue in CAttribute -------------------------------------------------------------------------------- /openehr-aom/src/test/java/org/openehr/am/archetype/ArchetypePathTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.archetype; 2 | 3 | public class ArchetypePathTest { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /openehr-aom/src/test/java/org/openehr/am/archetype/constraintmodel/CPrimitiveObjectTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.archetype.constraintmodel; 2 | 3 | import org.openehr.am.archetype.constraintmodel.primitive.CString; 4 | import org.openehr.rm.support.basic.Interval; 5 | 6 | import junit.framework.TestCase; 7 | 8 | public class CPrimitiveObjectTest extends TestCase { 9 | 10 | public void testConstructorWithItem() { 11 | Interval occurrences = new Interval(1, 1); 12 | CString item = new CString("file.*", null); 13 | new CPrimitiveObject("/path", occurrences, null, null, item); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /openehr-aom/src/test/java/org/openehr/am/archetype/ontology/ArchetypeTermTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.archetype.ontology; 2 | 3 | import junit.framework.TestCase; 4 | 5 | public class ArchetypeTermTest extends TestCase { 6 | 7 | public void setUp() { 8 | term = new ArchetypeTerm("at0001", TEXT, DESC); 9 | } 10 | 11 | public void tearDown() { 12 | term = null; 13 | } 14 | 15 | public void testGetText() { 16 | assertEquals("text wrong", TEXT, term.getText()); 17 | } 18 | 19 | public void testGetDescription() { 20 | assertEquals("description wrong", DESC, term.getDescription()); 21 | } 22 | 23 | private static final String TEXT = "text"; 24 | private static final String DESC = "description"; 25 | 26 | private ArchetypeTerm term; 27 | 28 | } 29 | -------------------------------------------------------------------------------- /openehr-ap/docs/changes.txt: -------------------------------------------------------------------------------- 1 | 2007/03/13 2 | .allow ordinal with negative value 3 | 4 | 2007/02/08 5 | .fixed a bug in the constructor of CDvQuantity 6 | 7 | 2007/01/20 8 | .updated constructors to allow defaultValue and assumedValue 9 | 10 | 2006/12/31 11 | .updated constructors to support parent attribute 12 | .replaced CDvCodedText with CCodePhrase 13 | 14 | 2006/12/16 15 | .updated class CDvCodedText regarding query attribute -------------------------------------------------------------------------------- /openehr-ap/src/test/java/org/openehr/am/openehrprofile/datatypes/quantity/CDvQuantityItemTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.openehrprofile.datatypes.quantity; 2 | 3 | 4 | import org.openehr.rm.support.basic.Interval; 5 | 6 | import junit.framework.TestCase; 7 | 8 | /** 9 | * Testcase for CDvQuantityItem 10 | * 11 | * @author Rong Chen 12 | * 13 | */ 14 | public class CDvQuantityItemTest extends TestCase { 15 | 16 | public void testCreateCDvQuantityItem() { 17 | Interval value = new Interval(20.0, 160.0); 18 | Interval precision = new Interval(0, null); 19 | String units = "Kg"; 20 | CDvQuantityItem item = new CDvQuantityItem(value, precision, units); 21 | 22 | assertEquals("magnitude wrong", value, item.getMagnitude()); 23 | assertEquals("precision wrong", precision, item.getPrecision()); 24 | assertEquals("units wrong", units, item.getUnits()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /openehr-ap/src/test/java/org/openehr/am/openehrprofile/datatypes/quantity/OrdinalTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.am.openehrprofile.datatypes.quantity; 2 | 3 | import org.openehr.rm.datatypes.text.CodePhrase; 4 | 5 | import junit.framework.TestCase; 6 | 7 | public class OrdinalTest extends TestCase { 8 | public void testEquals() { 9 | Ordinal o1 = new Ordinal(1, new CodePhrase("local", "at0001")); 10 | Ordinal o2 = new Ordinal(1, new CodePhrase("local", "at0001")); 11 | assertTrue("equals expected", o1.equals(o2)); 12 | assertTrue("equals expected", o2.equals(o1)); 13 | } 14 | 15 | public void testCreateOrdinalWithNegativeValue() { 16 | try { 17 | new Ordinal(-1, new CodePhrase("local", "at0001")); 18 | } catch(Exception e) { 19 | fail("failed to create ordinal with negative value"); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /openehr-rm-core/src/main/java/org/openehr/rm/datatypes/basic/ReferenceModelName.java: -------------------------------------------------------------------------------- 1 | package org.openehr.rm.datatypes.basic; 2 | 3 | public enum ReferenceModelName { 4 | 5 | DV_BOOLEAN("DV_BOOLEAN"), 6 | DV_COUNT("DV_COUNT"), 7 | DV_QUANTITY("DV_QUANTITY"), 8 | DV_PROPORTION("DV_PROPORTION"), 9 | DV_TEXT("DV_TEXT"), 10 | DV_CODED_TEXT("DV_CODED_TEXT"), 11 | DV_ORDINAL("DV_ORDINAL"), 12 | CODE_PHRASE("CODE_PHRASE"), 13 | DV_DATE_TIME("DV_DATE_TIME"), 14 | DV_DATE("DV_DATE"), 15 | DV__TIME("DV_TIME"), 16 | DV_DURATION("DV_DURATION"), 17 | DV_PARSABLE("DV_PARSABLE"); 18 | 19 | private final String name; 20 | 21 | public String getName() { 22 | return name; 23 | } 24 | 25 | public String toString() { 26 | return name; 27 | } 28 | 29 | ReferenceModelName(String name) { 30 | this.name = name; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /openehr-rm-core/src/test/java/org/openehr/rm/datastructure/itemstructure/representation/CreateEmptyElementTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.rm.datastructure.itemstructure.representation; 2 | 3 | import org.openehr.rm.datatypes.text.DvCodedText; 4 | import org.openehr.rm.datatypes.text.DvText; 5 | import org.openehr.rm.support.terminology.TerminologyService; 6 | import org.openehr.rm.support.terminology.TestTerminologyAccess; 7 | import org.openehr.rm.support.terminology.TestTerminologyService; 8 | 9 | import junit.framework.TestCase; 10 | 11 | public class CreateEmptyElementTest extends TestCase { 12 | 13 | public void testCreateElement() { 14 | TerminologyService ts = TestTerminologyService.getInstance(); 15 | DvCodedText nullFlavor = new DvCodedText("no information", 16 | TestTerminologyAccess.NULL_FLAVOUR); 17 | 18 | new Element(null, "at0001", new DvText("name"), null, null, null, null, 19 | null, nullFlavor, ts); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /openehr-rm-core/src/test/java/org/openehr/rm/datatypes/quantity/datetime/DvDateTimeParserTimeZoneTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.rm.datatypes.quantity.datetime; 2 | 3 | import java.util.TimeZone; 4 | 5 | import junit.framework.TestCase; 6 | 7 | public class DvDateTimeParserTimeZoneTest extends TestCase { 8 | public DvDateTimeParserTimeZoneTest() { 9 | defaultTimeZone = TimeZone.getDefault(); 10 | } 11 | 12 | public void setUp() throws Exception { 13 | System.setProperty("user.timezone", "GMT-3:00"); 14 | TimeZone.setDefault(TimeZone.getTimeZone("GMT-3:00")); 15 | } 16 | 17 | public void tearDown() throws Exception { 18 | TimeZone.setDefault(defaultTimeZone); 19 | } 20 | 21 | public void testParseTime() { 22 | try { 23 | DvDateTimeParser.parseTime("010000"); 24 | } catch(Exception e) { 25 | fail("failed to parse 010000 in GMT-3 timezone"); 26 | } 27 | } 28 | 29 | private TimeZone defaultTimeZone; 30 | } 31 | -------------------------------------------------------------------------------- /openehr-rm-core/src/test/java/org/openehr/rm/support/identification/UUIDTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * UUIDTest.java 3 | * JUnit based test 4 | * 5 | * Created on July 10, 2006, 4:27 PM 6 | */ 7 | 8 | package org.openehr.rm.support.identification; 9 | 10 | import junit.framework.*; 11 | 12 | /** 13 | * 14 | * @author yinsulim 15 | */ 16 | public class UUIDTest extends TestCase { 17 | 18 | public UUIDTest(String testName) { 19 | super(testName); 20 | } 21 | 22 | protected void setUp() throws Exception { 23 | } 24 | 25 | protected void tearDown() throws Exception { 26 | } 27 | 28 | public static Test suite() { 29 | TestSuite suite = new TestSuite(UUIDTest.class); 30 | 31 | return suite; 32 | } 33 | 34 | public void testConstructorTakeString() { 35 | assertNotNull(new UUID("128-1-1-12-15")); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /openehr-rm-core/src/test/java/org/openehr/rm/support/terminology/OpenEHRCodeSetIdentifiersTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.rm.support.terminology; 2 | 3 | import junit.framework.TestCase; 4 | 5 | public class OpenEHRCodeSetIdentifiersTest extends TestCase { 6 | 7 | public void testValidateCodeSetIdWithValidId() throws Exception { 8 | String id = OpenEHRCodeSetIdentifiers.CHARACTER_SETS.toString(); 9 | assertTrue("id 'character sets' should be valid", 10 | OpenEHRCodeSetIdentifiers.validCodeSetId(id)); 11 | } 12 | 13 | public void testValidateCodeSetIdWithInvalidId() throws Exception { 14 | String id = "some unknown id"; 15 | assertFalse(id + " shouldn't be valid", 16 | OpenEHRCodeSetIdentifiers.validCodeSetId(id)); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /openehr-rm-core/src/test/java/org/openehr/rm/support/terminology/OpenEHRTerminologyGroupIdentifiersTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.rm.support.terminology; 2 | 3 | import junit.framework.TestCase; 4 | 5 | public class OpenEHRTerminologyGroupIdentifiersTest extends TestCase { 6 | 7 | public void testValidateTerminologyGroupIdWithValidId() { 8 | String id = 9 | OpenEHRTerminologyGroupIdentifiers.ATTESTATION_REASON.toString(); 10 | assertTrue(id + " should be valid", 11 | OpenEHRTerminologyGroupIdentifiers.validTerminologyGroupId(id)); 12 | } 13 | 14 | public void testValidateTerminologyGroupIdWithInvalidId() { 15 | String id = "unknow terminology group id"; 16 | assertFalse(id + " should not be valid", 17 | OpenEHRTerminologyGroupIdentifiers.validTerminologyGroupId(id)); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /rm-builder/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Set root logger level to DEBUG and its only appender to stdout. 2 | log4j.rootLogger=stdout 3 | 4 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 5 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 6 | log4j.appender.stdout.layout.ConversionPattern=%-5p %c %x - %m%n 7 | 8 | # package logging level 9 | log4j.logger.org.openehr.build=ERROR -------------------------------------------------------------------------------- /rm-skeleton/src/test/java/org/openehr/rm/util/GenerateNestedSectionsTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.rm.util; 2 | 3 | import org.openehr.am.archetype.Archetype; 4 | import org.openehr.rm.composition.content.navigation.Section; 5 | 6 | public class GenerateNestedSectionsTest extends SkeletonGeneratorTestBase { 7 | 8 | public GenerateNestedSectionsTest() throws Exception { 9 | } 10 | 11 | public void testWithOptionalChildren() throws Exception { 12 | Archetype flattened = flattenTemplate( 13 | "test_nested_sections_with_optional_children"); 14 | 15 | Object obj = generator.create(flattened, null, archetypeMap, 16 | GenerationStrategy.MINIMUM); 17 | 18 | assertTrue(obj instanceof Section); 19 | Section section = (Section) obj; 20 | 21 | // section.name from archetype 22 | String path = "/items[openEHR-EHR-SECTION.ad_hoc_heading.v1]/name/value"; 23 | assertNull("unexpected nested section", section.itemAtPath(path)); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /rm-skeleton/src/test/java/org/openehr/rm/util/RootNodeNameTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.rm.util; 2 | 3 | import org.openehr.rm.datastructure.itemstructure.ItemTree; 4 | 5 | public class RootNodeNameTest extends SkeletonGeneratorTestBase { 6 | 7 | public RootNodeNameTest() throws Exception { 8 | } 9 | 10 | public void testDvOrdinalWithLocalCode() throws Exception { 11 | archetype = loadArchetype("openEHR-EHR-ITEM_TREE.medication_test_seven.v1.adl"); 12 | instance = generator.create(archetype); 13 | 14 | assertTrue(instance instanceof ItemTree); 15 | ItemTree tree = (ItemTree) instance; 16 | assertEquals("Medication description", tree.getName().getValue()); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /rm-skeleton/src/test/java/org/openehr/rm/util/TemplateIdTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.rm.util; 2 | 3 | import org.openehr.rm.common.archetyped.Archetyped; 4 | import org.openehr.rm.composition.content.entry.Observation; 5 | 6 | 7 | public class TemplateIdTest extends SkeletonGeneratorTestBase { 8 | 9 | public TemplateIdTest() throws Exception { 10 | super(); 11 | } 12 | 13 | public void testWithBloodPressureArchetype() throws Exception { 14 | archetype = loadArchetype("openEHR-EHR-OBSERVATION.blood_pressure.v2.adl"); 15 | String templateId = "Blood_pressure"; 16 | 17 | instance = generator.create(archetype, templateId, null, 18 | GenerationStrategy.MINIMUM); 19 | 20 | assertTrue(instance instanceof Observation); 21 | 22 | Observation obs = (Observation) instance; 23 | Archetyped details = obs.getArchetypeDetails(); 24 | assertNotNull(details); 25 | assertEquals("wrong templateId", templateId, details.getTemplateId().toString()); 26 | } 27 | } -------------------------------------------------------------------------------- /rm-skeleton/src/test/java/org/openehr/rm/util/TestActions.java: -------------------------------------------------------------------------------- 1 | package org.openehr.rm.util; 2 | 3 | import org.openehr.rm.composition.content.entry.Action; 4 | 5 | public class TestActions extends SkeletonGeneratorTestBase { 6 | 7 | public TestActions() throws Exception { 8 | } 9 | 10 | public void testWithMedicationAction() throws Exception { 11 | archetype = loadArchetype("openEHR-EHR-ACTION.medication.v1.adl"); 12 | instance = generator.create(archetype); 13 | assertTrue("failed to create Action instance", instance instanceof Action); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /rm-skeleton/src/test/java/org/openehr/rm/util/TestEvents.java: -------------------------------------------------------------------------------- 1 | package org.openehr.rm.util; 2 | 3 | import org.openehr.rm.composition.content.entry.Observation; 4 | 5 | public class TestEvents extends SkeletonGeneratorTestBase { 6 | 7 | public TestEvents() throws Exception { 8 | 9 | } 10 | 11 | public void testWithApgarScoreArchetype_PointEvent() throws Exception { 12 | archetype = loadArchetype("openEHR-EHR-OBSERVATION.apgar.v1.adl"); 13 | instance = generator.create(archetype, GenerationStrategy.MAXIMUM); 14 | assertTrue("failed to create Action instance", instance instanceof Observation); 15 | } 16 | 17 | /* 18 | public void testWithBloodPressureArchetype_Interval() throws Exception { 19 | archetype = loadArchetype("openEHR-EHR-OBSERVATION.blood_pressure.v1.adl"); 20 | instance = generator.create(archetype, GenerationStrategy.MAXIMUM); 21 | assertTrue("failed to create Action instance", instance instanceof Observation); 22 | } 23 | */ 24 | 25 | } -------------------------------------------------------------------------------- /rm-skeleton/src/test/resources/adl/openEHR-EHR-ITEM_TREE.medication_test_five.v1.adl: -------------------------------------------------------------------------------- 1 | archetype (adl_version=1.4) 2 | openEHR-EHR-ITEM_TREE.medication_test_five.v1 3 | 4 | concept 5 | [at0000] -- Medication description 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ITEM_TREE[at0000] matches { 12 | items cardinality matches {1..*; ordered} matches { 13 | ELEMENT[at0001] matches { -- Name of medication 14 | value matches { 15 | DV_COUNT matches {*} 16 | } 17 | } 18 | } 19 | } 20 | 21 | ontology 22 | term_definitions = < 23 | ["en"] = < 24 | items = < 25 | ["at0000"] = < 26 | text = <"Medication description"> 27 | description = <"The description of a medication"> 28 | > 29 | ["at0001"] = < 30 | text = <"Medication name"> 31 | description = <"The name of a medication"> 32 | > 33 | > 34 | 35 | > 36 | > -------------------------------------------------------------------------------- /rm-skeleton/src/test/resources/adl/openEHR-EHR-ITEM_TREE.medication_test_one.v1.adl: -------------------------------------------------------------------------------- 1 | archetype (adl_version=1.4) 2 | openEHR-EHR-ITEM_TREE.medication_test_one.v1 3 | 4 | concept 5 | [at0000] -- Medication description 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ITEM_TREE[at0000] matches { 12 | items cardinality matches {1..*; ordered} matches { 13 | ELEMENT[at0001] matches { -- Name of medication 14 | value matches { 15 | DV_TEXT matches {*} 16 | } 17 | } 18 | } 19 | } 20 | 21 | ontology 22 | term_definitions = < 23 | ["en"] = < 24 | items = < 25 | ["at0000"] = < 26 | text = <"Medication description"> 27 | description = <"The description of a medication"> 28 | > 29 | ["at0001"] = < 30 | text = <"Medication name"> 31 | description = <"The name of a medication"> 32 | > 33 | > 34 | 35 | > 36 | > -------------------------------------------------------------------------------- /rm-skeleton/src/test/resources/adl/openEHR-EHR-ITEM_TREE.medication_test_six.v1.adl: -------------------------------------------------------------------------------- 1 | archetype (adl_version=1.4) 2 | openEHR-EHR-ITEM_TREE.medication_test_five.v1 3 | 4 | concept 5 | [at0000] -- Medication description 6 | 7 | language 8 | original_language = <[ISO_639-1::en]> 9 | 10 | definition 11 | ITEM_TREE[at0000] matches { 12 | items cardinality matches {1..*; ordered} matches { 13 | ELEMENT[at0001] matches { -- Name of medication 14 | value matches { 15 | DV_PROPORTION matches {*} 16 | } 17 | } 18 | } 19 | } 20 | 21 | ontology 22 | term_definitions = < 23 | ["en"] = < 24 | items = < 25 | ["at0000"] = < 26 | text = <"Medication description"> 27 | description = <"The description of a medication"> 28 | > 29 | ["at0001"] = < 30 | text = <"Medication name"> 31 | description = <"The name of a medication"> 32 | > 33 | > 34 | 35 | > 36 | > -------------------------------------------------------------------------------- /rm-skeleton/src/test/resources/adl/openEHR-EHR-SECTION.ad_hoc_heading.v1.adl: -------------------------------------------------------------------------------- 1 | archetype (adl_version=1.4) 2 | openEHR-EHR-SECTION.ad_hoc_heading.v1 3 | 4 | concept 5 | [at0000] -- Heading 6 | language 7 | original_language = <[ISO_639-1::en]> 8 | description 9 | original_author = < 10 | ["name"] = <""> 11 | > 12 | details = < 13 | ["en"] = < 14 | language = <[ISO_639-1::en]> 15 | purpose = <"ad hoc heading"> 16 | use = <""> 17 | misuse = <""> 18 | > 19 | > 20 | lifecycle_state = <"0"> 21 | other_contributors = <> 22 | other_details = < 23 | ["references"] = <""> 24 | ["MD5-CAM-1.0.1"] = <"6211E600D00A019604319C19B8303CF6"> 25 | > 26 | 27 | definition 28 | SECTION[at0000] matches {*} 29 | 30 | ontology 31 | term_definitions = < 32 | ["en"] = < 33 | items = < 34 | ["at0000"] = < 35 | text = <"Heading"> 36 | description = <"An ad-hoc heading"> 37 | > 38 | > 39 | > 40 | > 41 | -------------------------------------------------------------------------------- /rm-skeleton/src/test/resources/dadl/item_tree_blood_pressure_1.dadl: -------------------------------------------------------------------------------- 1 | (ITEM_TREE) < 2 | archetype_node_id = <"openEHR-EHR-ITEM_TREE.blood_pressure.v1"> 3 | name = < 4 | value = <"Blood pressure"> 5 | > 6 | items = < 7 | [1] = < 8 | name = < 9 | value = <"Systolic"> 10 | > 11 | archetype_node_id = <"at0001"> 12 | value = < 13 | magnitude = <0.0> 14 | units = <"mm[Hg]"> 15 | > 16 | > 17 | [2] = < 18 | name = < 19 | value = <"Diastolic"> 20 | > 21 | archetype_node_id = <"at0002"> 22 | value = < 23 | magnitude = <0.0> 24 | units = <"mm[Hg]"> 25 | > 26 | > 27 | > 28 | > -------------------------------------------------------------------------------- /rm-skeleton/src/test/resources/dadl/item_tree_medicataion_1.dadl: -------------------------------------------------------------------------------- 1 | (ITEM_TREE) < 2 | archetype_node_id = <"openEHR-EHR-ITEM_TREE.medication_test_one.v1"> 3 | name = < 4 | value = <"Medication description"> 5 | > 6 | items = < 7 | [1] = (ELEMENT) < 8 | name = < 9 | value = <"Medication name"> 10 | > 11 | archetype_node_id = <"at0001"> 12 | value = < 13 | value = <"text value"> 14 | > 15 | > 16 | > 17 | > -------------------------------------------------------------------------------- /rm-skeleton/src/test/resources/dadl/item_tree_medicataion_10.dadl: -------------------------------------------------------------------------------- 1 | (ITEM_TREE) < 2 | archetype_node_id = <"openEHR-EHR-ITEM_TREE.medication_test_eight.v1"> 3 | name = < 4 | value = <"Medication description"> 5 | > 6 | items = < 7 | [1] = (ELEMENT) < 8 | name = < 9 | value = <"Status"> 10 | > 11 | archetype_node_id = <"at0001"> 12 | value = (DV_ORDINAL) < 13 | value = <1> 14 | symbol = < 15 | defining_code = < 16 | terminology_id = (TERMINOLOGY_ID) < 17 | value = <"SNOMED-CT"> 18 | > 19 | code_string = <"1201000053901"> 20 | > 21 | value = <"yes"> 22 | > 23 | > 24 | > 25 | > 26 | > -------------------------------------------------------------------------------- /rm-skeleton/src/test/resources/dadl/item_tree_medicataion_11.dadl: -------------------------------------------------------------------------------- 1 | (ITEM_TREE) < 2 | archetype_node_id = <"openEHR-EHR-ITEM_TREE.medication_test_nine.v1"> 3 | name = < 4 | value = <"Medication description"> 5 | > 6 | items = < 7 | [1] = (ELEMENT) < 8 | name = < 9 | value = <"Status"> 10 | > 11 | archetype_node_id = <"at0001"> 12 | value = < 13 | defining_code = < 14 | terminology_id = (TERMINOLOGY_ID) < 15 | value = <"local"> 16 | > 17 | code_string = <"at0002"> 18 | > 19 | value = <"one"> 20 | > 21 | > 22 | > 23 | > -------------------------------------------------------------------------------- /rm-skeleton/src/test/resources/dadl/item_tree_medicataion_2.dadl: -------------------------------------------------------------------------------- 1 | (ITEM_TREE) < 2 | archetype_node_id = <"openEHR-EHR-ITEM_TREE.medication_test_two.v1"> 3 | name = < 4 | value = <"Medication description"> 5 | > 6 | items = < 7 | [1] = (ELEMENT) < 8 | name = < 9 | value = <"Status"> 10 | > 11 | archetype_node_id = <"at0001"> 12 | value = < 13 | defining_code = < 14 | terminology_id = (TERMINOLOGY_ID) < 15 | value = <"SNOMED-CT"> 16 | > 17 | code_string = <"1201000053901"> 18 | > 19 | value = <"coded text value"> 20 | > 21 | > 22 | > 23 | > -------------------------------------------------------------------------------- /rm-skeleton/src/test/resources/dadl/item_tree_medicataion_3.dadl: -------------------------------------------------------------------------------- 1 | (ITEM_TREE) < 2 | archetype_node_id = <"openEHR-EHR-ITEM_TREE.medication_test_three.v1"> 3 | name = < 4 | value = <"Medication description"> 5 | > 6 | items = < 7 | [1] = (ELEMENT) < 8 | name = < 9 | value = <"Status"> 10 | > 11 | archetype_node_id = <"at0001"> 12 | value = < 13 | defining_code = < 14 | terminology_id = (TERMINOLOGY_ID) < 15 | value = <"SNOMED-CT"> 16 | > 17 | code_string = <"1201000053901"> 18 | > 19 | value = <"coded text value"> 20 | > 21 | > 22 | > 23 | > -------------------------------------------------------------------------------- /rm-skeleton/src/test/resources/dadl/item_tree_medicataion_4.dadl: -------------------------------------------------------------------------------- 1 | (ITEM_TREE) < 2 | archetype_node_id = <"openEHR-EHR-ITEM_TREE.medication_test_four.v1"> 3 | name = < 4 | value = <"Medication description"> 5 | > 6 | items = < 7 | [1] = (ELEMENT) < 8 | name = < 9 | value = <"Medication name"> 10 | > 11 | archetype_node_id = <"at0001"> 12 | value = < 13 | value = <"text value"> 14 | > 15 | > 16 | > 17 | > -------------------------------------------------------------------------------- /rm-skeleton/src/test/resources/dadl/item_tree_medicataion_5.dadl: -------------------------------------------------------------------------------- 1 | (ITEM_TREE) < 2 | archetype_node_id = <"openEHR-EHR-ITEM_TREE.medication_test_four.v1"> 3 | name = < 4 | value = <"Medication description"> 5 | > 6 | items = < 7 | [1] = (ELEMENT) < 8 | name = < 9 | value = <"Medication name"> 10 | > 11 | archetype_node_id = <"at0001"> 12 | value = < 13 | value = <"text value"> 14 | > 15 | > 16 | [2] = (ELEMENT) < 17 | name = < 18 | value = <"Medication status"> 19 | > 20 | archetype_node_id = <"at0002"> 21 | value = < 22 | value = <"text value"> 23 | > 24 | > 25 | > 26 | > -------------------------------------------------------------------------------- /rm-skeleton/src/test/resources/dadl/item_tree_medicataion_6.dadl: -------------------------------------------------------------------------------- 1 | (ITEM_TREE) < 2 | archetype_node_id = <"openEHR-EHR-ITEM_TREE.medication_test_five.v1"> 3 | name = < 4 | value = <"Medication description"> 5 | > 6 | items = < 7 | [1] = (ELEMENT) < 8 | name = < 9 | value = <"Medication name"> 10 | > 11 | archetype_node_id = <"at0001"> 12 | value = (DV_COUNT) < 13 | magnitude = <1> 14 | > 15 | > 16 | > 17 | > -------------------------------------------------------------------------------- /rm-skeleton/src/test/resources/dadl/item_tree_medicataion_7.dadl: -------------------------------------------------------------------------------- 1 | (ITEM_TREE) < 2 | archetype_node_id = <"openEHR-EHR-ITEM_TREE.medication_test_five.v1"> 3 | name = < 4 | value = <"Medication description"> 5 | > 6 | items = < 7 | [1] = (ELEMENT) < 8 | name = < 9 | value = <"Medication name"> 10 | > 11 | archetype_node_id = <"at0001"> 12 | value = (DV_PROPORTION) < 13 | numerator = <0.5> 14 | denominator = <1.0> 15 | type = <0> 16 | precision=<1> 17 | > 18 | > 19 | > 20 | > -------------------------------------------------------------------------------- /rm-skeleton/src/test/resources/dadl/item_tree_medicataion_8.dadl: -------------------------------------------------------------------------------- 1 | (ITEM_TREE) < 2 | archetype_node_id = <"openEHR-EHR-ITEM_TREE.medication_test_two.v1"> 3 | name = < 4 | value = <"Medication description"> 5 | > 6 | items = < 7 | [1] = (ELEMENT) < 8 | name = < 9 | value = <"Status"> 10 | > 11 | archetype_node_id = <"at0001"> 12 | value = < 13 | defining_code = < 14 | terminology_id = (TERMINOLOGY_ID) < 15 | value = <"SNOMED-CT"> 16 | > 17 | code_string = <"1201000053901"> 18 | > 19 | value = <"yes"> 20 | > 21 | > 22 | > 23 | > -------------------------------------------------------------------------------- /rm-skeleton/src/test/resources/dadl/item_tree_medicataion_9.dadl: -------------------------------------------------------------------------------- 1 | (ITEM_TREE) < 2 | archetype_node_id = <"openEHR-EHR-ITEM_TREE.medication_test_seven.v1"> 3 | name = < 4 | value = <"Medication description"> 5 | > 6 | items = < 7 | [1] = (ELEMENT) < 8 | name = < 9 | value = <"Status"> 10 | > 11 | archetype_node_id = <"at0001"> 12 | value = (DV_ORDINAL) < 13 | value = <1> 14 | symbol = < 15 | defining_code = < 16 | terminology_id = (TERMINOLOGY_ID) < 17 | value = <"local"> 18 | > 19 | code_string = <"at0002"> 20 | > 21 | value = <"one"> 22 | > 23 | > 24 | > 25 | > 26 | > -------------------------------------------------------------------------------- /rm-skeleton/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Set root logger level to DEBUG and its only appender to stdout. 2 | log4j.rootLogger=WARN, stdout 3 | 4 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 5 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 6 | log4j.appender.stdout.layout.ConversionPattern=%-5p %c %x - %m%n 7 | 8 | # package logging level 9 | log4j.logger.org.openehr.rm.util= 10 | log4j.logger.org.openehr.rm.util.RMUtil= 11 | log4j.logger.org.openehr.build= 12 | log4j.logger.org.openehr.am.template.Flattener= 13 | log4j.logger.org.openehr.am.template.TermMap= -------------------------------------------------------------------------------- /rm-skeleton/src/test/resources/oet/test_nested_sections_with_optional_children.oet: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /rm-skeleton/src/test/resources/oet/test_section_instruction_tree.oet: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /rm-skeleton/src/test/resources/oet/test_text_name.oet: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /rm-skeleton/src/test/resources/terms.txt: -------------------------------------------------------------------------------- 1 | SNOMED-CT::1201000053901::yes 2 | SNOMED-CT::1201000053902::no 3 | SNOMED-CT::1201000053903::unknown -------------------------------------------------------------------------------- /xml-binding/src/main/groovy/load-observation.groovy: -------------------------------------------------------------------------------- 1 | import org.openehr.schemas.v1.*; 2 | import org.openehr.binding.*; 3 | 4 | input = new FileInputStream(new File("c:\\tmp\\original_version_002.xml")); 5 | 6 | xml = VersionDocument.Factory.parse(input).getVersion() 7 | ver = new XMLBinding().bindToRM(xml) 8 | comp = ver.getData() 9 | section = comp.getContent().get(0) 10 | obser = section.getItems().get(0) 11 | 12 | println 'name: ' + obser.getName() + ', nodeId: ' + obser.getArchetypeNodeId() -------------------------------------------------------------------------------- /xml-binding/src/test/java/org/openehr/binding/BindEmptyItemTreeTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.binding; 2 | 3 | import org.openehr.rm.datastructure.itemstructure.ItemTree; 4 | import org.openehr.schemas.v1.*; 5 | 6 | public class BindEmptyItemTreeTest extends XMLBindingTestBase { 7 | 8 | public void testBindXMLDvProportionToRM() throws Exception { 9 | ITEMTREE tree = ITEMTREE.Factory.parse(fromClasspath( 10 | "empty_item_tree.xml")); 11 | 12 | assertEquals(0, tree.getItemsArray().length); 13 | assertEquals(0, tree.sizeOfItemsArray()); 14 | 15 | 16 | // do the data binding 17 | Object rmObj = binding.bindToRM(tree); 18 | 19 | assertTrue("unexpected type: " + 20 | (rmObj == null ? "null" : rmObj.getClass()), 21 | rmObj instanceof ItemTree); 22 | 23 | ItemTree itemTree = (ItemTree) rmObj; 24 | assertNotNull("unexpected null items attribute", itemTree.getItems()); 25 | assertTrue(itemTree.getItems().isEmpty()); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /xml-binding/src/test/java/org/openehr/binding/VersionedDocumentTest.java: -------------------------------------------------------------------------------- 1 | package org.openehr.binding; 2 | 3 | import org.openehr.schemas.v1.VersionDocument; 4 | 5 | public class VersionedDocumentTest extends XMLBindingTestBase { 6 | 7 | public void testParsingVersionedDocument() throws Exception { 8 | VersionDocument vd = 9 | VersionDocument.Factory.parse( 10 | fromClasspath("original_version_002.xml")); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /xml-binding/src/test/java/org/openehr/binding/XMLBindingTestBase.java: -------------------------------------------------------------------------------- 1 | package org.openehr.binding; 2 | 3 | import java.io.InputStream; 4 | 5 | import com.thoughtworks.xstream.XStream; 6 | 7 | import junit.framework.TestCase; 8 | 9 | public class XMLBindingTestBase extends TestCase { 10 | 11 | public void setUp() throws Exception { 12 | binding = new XMLBinding(); 13 | } 14 | 15 | protected InputStream fromClasspath(String filename) throws Exception { 16 | return this.getClass().getClassLoader().getResourceAsStream(filename); 17 | } 18 | 19 | protected String toXML(Object obj) throws Exception { 20 | XStream xstream = new XStream(); 21 | String xml = xstream.toXML(obj); 22 | return xml; 23 | } 24 | 25 | protected void printXML(Object obj) throws Exception { 26 | System.out.println(toXML(obj)); 27 | } 28 | 29 | protected XMLBinding binding; 30 | } 31 | -------------------------------------------------------------------------------- /xml-binding/src/test/resources/dv_proportion.xml: -------------------------------------------------------------------------------- 1 | 2 | 0.0 3 | 0.5 4 | 1.0 5 | 0 6 | 1 7 | -------------------------------------------------------------------------------- /xml-binding/src/test/resources/empty_item_tree.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | item tree 7 | 8 | -------------------------------------------------------------------------------- /xml-binding/src/test/resources/item_tree.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | Tree 6 | 7 | 8 | 9 | Blood glucose 10 | 11 | 12 | 100 13 | mmol/l 14 | 0 15 | 16 | 17 | -------------------------------------------------------------------------------- /xml-binding/src/test/resources/item_tree_003.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | Tree 6 | 7 | 8 | 9 | Blood glucose 10 | 11 | 12 | 0.0 13 | 0.5 14 | 1.0 15 | 0 16 | 17 | 18 | -------------------------------------------------------------------------------- /xml-binding/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Set root logger level to DEBUG and its only appender to stdout. 2 | log4j.rootLogger=ERROR, stdout 3 | 4 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 5 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 6 | log4j.appender.stdout.layout.ConversionPattern=%-5p %c %x - %m%n 7 | 8 | # package logging level 9 | log4j.logger.org.openehr.binding= -------------------------------------------------------------------------------- /xml-serializer/readme.txt: -------------------------------------------------------------------------------- 1 | XML serializer of the Archetype Object Model 2 | --------------------------------------------------------------------------------