From c5b6ad074cbae0fde3aa6b17db233690dee324b5 Mon Sep 17 00:00:00 2001 From: Pablo Pazos Date: Wed, 27 Nov 2024 14:40:38 -0300 Subject: [PATCH] improved opt complete for context.participations --- a_opt_complete.json | 3580 ++++++++++++++++- gradle.properties | 2 +- opt.bat | 2 +- opt.sh | 2 +- .../opt/model/OperationalTemplate.groovy | 141 +- .../cabolabs/openehr/rm_1_0_2/Model.groovy | 24 +- .../cabolabs/openehr/opt/OPTParserTest.groovy | 4 +- 7 files changed, 3743 insertions(+), 12 deletions(-) diff --git a/a_opt_complete.json b/a_opt_complete.json index c8ce885..8996807 100644 --- a/a_opt_complete.json +++ b/a_opt_complete.json @@ -361,16 +361,3594 @@ "archetype_id": null, "path": "/context/participations/performer", "type": "C_COMPLEX_OBJECT", - "rm_type_name": "[PARTY_IDENTIFIED, PARTY_RELATED, PARTY_SELF]", + "rm_type_name": "PARTY_IDENTIFIED", "node_id": null, "text": "Test all types.context.participations.performer", "description": "unknown.context.participations.performer", "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "external_ref", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer/external_ref", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "PARTY_REF", + "node_id": null, + "text": "Test all types.context.participations.performer.external_ref", + "description": "unknown.context.participations.performer.external_ref", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "id", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer/external_ref/id", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "OBJECT_VERSION_ID", + "node_id": null, + "text": "Test all types.context.participations.performer.external_ref.id", + "description": "unknown.context.participations.performer.external_ref.id", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer/external_ref/id/value", + "type": "C_PRIMITIVE_OBJECT", + "rm_type_name": "String", + "node_id": null, + "text": "Test all types.context.participations.performer.external_ref.id.value", + "description": "unknown.context.participations.performer.external_ref.id.value", + "_class": "PrimitiveObjectNode", + "item": { + "list": [ + + ] + } + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "name", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer/name", + "type": "C_PRIMITIVE_OBJECT", + "rm_type_name": "String", + "node_id": null, + "text": "Test all types.context.participations.performer.name", + "description": "unknown.context.participations.performer.name", + "_class": "PrimitiveObjectNode", + "item": { + "list": [ + + ] + } + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "identifiers", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer/identifiers", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_IDENTIFIER", + "node_id": null, + "text": "Test all types.context.participations.performer.identifiers", + "description": "unknown.context.participations.performer.identifiers", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + }, + { + "archetype_id": null, + "path": "/context/participations/performer", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "PARTY_RELATED", + "node_id": null, + "text": "Test all types.context.participations.performer", + "description": "unknown.context.participations.performer", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "external_ref", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer/external_ref", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "PARTY_REF", + "node_id": null, + "text": "Test all types.context.participations.performer.external_ref", + "description": "unknown.context.participations.performer.external_ref", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "id", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer/external_ref/id", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "OBJECT_VERSION_ID", + "node_id": null, + "text": "Test all types.context.participations.performer.external_ref.id", + "description": "unknown.context.participations.performer.external_ref.id", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer/external_ref/id/value", + "type": "C_PRIMITIVE_OBJECT", + "rm_type_name": "String", + "node_id": null, + "text": "Test all types.context.participations.performer.external_ref.id.value", + "description": "unknown.context.participations.performer.external_ref.id.value", + "_class": "PrimitiveObjectNode", + "item": { + "list": [ + + ] + } + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "name", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer/name", + "type": "C_PRIMITIVE_OBJECT", + "rm_type_name": "String", + "node_id": null, + "text": "Test all types.context.participations.performer.name", + "description": "unknown.context.participations.performer.name", + "_class": "PrimitiveObjectNode", + "item": { + "list": [ + + ] + } + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "identifiers", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer/identifiers", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_IDENTIFIER", + "node_id": null, + "text": "Test all types.context.participations.performer.identifiers", + "description": "unknown.context.participations.performer.identifiers", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "relationship", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer/relationship", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "Test all types.context.participations.performer.relationship", + "description": "unknown.context.participations.performer.relationship", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + }, + { + "archetype_id": null, + "path": "/context/participations/performer", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "PARTY_SELF", + "node_id": null, + "text": "Test all types.context.participations.performer", + "description": "unknown.context.participations.performer", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "external_ref", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer/external_ref", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "PARTY_REF", + "node_id": null, + "text": "Test all types.context.participations.performer.external_ref", + "description": "unknown.context.participations.performer.external_ref", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "id", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer/external_ref/id", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "OBJECT_VERSION_ID", + "node_id": null, + "text": "Test all types.context.participations.performer.external_ref.id", + "description": "unknown.context.participations.performer.external_ref.id", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer/external_ref/id/value", + "type": "C_PRIMITIVE_OBJECT", + "rm_type_name": "String", + "node_id": null, + "text": "Test all types.context.participations.performer.external_ref.id.value", + "description": "unknown.context.participations.performer.external_ref.id.value", + "_class": "PrimitiveObjectNode", + "item": { + "list": [ + + ] + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "C_MULTIPLE_ATTRIBUTE", + "rm_attribute_name": "content", + "children": [ + { + "archetype_id": "openEHR-EHR-OBSERVATION.test_all_types.v1", + "path": "/", + "type": "C_ARCHETYPE_ROOT", + "rm_type_name": "OBSERVATION", + "node_id": "at0000", + "text": "Test all types", + "description": "unknown", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "data", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "HISTORY", + "node_id": "at0001", + "text": "Event Series", + "description": "@ internal @", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_MULTIPLE_ATTRIBUTE", + "rm_attribute_name": "events", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "EVENT", + "node_id": "at0002", + "text": "Cualquier evento", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "data", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ITEM_TREE", + "node_id": "at0003", + "text": "Arbol", + "description": "@ internal @", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_MULTIPLE_ATTRIBUTE", + "rm_attribute_name": "items", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0004]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ELEMENT", + "node_id": "at0004", + "text": "text", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0004]/value", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_TEXT", + "node_id": null, + "text": "text.value", + "description": "*.value", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "null_flavour", + "children": [ + { + "archetype_id": null, + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0004]/null_flavour", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "text.null_flavour", + "description": "*.null_flavour", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + }, + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0005]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ELEMENT", + "node_id": "at0005", + "text": "coded text", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0005]/value", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "coded text.value", + "description": "*.value", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "defining_code", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0005]/value/defining_code", + "type": "C_CODE_PHRASE", + "rm_type_name": "CODE_PHRASE", + "node_id": null, + "text": "coded text.value.defining_code", + "description": "*.value.defining_code", + "_class": "CCodePhrase", + "attributes": [ + + ], + "terminology_id": "local", + "code_list": [ + + ] + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "null_flavour", + "children": [ + { + "archetype_id": null, + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0005]/null_flavour", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "coded text.null_flavour", + "description": "*.null_flavour", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + }, + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0006]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ELEMENT", + "node_id": "at0006", + "text": "coded text terminology", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0006]/value", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "coded text terminology.value", + "description": "*.value", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "defining_code", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0006]/value/defining_code", + "type": "C_CODE_REFERENCE", + "rm_type_name": "CODE_PHRASE", + "node_id": null, + "text": "coded text terminology.value.defining_code", + "description": "*.value.defining_code", + "_class": "CCodePhrase", + "attributes": [ + + ], + "referenceSetUri": "terminology:SNOMED-CT" + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "null_flavour", + "children": [ + { + "archetype_id": null, + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0006]/null_flavour", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "coded text terminology.null_flavour", + "description": "*.null_flavour", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + }, + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0007]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ELEMENT", + "node_id": "at0007", + "text": "quantity", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0007]/value", + "type": "C_DV_QUANTITY", + "rm_type_name": "DV_QUANTITY", + "node_id": null, + "text": "quantity.value", + "description": "*.value", + "_class": "CDvQuantity", + "attributes": [ + + ], + "list": [ + { + "magnitude": null, + "precision": null, + "units": "mg" + }, + { + "magnitude": null, + "precision": null, + "units": "kg" + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "null_flavour", + "children": [ + { + "archetype_id": null, + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0007]/null_flavour", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "quantity.null_flavour", + "description": "*.null_flavour", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + }, + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0008]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ELEMENT", + "node_id": "at0008", + "text": "count", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0008]/value", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_COUNT", + "node_id": null, + "text": "count.value", + "description": "*.value", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "null_flavour", + "children": [ + { + "archetype_id": null, + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0008]/null_flavour", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "count.null_flavour", + "description": "*.null_flavour", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + }, + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0009]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ELEMENT", + "node_id": "at0009", + "text": "date", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0009]/value", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_DATE", + "node_id": null, + "text": "date.value", + "description": "*.value", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "null_flavour", + "children": [ + { + "archetype_id": null, + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0009]/null_flavour", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "date.null_flavour", + "description": "*.null_flavour", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + }, + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0010]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ELEMENT", + "node_id": "at0010", + "text": "datetime", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0010]/value", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_DATE_TIME", + "node_id": null, + "text": "datetime.value", + "description": "*.value", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0010]/value/value", + "type": "C_PRIMITIVE_OBJECT", + "rm_type_name": "DATE_TIME", + "node_id": null, + "text": "datetime.value.value", + "description": "*.value.value", + "_class": "PrimitiveObjectNode", + "item": { + "pattern": "yyyy-mm-ddTHH:MM:SS" + } + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "null_flavour", + "children": [ + { + "archetype_id": null, + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0010]/null_flavour", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "datetime.null_flavour", + "description": "*.null_flavour", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + }, + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0011]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ELEMENT", + "node_id": "at0011", + "text": "datetime any", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0011]/value", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_DATE_TIME", + "node_id": null, + "text": "datetime any.value", + "description": "*.value", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "null_flavour", + "children": [ + { + "archetype_id": null, + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0011]/null_flavour", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "datetime any.null_flavour", + "description": "*.null_flavour", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + }, + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0012]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ELEMENT", + "node_id": "at0012", + "text": "time", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0012]/value", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_TIME", + "node_id": null, + "text": "time.value", + "description": "*.value", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "null_flavour", + "children": [ + { + "archetype_id": null, + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0012]/null_flavour", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "time.null_flavour", + "description": "*.null_flavour", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + }, + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0013]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ELEMENT", + "node_id": "at0013", + "text": "ordinal", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0013]/value", + "type": "C_DV_ORDINAL", + "rm_type_name": "DV_ORDINAL", + "node_id": null, + "text": "ordinal.value", + "description": "*.value", + "_class": "CDvOrdinal", + "attributes": [ + + ], + "list": [ + { + "value": 0, + "symbol": { + "codeString": "at0014", + "terminologyId": "local" + } + }, + { + "value": 1, + "symbol": { + "codeString": "at0015", + "terminologyId": "local" + } + }, + { + "value": 2, + "symbol": { + "codeString": "at0016", + "terminologyId": "local" + } + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "null_flavour", + "children": [ + { + "archetype_id": null, + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0013]/null_flavour", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "ordinal.null_flavour", + "description": "*.null_flavour", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + }, + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0017]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ELEMENT", + "node_id": "at0017", + "text": "boolean", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0017]/value", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_BOOLEAN", + "node_id": null, + "text": "boolean.value", + "description": "*.value", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0017]/value/value", + "type": "C_PRIMITIVE_OBJECT", + "rm_type_name": "BOOLEAN", + "node_id": null, + "text": "boolean.value.value", + "description": "*.value.value", + "_class": "PrimitiveObjectNode", + "item": { + + } + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "null_flavour", + "children": [ + { + "archetype_id": null, + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0017]/null_flavour", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "boolean.null_flavour", + "description": "*.null_flavour", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + }, + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0018]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ELEMENT", + "node_id": "at0018", + "text": "duration any", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0018]/value", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_DURATION", + "node_id": null, + "text": "duration any.value", + "description": "*.value", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "null_flavour", + "children": [ + { + "archetype_id": null, + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0018]/null_flavour", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "duration any.null_flavour", + "description": "*.null_flavour", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + }, + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0019]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ELEMENT", + "node_id": "at0019", + "text": "multimedia any", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0019]/value", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_MULTIMEDIA", + "node_id": null, + "text": "multimedia any.value", + "description": "*.value", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "media_type", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0019]/value/media_type", + "type": "C_CODE_PHRASE", + "rm_type_name": "CODE_PHRASE", + "node_id": null, + "text": "multimedia any.value.media_type", + "description": "*.value.media_type", + "_class": "CCodePhrase", + "attributes": [ + + ], + "terminology_id": "IANA_media-types", + "code_list": [ + + ] + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "null_flavour", + "children": [ + { + "archetype_id": null, + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0019]/null_flavour", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "multimedia any.null_flavour", + "description": "*.null_flavour", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + }, + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0020]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ELEMENT", + "node_id": "at0020", + "text": "parsable any", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0020]/value", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_PARSABLE", + "node_id": null, + "text": "parsable any.value", + "description": "*.value", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "null_flavour", + "children": [ + { + "archetype_id": null, + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0020]/null_flavour", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "parsable any.null_flavour", + "description": "*.null_flavour", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + }, + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0021]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ELEMENT", + "node_id": "at0021", + "text": "identifier", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0021]/value", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_IDENTIFIER", + "node_id": null, + "text": "identifier.value", + "description": "*.value", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "null_flavour", + "children": [ + { + "archetype_id": null, + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0021]/null_flavour", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "identifier.null_flavour", + "description": "*.null_flavour", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + }, + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0022]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ELEMENT", + "node_id": "at0022", + "text": "proportion any", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0022]/value", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_PROPORTION", + "node_id": null, + "text": "proportion any.value", + "description": "*.value", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "null_flavour", + "children": [ + { + "archetype_id": null, + "path": "/data[at0001]/events[at0002]/data[at0003]/items[at0022]/null_flavour", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "proportion any.null_flavour", + "description": "*.null_flavour", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "time", + "children": [ + { + "archetype_id": null, + "path": "/data[at0001]/events[at0002]/time", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_DATE_TIME", + "node_id": null, + "text": "Cualquier evento.time", + "description": "*.time", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "origin", + "children": [ + { + "archetype_id": null, + "path": "/data[at0001]/origin", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_DATE_TIME", + "node_id": null, + "text": "Event Series.origin", + "description": "@ internal @.origin", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "period", + "children": [ + { + "archetype_id": null, + "path": "/data[at0001]/period", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_DURATION", + "node_id": null, + "text": "Event Series.period", + "description": "@ internal @.period", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "duration", + "children": [ + { + "archetype_id": null, + "path": "/data[at0001]/duration", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_DURATION", + "node_id": null, + "text": "Event Series.duration", + "description": "@ internal @.duration", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "archetype_id": "openEHR-EHR-EVALUATION.test_all_types.v1", + "path": "/", + "type": "C_ARCHETYPE_ROOT", + "rm_type_name": "EVALUATION", + "node_id": "at0000", + "text": "Test all types", + "description": "unknown", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "data", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ITEM_TREE", + "node_id": "at0001", + "text": "Arbol", + "description": "@ internal @", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_MULTIPLE_ATTRIBUTE", + "rm_attribute_name": "items", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/items[at0002]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ELEMENT", + "node_id": "at0002", + "text": "uri", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/items[at0002]/value", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_URI", + "node_id": null, + "text": "uri.value", + "description": "*.value", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "null_flavour", + "children": [ + { + "archetype_id": null, + "path": "/data[at0001]/items[at0002]/null_flavour", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "uri.null_flavour", + "description": "*.null_flavour", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + }, + { + "archetype_id": "", + "path": "/data[at0001]/items[at0003]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ELEMENT", + "node_id": "at0003", + "text": "interval count", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/items[at0003]/value", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_INTERVAL", + "node_id": null, + "text": "interval count.value", + "description": "*.value", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "upper", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/items[at0003]/value/upper", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_COUNT", + "node_id": null, + "text": "interval count.value.upper", + "description": "*.value.upper", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "lower", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/items[at0003]/value/lower", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_COUNT", + "node_id": null, + "text": "interval count.value.lower", + "description": "*.value.lower", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "null_flavour", + "children": [ + { + "archetype_id": null, + "path": "/data[at0001]/items[at0003]/null_flavour", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "interval count.null_flavour", + "description": "*.null_flavour", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + }, + { + "archetype_id": "", + "path": "/data[at0001]/items[at0004]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ELEMENT", + "node_id": "at0004", + "text": "interval quantity", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/items[at0004]/value", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_INTERVAL", + "node_id": null, + "text": "interval quantity.value", + "description": "*.value", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "upper", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/items[at0004]/value/upper", + "type": "C_DV_QUANTITY", + "rm_type_name": "DV_QUANTITY", + "node_id": null, + "text": "interval quantity.value.upper", + "description": "*.value.upper", + "_class": "CDvQuantity", + "attributes": [ + + ], + "list": [ + + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "lower", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/items[at0004]/value/lower", + "type": "C_DV_QUANTITY", + "rm_type_name": "DV_QUANTITY", + "node_id": null, + "text": "interval quantity.value.lower", + "description": "*.value.lower", + "_class": "CDvQuantity", + "attributes": [ + + ], + "list": [ + + ] + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "null_flavour", + "children": [ + { + "archetype_id": null, + "path": "/data[at0001]/items[at0004]/null_flavour", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "interval quantity.null_flavour", + "description": "*.null_flavour", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + }, + { + "archetype_id": "", + "path": "/data[at0001]/items[at0005]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ELEMENT", + "node_id": "at0005", + "text": "interval datetime", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/items[at0005]/value", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_INTERVAL", + "node_id": null, + "text": "interval datetime.value", + "description": "*.value", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "upper", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/items[at0005]/value/upper", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_DATE_TIME", + "node_id": null, + "text": "interval datetime.value.upper", + "description": "*.value.upper", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "lower", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/items[at0005]/value/lower", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_DATE_TIME", + "node_id": null, + "text": "interval datetime.value.lower", + "description": "*.value.lower", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "null_flavour", + "children": [ + { + "archetype_id": null, + "path": "/data[at0001]/items[at0005]/null_flavour", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "interval datetime.null_flavour", + "description": "*.null_flavour", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + }, + { + "archetype_id": "", + "path": "/data[at0001]/items[at0009]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ELEMENT", + "node_id": "at0009", + "text": "choice", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/items[at0009]/value", + "type": "C_DV_QUANTITY", + "rm_type_name": "DV_QUANTITY", + "node_id": null, + "text": "choice.value", + "description": "*.value", + "_class": "CDvQuantity", + "attributes": [ + + ], + "list": [ + { + "magnitude": null, + "precision": null, + "units": "mm[H20]" + }, + { + "magnitude": null, + "precision": null, + "units": "mm[Hg]" + } + ] + }, + { + "archetype_id": "", + "path": "/data[at0001]/items[at0009]/value", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_COUNT", + "node_id": null, + "text": "choice.value", + "description": "*.value", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "null_flavour", + "children": [ + { + "archetype_id": null, + "path": "/data[at0001]/items[at0009]/null_flavour", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "choice.null_flavour", + "description": "*.null_flavour", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + }, + { + "archetype_id": "", + "path": "/data[at0001]/items[at0006]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "CLUSTER", + "node_id": "at0006", + "text": "cluster 1", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_MULTIPLE_ATTRIBUTE", + "rm_attribute_name": "items", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/items[at0006]/items[at0007]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "CLUSTER", + "node_id": "at0007", + "text": "cluster 2", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_MULTIPLE_ATTRIBUTE", + "rm_attribute_name": "items", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/items[at0006]/items[at0007]/items[at0008]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "CLUSTER", + "node_id": "at0008", + "text": "cluster 3", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_MULTIPLE_ATTRIBUTE", + "rm_attribute_name": "items", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/items[at0006]/items[at0007]/items[at0008]/items[at0010]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ELEMENT", + "node_id": "at0010", + "text": "text 2", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/items[at0006]/items[at0007]/items[at0008]/items[at0010]/value", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_TEXT", + "node_id": null, + "text": "text 2.value", + "description": "*.value", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "null_flavour", + "children": [ + { + "archetype_id": null, + "path": "/data[at0001]/items[at0006]/items[at0007]/items[at0008]/items[at0010]/null_flavour", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "text 2.null_flavour", + "description": "*.null_flavour", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "archetype_id": "openEHR-EHR-SECTION.test_all_types.v1", + "path": "/", + "type": "C_ARCHETYPE_ROOT", + "rm_type_name": "SECTION", + "node_id": "at0000", + "text": "Test all types", + "description": "unknown", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_MULTIPLE_ATTRIBUTE", + "rm_attribute_name": "items", + "children": [ + { + "archetype_id": "", + "path": "/items[at0001]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "SECTION", + "node_id": "at0001", + "text": "section 2", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_MULTIPLE_ATTRIBUTE", + "rm_attribute_name": "items", + "children": [ + { + "archetype_id": "", + "path": "/items[at0001]/items[at0002]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "SECTION", + "node_id": "at0002", + "text": "section 3", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_MULTIPLE_ATTRIBUTE", + "rm_attribute_name": "items", + "children": [ + { + "archetype_id": "openEHR-EHR-INSTRUCTION.test_all_types.v1", + "path": "/", + "type": "C_ARCHETYPE_ROOT", + "rm_type_name": "INSTRUCTION", + "node_id": "at0000", + "text": "Test all types", + "description": "unknown", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_MULTIPLE_ATTRIBUTE", + "rm_attribute_name": "activities", + "children": [ + { + "archetype_id": "", + "path": "/activities[at0001]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ACTIVITY", + "node_id": "at0001", + "text": "Current Activity", + "description": "Current Activity", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "action_archetype_id", + "children": [ + { + "archetype_id": "", + "path": "/activities[at0001]/action_archetype_id", + "type": "C_PRIMITIVE_OBJECT", + "rm_type_name": "STRING", + "node_id": null, + "text": "Current Activity.action_archetype_id", + "description": "Current Activity.action_archetype_id", + "_class": "PrimitiveObjectNode", + "item": { + "pattern": "openEHR-EHR-ACTION\\.test_all_types\\.v1" + } + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "description", + "children": [ + { + "archetype_id": "", + "path": "/activities[at0001]/description[at0002]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ITEM_LIST", + "node_id": "at0002", + "text": "Lista", + "description": "@ internal @", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_MULTIPLE_ATTRIBUTE", + "rm_attribute_name": "items", + "children": [ + { + "archetype_id": "", + "path": "/activities[at0001]/description[at0002]/items[at0003]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ELEMENT", + "node_id": "at0003", + "text": "partial date", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/activities[at0001]/description[at0002]/items[at0003]/value", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_DATE", + "node_id": null, + "text": "partial date.value", + "description": "*.value", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/activities[at0001]/description[at0002]/items[at0003]/value/value", + "type": "C_PRIMITIVE_OBJECT", + "rm_type_name": "DATE", + "node_id": null, + "text": "partial date.value.value", + "description": "*.value.value", + "_class": "PrimitiveObjectNode", + "item": { + "pattern": "yyyy-??-XX" + } + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "null_flavour", + "children": [ + { + "archetype_id": null, + "path": "/activities[at0001]/description[at0002]/items[at0003]/null_flavour", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "partial date.null_flavour", + "description": "*.null_flavour", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + }, + { + "archetype_id": "", + "path": "/activities[at0001]/description[at0002]/items[at0004]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ELEMENT", + "node_id": "at0004", + "text": "partial datetime", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/activities[at0001]/description[at0002]/items[at0004]/value", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_DATE_TIME", + "node_id": null, + "text": "partial datetime.value", + "description": "*.value", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/activities[at0001]/description[at0002]/items[at0004]/value/value", + "type": "C_PRIMITIVE_OBJECT", + "rm_type_name": "DATE_TIME", + "node_id": null, + "text": "partial datetime.value.value", + "description": "*.value.value", + "_class": "PrimitiveObjectNode", + "item": { + "pattern": "yyyy-mm-ddTHH:??:??" + } + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "null_flavour", + "children": [ + { + "archetype_id": null, + "path": "/activities[at0001]/description[at0002]/items[at0004]/null_flavour", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "partial datetime.null_flavour", + "description": "*.null_flavour", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "timing", + "children": [ + { + "archetype_id": null, + "path": "/activities[at0001]/timing", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_PARSABLE", + "node_id": null, + "text": "Current Activity.timing", + "description": "Current Activity.timing", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "narrative", + "children": [ + { + "archetype_id": null, + "path": "/narrative", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_TEXT", + "node_id": null, + "text": "Test all types.narrative", + "description": "unknown.narrative", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "expiry_time", + "children": [ + { + "archetype_id": null, + "path": "/expiry_time", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_DATE_TIME", + "node_id": null, + "text": "Test all types.expiry_time", + "description": "unknown.expiry_time", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + }, + { + "archetype_id": "openEHR-EHR-ACTION.test_all_types.v1", + "path": "/", + "type": "C_ARCHETYPE_ROOT", + "rm_type_name": "ACTION", + "node_id": "at0000", + "text": "Test all types", + "description": "unknown", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "ism_transition", + "children": [ + { + "archetype_id": "", + "path": "/ism_transition", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ISM_TRANSITION", + "node_id": "at0003", + "text": "Planned", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "current_state", + "children": [ + { + "archetype_id": "", + "path": "/ism_transition/current_state", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "Planned.current_state", + "description": "*.current_state", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "defining_code", + "children": [ + { + "archetype_id": "", + "path": "/ism_transition/current_state/defining_code", + "type": "C_CODE_PHRASE", + "rm_type_name": "CODE_PHRASE", + "node_id": null, + "text": "Planned.current_state.defining_code", + "description": "*.current_state.defining_code", + "_class": "CCodePhrase", + "attributes": [ + + ], + "terminology_id": "openehr", + "code_list": [ + "526" + ] + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "careflow_step", + "children": [ + { + "archetype_id": "", + "path": "/ism_transition/careflow_step", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "Planned.careflow_step", + "description": "*.careflow_step", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "defining_code", + "children": [ + { + "archetype_id": "", + "path": "/ism_transition/careflow_step/defining_code", + "type": "C_CODE_PHRASE", + "rm_type_name": "CODE_PHRASE", + "node_id": null, + "text": "Planned.careflow_step.defining_code", + "description": "*.careflow_step.defining_code", + "_class": "CCodePhrase", + "attributes": [ + + ], + "terminology_id": "local", + "code_list": [ + "at0003" + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "archetype_id": "", + "path": "/ism_transition", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ISM_TRANSITION", + "node_id": "at0004", + "text": "Active", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "current_state", + "children": [ + { + "archetype_id": "", + "path": "/ism_transition/current_state", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "Active.current_state", + "description": "*.current_state", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "defining_code", + "children": [ + { + "archetype_id": "", + "path": "/ism_transition/current_state/defining_code", + "type": "C_CODE_PHRASE", + "rm_type_name": "CODE_PHRASE", + "node_id": null, + "text": "Active.current_state.defining_code", + "description": "*.current_state.defining_code", + "_class": "CCodePhrase", + "attributes": [ + + ], + "terminology_id": "openehr", + "code_list": [ + "245" + ] + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "careflow_step", + "children": [ + { + "archetype_id": "", + "path": "/ism_transition/careflow_step", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "Active.careflow_step", + "description": "*.careflow_step", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "defining_code", + "children": [ + { + "archetype_id": "", + "path": "/ism_transition/careflow_step/defining_code", + "type": "C_CODE_PHRASE", + "rm_type_name": "CODE_PHRASE", + "node_id": null, + "text": "Active.careflow_step.defining_code", + "description": "*.careflow_step.defining_code", + "_class": "CCodePhrase", + "attributes": [ + + ], + "terminology_id": "local", + "code_list": [ + "at0004" + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "archetype_id": "", + "path": "/ism_transition", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ISM_TRANSITION", + "node_id": "at0005", + "text": "Completed", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "current_state", + "children": [ + { + "archetype_id": "", + "path": "/ism_transition/current_state", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "Completed.current_state", + "description": "*.current_state", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "defining_code", + "children": [ + { + "archetype_id": "", + "path": "/ism_transition/current_state/defining_code", + "type": "C_CODE_PHRASE", + "rm_type_name": "CODE_PHRASE", + "node_id": null, + "text": "Completed.current_state.defining_code", + "description": "*.current_state.defining_code", + "_class": "CCodePhrase", + "attributes": [ + + ], + "terminology_id": "openehr", + "code_list": [ + "532" + ] + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "careflow_step", + "children": [ + { + "archetype_id": "", + "path": "/ism_transition/careflow_step", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "Completed.careflow_step", + "description": "*.careflow_step", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "defining_code", + "children": [ + { + "archetype_id": "", + "path": "/ism_transition/careflow_step/defining_code", + "type": "C_CODE_PHRASE", + "rm_type_name": "CODE_PHRASE", + "node_id": null, + "text": "Completed.careflow_step.defining_code", + "description": "*.careflow_step.defining_code", + "_class": "CCodePhrase", + "attributes": [ + + ], + "terminology_id": "local", + "code_list": [ + "at0005" + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "description", + "children": [ + { + "archetype_id": "", + "path": "/description[at0001]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ITEM_TREE", + "node_id": "at0001", + "text": "Arbol", + "description": "@ internal @", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_MULTIPLE_ATTRIBUTE", + "rm_attribute_name": "items", + "children": [ + { + "archetype_id": "openEHR-EHR-CLUSTER.test_all_types.v1", + "path": "/", + "type": "C_ARCHETYPE_ROOT", + "rm_type_name": "CLUSTER", + "node_id": "at0000", + "text": "Test all types", + "description": "unknown", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_MULTIPLE_ATTRIBUTE", + "rm_attribute_name": "items", + "children": [ + { + "archetype_id": "", + "path": "/items[at0001]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "CLUSTER", + "node_id": "at0001", + "text": "cluster 5", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_MULTIPLE_ATTRIBUTE", + "rm_attribute_name": "items", + "children": [ + { + "archetype_id": "", + "path": "/items[at0001]/items[at0002]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "CLUSTER", + "node_id": "at0002", + "text": "cluster 6", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_MULTIPLE_ATTRIBUTE", + "rm_attribute_name": "items", + "children": [ + { + "archetype_id": "", + "path": "/items[at0001]/items[at0002]/items[at0003]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ELEMENT", + "node_id": "at0003", + "text": "boolean 2", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/items[at0001]/items[at0002]/items[at0003]/value", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_BOOLEAN", + "node_id": null, + "text": "boolean 2.value", + "description": "*.value", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/items[at0001]/items[at0002]/items[at0003]/value/value", + "type": "C_PRIMITIVE_OBJECT", + "rm_type_name": "BOOLEAN", + "node_id": null, + "text": "boolean 2.value.value", + "description": "*.value.value", + "_class": "PrimitiveObjectNode", + "item": { + + } + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "null_flavour", + "children": [ + { + "archetype_id": null, + "path": "/items[at0001]/items[at0002]/items[at0003]/null_flavour", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "boolean 2.null_flavour", + "description": "*.null_flavour", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "time", + "children": [ + { + "archetype_id": null, + "path": "/time", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_DATE_TIME", + "node_id": null, + "text": "Test all types.time", + "description": "unknown.time", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "instruction_details", + "children": [ + { + "archetype_id": null, + "path": "/instruction_details", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "INSTRUCTION_DETAILS", + "node_id": null, + "text": "Test all types.instruction_details", + "description": "unknown.instruction_details", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "instruction_id", + "children": [ + { + "archetype_id": null, + "path": "/instruction_details/instruction_id", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "LOCATABLE_REF", + "node_id": null, + "text": "Test all types.instruction_details.instruction_id", + "description": "unknown.instruction_details.instruction_id", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "id", + "children": [ + { + "archetype_id": null, + "path": "/instruction_details/instruction_id/id", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "OBJECT_VERSION_ID", + "node_id": null, + "text": "Test all types.instruction_details.instruction_id.id", + "description": "unknown.instruction_details.instruction_id.id", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": null, + "path": "/instruction_details/instruction_id/id/value", + "type": "C_PRIMITIVE_OBJECT", + "rm_type_name": "String", + "node_id": null, + "text": "Test all types.instruction_details.instruction_id.id.value", + "description": "unknown.instruction_details.instruction_id.id.value", + "_class": "PrimitiveObjectNode", + "item": { + "list": [ + + ] + } + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "path", + "children": [ + { + "archetype_id": null, + "path": "/instruction_details/instruction_id/path", + "type": "C_PRIMITIVE_OBJECT", + "rm_type_name": "String", + "node_id": null, + "text": "Test all types.instruction_details.instruction_id.path", + "description": "unknown.instruction_details.instruction_id.path", + "_class": "PrimitiveObjectNode", + "item": { + "list": [ + + ] + } + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "activity_id", + "children": [ + { + "archetype_id": null, + "path": "/instruction_details/activity_id", + "type": "C_PRIMITIVE_OBJECT", + "rm_type_name": "String", + "node_id": null, + "text": "Test all types.instruction_details.activity_id", + "description": "unknown.instruction_details.activity_id", + "_class": "PrimitiveObjectNode", + "item": { + "list": [ + + ] + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "archetype_id": "openEHR-EHR-ADMIN_ENTRY.test_all_types.v1", + "path": "/", + "type": "C_ARCHETYPE_ROOT", + "rm_type_name": "ADMIN_ENTRY", + "node_id": "at0000", + "text": "Test all types", + "description": "unknown", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "data", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ITEM_SINGLE", + "node_id": "at0001", + "text": "Unico(a)", + "description": "@ internal @", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "item", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/item[at0002]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ELEMENT", + "node_id": "at0002", + "text": "count 3", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/data[at0001]/item[at0002]/value", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_COUNT", + "node_id": null, + "text": "count 3.value", + "description": "*.value", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "null_flavour", + "children": [ + { + "archetype_id": null, + "path": "/data[at0001]/item[at0002]/null_flavour", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "count 3.null_flavour", + "description": "*.null_flavour", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } +}{ + "language": "ISO_639-1::en", + "concept": "Test all types", + "purpose": "Not Specified", + "uid": "4c0d4207-562f-41d8-bbdd-3ef8b69edf61", + "template_id": "test_all_types.en.v1", + "definition": { + "archetype_id": "openEHR-EHR-COMPOSITION.test_all_types.v1", + "path": "/", + "type": "", + "rm_type_name": "COMPOSITION", + "node_id": "at0000", + "text": "Test all types", + "description": "unknown", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "category", + "children": [ + { + "archetype_id": "", + "path": "/category", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "Test all types.category", + "description": "unknown.category", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "defining_code", + "children": [ + { + "archetype_id": "", + "path": "/category/defining_code", + "type": "C_CODE_PHRASE", + "rm_type_name": "CODE_PHRASE", + "node_id": null, + "text": "Test all types.category.defining_code", + "description": "unknown.category.defining_code", + "_class": "CCodePhrase", + "attributes": [ + + ], + "terminology_id": "openehr", + "code_list": [ + "433" + ] + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "context", + "children": [ + { + "archetype_id": "", + "path": "/context", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "EVENT_CONTEXT", + "node_id": null, + "text": "Test all types.context", + "description": "unknown.context", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "other_context", + "children": [ + { + "archetype_id": "", + "path": "/context/other_context[at0004]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ITEM_SINGLE", + "node_id": "at0004", + "text": "Unico(a)", + "description": "@ internal @", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "item", + "children": [ + { + "archetype_id": "", + "path": "/context/other_context[at0004]/item[at0005]", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "ELEMENT", + "node_id": "at0005", + "text": "context coded text", + "description": "*", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": "", + "path": "/context/other_context[at0004]/item[at0005]/value", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "context coded text.value", + "description": "*.value", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "defining_code", + "children": [ + { + "archetype_id": "", + "path": "/context/other_context[at0004]/item[at0005]/value/defining_code", + "type": "C_CODE_PHRASE", + "rm_type_name": "CODE_PHRASE", + "node_id": null, + "text": "context coded text.value.defining_code", + "description": "*.value.defining_code", + "_class": "CCodePhrase", + "attributes": [ + + ], + "terminology_id": "local", + "code_list": [ + "at0006", + "at0007", + "at0008" + ] + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "null_flavour", + "children": [ + { + "archetype_id": null, + "path": "/context/other_context[at0004]/item[at0005]/null_flavour", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "context coded text.null_flavour", + "description": "*.null_flavour", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "setting", + "children": [ + { + "archetype_id": null, + "path": "/context/setting", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "Test all types.context.setting", + "description": "unknown.context.setting", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "location", + "children": [ + { + "archetype_id": null, + "path": "/context/location", + "type": "C_PRIMITIVE_OBJECT", + "rm_type_name": "String", + "node_id": null, + "text": "Test all types.context.location", + "description": "unknown.context.location", + "_class": "PrimitiveObjectNode", + "item": { + "list": [ + + ] + } + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "start_time", + "children": [ + { + "archetype_id": null, + "path": "/context/start_time", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_DATE_TIME", + "node_id": null, + "text": "Test all types.context.start_time", + "description": "unknown.context.start_time", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "end_time", + "children": [ + { + "archetype_id": null, + "path": "/context/end_time", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_DATE_TIME", + "node_id": null, + "text": "Test all types.context.end_time", + "description": "unknown.context.end_time", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "participations", + "children": [ + { + "archetype_id": null, + "path": "/context/participations", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "PARTICIPATION", + "node_id": null, + "text": "Test all types.context.participations", + "description": "unknown.context.participations", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "function", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/function", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_TEXT", + "node_id": null, + "text": "Test all types.context.participations.function", + "description": "unknown.context.participations.function", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "mode", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/mode", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "Test all types.context.participations.mode", + "description": "unknown.context.participations.mode", + "_class": "ObjectNode", "attributes": [ ] } ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "time", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/time", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_INTERVAL", + "node_id": null, + "text": "Test all types.context.participations.time", + "description": "unknown.context.participations.time", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "lower", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/time/lower", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_DATE_TIME", + "node_id": null, + "text": "Test all types.context.participations.time.lower", + "description": "unknown.context.participations.time.lower", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "upper", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/time/upper", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_DATE_TIME", + "node_id": null, + "text": "Test all types.context.participations.time.upper", + "description": "unknown.context.participations.time.upper", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "performer", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "PARTY_IDENTIFIED", + "node_id": null, + "text": "Test all types.context.participations.performer", + "description": "unknown.context.participations.performer", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "external_ref", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer/external_ref", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "PARTY_REF", + "node_id": null, + "text": "Test all types.context.participations.performer.external_ref", + "description": "unknown.context.participations.performer.external_ref", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "id", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer/external_ref/id", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "OBJECT_VERSION_ID", + "node_id": null, + "text": "Test all types.context.participations.performer.external_ref.id", + "description": "unknown.context.participations.performer.external_ref.id", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer/external_ref/id/value", + "type": "C_PRIMITIVE_OBJECT", + "rm_type_name": "String", + "node_id": null, + "text": "Test all types.context.participations.performer.external_ref.id.value", + "description": "unknown.context.participations.performer.external_ref.id.value", + "_class": "PrimitiveObjectNode", + "item": { + "list": [ + + ] + } + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "name", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer/name", + "type": "C_PRIMITIVE_OBJECT", + "rm_type_name": "String", + "node_id": null, + "text": "Test all types.context.participations.performer.name", + "description": "unknown.context.participations.performer.name", + "_class": "PrimitiveObjectNode", + "item": { + "list": [ + + ] + } + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "identifiers", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer/identifiers", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_IDENTIFIER", + "node_id": null, + "text": "Test all types.context.participations.performer.identifiers", + "description": "unknown.context.participations.performer.identifiers", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + }, + { + "archetype_id": null, + "path": "/context/participations/performer", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "PARTY_RELATED", + "node_id": null, + "text": "Test all types.context.participations.performer", + "description": "unknown.context.participations.performer", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "external_ref", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer/external_ref", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "PARTY_REF", + "node_id": null, + "text": "Test all types.context.participations.performer.external_ref", + "description": "unknown.context.participations.performer.external_ref", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "id", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer/external_ref/id", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "OBJECT_VERSION_ID", + "node_id": null, + "text": "Test all types.context.participations.performer.external_ref.id", + "description": "unknown.context.participations.performer.external_ref.id", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer/external_ref/id/value", + "type": "C_PRIMITIVE_OBJECT", + "rm_type_name": "String", + "node_id": null, + "text": "Test all types.context.participations.performer.external_ref.id.value", + "description": "unknown.context.participations.performer.external_ref.id.value", + "_class": "PrimitiveObjectNode", + "item": { + "list": [ + + ] + } + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "name", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer/name", + "type": "C_PRIMITIVE_OBJECT", + "rm_type_name": "String", + "node_id": null, + "text": "Test all types.context.participations.performer.name", + "description": "unknown.context.participations.performer.name", + "_class": "PrimitiveObjectNode", + "item": { + "list": [ + + ] + } + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "identifiers", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer/identifiers", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_IDENTIFIER", + "node_id": null, + "text": "Test all types.context.participations.performer.identifiers", + "description": "unknown.context.participations.performer.identifiers", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + }, + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "relationship", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer/relationship", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "DV_CODED_TEXT", + "node_id": null, + "text": "Test all types.context.participations.performer.relationship", + "description": "unknown.context.participations.performer.relationship", + "_class": "ObjectNode", + "attributes": [ + + ] + } + ] + } + ] + }, + { + "archetype_id": null, + "path": "/context/participations/performer", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "PARTY_SELF", + "node_id": null, + "text": "Test all types.context.participations.performer", + "description": "unknown.context.participations.performer", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "external_ref", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer/external_ref", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "PARTY_REF", + "node_id": null, + "text": "Test all types.context.participations.performer.external_ref", + "description": "unknown.context.participations.performer.external_ref", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "id", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer/external_ref/id", + "type": "C_COMPLEX_OBJECT", + "rm_type_name": "OBJECT_VERSION_ID", + "node_id": null, + "text": "Test all types.context.participations.performer.external_ref.id", + "description": "unknown.context.participations.performer.external_ref.id", + "_class": "ObjectNode", + "attributes": [ + { + "type": "C_SINGLE_ATTRIBUTE", + "rm_attribute_name": "value", + "children": [ + { + "archetype_id": null, + "path": "/context/participations/performer/external_ref/id/value", + "type": "C_PRIMITIVE_OBJECT", + "rm_type_name": "String", + "node_id": null, + "text": "Test all types.context.participations.performer.external_ref.id.value", + "description": "unknown.context.participations.performer.external_ref.id.value", + "_class": "PrimitiveObjectNode", + "item": { + "list": [ + + ] + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] } ] } diff --git a/gradle.properties b/gradle.properties index 34ff9b8..366a340 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ -version = 2.0.4 +version = 2.0.5 group = com.cabolabs \ No newline at end of file diff --git a/opt.bat b/opt.bat index eb450a0..4f5b6af 100644 --- a/opt.bat +++ b/opt.bat @@ -1 +1 @@ -java -cp "./lib/*;%GROOVY_HOME%/embeddable/groovy-all-2.4.7.jar;build/libs/opt-2.0.3.jar" com.cabolabs.openehr.opt.Main %1 %2 %3 %4 %5 %6 %7 \ No newline at end of file +java -cp "./lib/*;%GROOVY_HOME%/embeddable/groovy-all-2.4.7.jar;build/libs/opt-2.0.5.jar" com.cabolabs.openehr.opt.Main %1 %2 %3 %4 %5 %6 %7 \ No newline at end of file diff --git a/opt.sh b/opt.sh index 27a4f5e..6b8e30f 100755 --- a/opt.sh +++ b/opt.sh @@ -1 +1 @@ -java -cp "./lib/*:$GROOVY_HOME/lib/*:build/libs/opt-2.0.3.jar" com.cabolabs.openehr.opt.Main $1 $2 $3 $4 $5 $6 $7 +java -cp "./lib/*:$GROOVY_HOME/lib/*:build/libs/opt-2.0.5.jar" com.cabolabs.openehr.opt.Main $1 $2 $3 $4 $5 $6 $7 diff --git a/src/main/groovy/com/cabolabs/openehr/opt/model/OperationalTemplate.groovy b/src/main/groovy/com/cabolabs/openehr/opt/model/OperationalTemplate.groovy index 48b149c..d55d196 100644 --- a/src/main/groovy/com/cabolabs/openehr/opt/model/OperationalTemplate.groovy +++ b/src/main/groovy/com/cabolabs/openehr/opt/model/OperationalTemplate.groovy @@ -302,6 +302,123 @@ class OperationalTemplate { completeRecursive(this.definition) this.isCompleted = true } + + // Processes a single node alternative type + private completeNodeSingle(AttributeNode atnc, String attr, String type) + { + def aom_type, obnc + if (Model.primitive_types.contains(type)) + { + aom_type = 'C_PRIMITIVE_OBJECT' + + // NOTE: this injected P.O.N. should have an item CPrimitive constraint, it's required by the AOM + obnc = new PrimitiveObjectNode() + + def primitive_type = 'com.cabolabs.openehr.opt.model.primitive.C'+ type // e.g. CString + obnc.item = Class.forName(primitive_type).newInstance() // NOTE: we can't add any constraints to the CPrimitive, so any value is allowed + } + else + { + aom_type = 'C_COMPLEX_OBJECT' + obnc = new ObjectNode() + } + + // NOTE: atnc.parent = obn + + // avoid // on root paths + def path_sep = "/" + if (atnc.parent.path == "/") path_sep = "" + + obnc.owner = this // this template + obnc.rmTypeName = type + obnc.type = aom_type + obnc.templatePath = atnc.parent.templatePath + path_sep + attr // same paths as the attr since this has no nodeId + obnc.path = atnc.parent.path + path_sep + attr + obnc.dataPath = atnc.parent.dataPath + path_sep + attr + obnc.templateDataPath = atnc.parent.templateDataPath + path_sep + attr + obnc.parent = atnc + obnc.occurrences = new IntervalInt( // TODO: check the RM to see the default RM occurrences for this object + upperIncluded: true, + lowerIncluded: true, + upperUnbounded: false, + lowerUnbounded: false, + lower: 0, + upper: 1 + ) + + // TODO: default_values + + // Add dummy text and description for the new nodes + obnc.text = obnc.parent.parent.text +'.'+ obnc.parent.rmAttributeName + obnc.description = obnc.parent.parent.description +'.'+ obnc.parent.rmAttributeName + + atnc.children << obnc + + + // Add nodes to the OPT + // supports many alternative nodes with the same path + // TEST: should the key be templatePath or path? + if (!this.nodes[obnc.templatePath]) this.nodes[obnc.templatePath] = [] + this.nodes[obnc.templatePath] << obnc + + + // This while assigns the current generated node to all it's ascedant nodes, + // in their flat list, so when getting any of those nodes, the new injected + // node will be there and can be retrieved by it's path. + def parent_obn = atnc.parent + while (parent_obn) + { + if (!parent_obn.nodes[obnc.path]) parent_obn.nodes[obnc.path] = [] + parent_obn.nodes[obnc.path] << obnc + + parent_obn = parent_obn?.parent?.parent + } + } + + private completeNodeAlternatives(AttributeNode atnc, String attr, List types) + { + types.each { type -> + + completeNodeSingle(atnc, attr, type) + } + } + + private completeAttribute(ObjectNode obn, String attr, Object type_or_types) + { + // avoid // on root paths + def path_sep = "/" + if (obn.path == "/") path_sep = "" + + def atnc = new AttributeNode( + rmAttributeName: attr, + type: 'C_SINGLE_ATTRIBUTE', + parent: obn, + path: obn.path + path_sep + attr, + dataPath: obn.dataPath + path_sep + attr, + templatePath: obn.templatePath + path_sep + attr, + templateDataPath: obn.templateDataPath + path_sep + attr, + existence: new IntervalInt( // TODO: check the RM to see the RM existence for this attribute + upperIncluded: true, + lowerIncluded: true, + upperUnbounded: false, + lowerUnbounded: false, + lower: 0, + upper: 1 + ) + ) + + if (type_or_types instanceof List) + { + completeNodeAlternatives(atnc, attr, type_or_types) + } + else + { + completeNodeSingle(atnc, attr, type_or_types) + } + + obn.attributes << atnc + } + private completeRecursive(ObjectNode obn) { // attr name -> type @@ -317,6 +434,10 @@ class OperationalTemplate { if (!obn.attributes.find{ it.rmAttributeName == attr }) { // TODO: support that type could be a list of possible types (inheritance structure only with concrete types), I guess here we should pick one or just add all the alternative types. + + completeAttribute(obn, attr, type) // type can be a list + + /* if (Model.primitive_types.contains(type)) { aom_type = 'C_PRIMITIVE_OBJECT' @@ -333,8 +454,6 @@ class OperationalTemplate { obnc = new ObjectNode() } - println attr - // avoid // on root paths path_sep = "/" if (obn.path == "/") path_sep = "" @@ -357,7 +476,13 @@ class OperationalTemplate { ) ) - obnc.owner = this + + completeNodeSingle(atnc, attr, type) + */ + + + /* + obnc.owner = this // this template obnc.rmTypeName = type obnc.type = aom_type obnc.templatePath = obn.templatePath +path_sep+ attr // same paths as the attr since this has no nodeId @@ -381,14 +506,16 @@ class OperationalTemplate { obnc.description = obnc.parent.parent.description +'.'+ obnc.parent.rmAttributeName atnc.children << obnc + */ + // Add nodes to the OPT // supports many alternative nodes with the same path // TEST: should the key be templatePath or path? - if (!this.nodes[obnc.templatePath]) this.nodes[obnc.templatePath] = [] - this.nodes[obnc.templatePath] << obnc + // if (!this.nodes[obnc.templatePath]) this.nodes[obnc.templatePath] = [] + // this.nodes[obnc.templatePath] << obnc - obn.attributes << atnc +// obn.attributes << atnc // NOTE: the code below seted the node to the parent but not to the archetype root // and all parent nodes, like the OPT parser does with the setFlatNodes(), @@ -403,6 +530,7 @@ class OperationalTemplate { //if (!obn.nodes[obnc.path]) obn.nodes[obnc.path] = [] //obn.nodes[obnc.path] << obnc +/* // This while assigns the current generated node to all it's ascedant nodes, // in their flat list, so when getting any of those nodes, the new injected // node will be there and can be retrieved by it's path. @@ -414,6 +542,7 @@ class OperationalTemplate { parent_obn = parent_obn?.parent?.parent } +*/ // TODO: info log //println "adding new node ${obnc.templatePath} to node ${obn.templatePath}" diff --git a/src/main/groovy/com/cabolabs/openehr/rm_1_0_2/Model.groovy b/src/main/groovy/com/cabolabs/openehr/rm_1_0_2/Model.groovy index 5dbd080..d6cf527 100644 --- a/src/main/groovy/com/cabolabs/openehr/rm_1_0_2/Model.groovy +++ b/src/main/groovy/com/cabolabs/openehr/rm_1_0_2/Model.groovy @@ -84,13 +84,35 @@ class Model { 'path': 'String' ], - 'PARTICIPATION': [ + PARTICIPATION: [ function: 'DV_TEXT', mode: 'DV_CODED_TEXT', time: 'DV_INTERVAL', // NOTE: in complete() the list in the type is not supported performer: ['PARTY_IDENTIFIED', 'PARTY_RELATED', 'PARTY_SELF'] ], + PARTY_IDENTIFIED: [ + // inherited from PARTY_PROXY + external_ref: 'PARTY_REF', + + name: 'String', + identifiers: 'DV_IDENTIFIER' // multiple + ], + PARTY_RELATED: [ + // inherited from PARTY_PROXY + external_ref: 'PARTY_REF', + + // inherited from PARTY_IDENTIFIED + name: 'String', + identifiers: 'DV_IDENTIFIER', // multiple + + relationship: 'DV_CODED_TEXT' + ], + PARTY_SELF: [ + // inherited from PARTY_PROXY + external_ref: 'PARTY_REF' + ], + // DVs: this is for the DV_INTERVAL types here, to complete it's internal structs // NOTE: need to match specific type of DV_INTERVAL diff --git a/src/test/groovy/com/cabolabs/openehr/opt/OPTParserTest.groovy b/src/test/groovy/com/cabolabs/openehr/opt/OPTParserTest.groovy index 99926f8..4281350 100644 --- a/src/test/groovy/com/cabolabs/openehr/opt/OPTParserTest.groovy +++ b/src/test/groovy/com/cabolabs/openehr/opt/OPTParserTest.groovy @@ -182,7 +182,9 @@ class OPTParserTest extends GroovyTestCase { opt.complete() toJson.serialize(opt) def complete = toJson.get(true) - new File('a_opt_complete.json') << toJson.get(true) + def json = toJson.get(true) + new File('a_opt_complete.json') << json + println json assert incomplete.size() < complete.size() }