Resource Package
| the version of the Resource package described below is used only in ADL 1.4 archetypes, i.e. via the AOM 1.4 archetype model. A newer version of this package is defined in the openEHR Resource Specfication in the BASE component, and is used in ADL 2 archetypes (via the AOM 2 archetype model) and in the Task Planning specification. The newer specification is almost completely backwards compatible, enabling for example easy upgrading of ADL1.4 archetype meta-data to the ADL2 form. It also specifies more comprehensive meta-data as well as annotations. The new specification should be used for all relevant needs in the future, with the older form here retained only while needed by AOM 1.4 based archetypes and tools. |
Overview
The common.resource package defines the structure and semantics of the general notion of an online resource which has been created by a human author, and consequently for which natural language is a factor. The package is illustrated below.
Natural Languages and Translation
Authored resources contain natural language elements, and are therefore created in some original language, recorded in the orginal_language attribute of the AUTHORED_RESOURCE class. Information about translations is included in the translations attribute, which allows for one or more sets of translation details to be recorded. A resource is translated by doing the following:
-
translating every language-dependent element to the new language;
-
adding a new
TRANSLATION_DETAILSinstance to translations, containing details about the translator, organisation, quality assurance and so on. -
any further translations to language-specific elements in a instances of descendent type of
AUTHORED_RESOURCE.
The languages_available function provides a complete list of languages in the resource.
Meta-data
What is normally considered the 'meta-data' of a resource, i.e. its author, date of creation, purpose, and other descriptive items, is described by the RESOURCE_DESCRIPTION and RESOURCE_DESCRIPTION_ITEM classes. The parts of this that are in natural language, and therefore may require translated versions, are represented in instances of the RESOURCE_DESCRIPTION_ITEM class. Thus, if a RESOURCE_DESCRIPTION has more than one RESOURCE_DESCRIPTION_ITEM, each of these should carry exactly the same information in a different natural language.
The AUTHORED_RESOURCE.description attribute is optional, allowing for resources with no meta-data at all, e.g. resources in a partial state of construction. The translations attribute may still be required, since there may be other parts of the resource object (specified by a class into which AUTHORED_RESOURCE is inherited) that are language-dependent.
Revision History
When the resource is considered to be in a state where changes to it should be controlled, the is_controlled attribute is set to True, and all subsequent changes should have an audit trail recorded. Usually controlled resources would be managed in a versioned repository (e.g. implemented by CVS, Subversion or similar systems), and audit information will be stored somewhere in the repository (e.g. in version control files). The revision_history attribute defined in the AUTHROED_RESOURCE class is intended to act as a documentary copy of the revision history as known inside the repository, for the benefit of users of the resource. Given that resources in different places may well be managed in different kinds of repositories, having a copy of the revision history in a standardised form within the resource enables it to be used interoperably by authoring and other tools.
Every change to a resource committed to the relevant repository causes a new addition to the revision_history.
Class Descriptions
AUTHORED_RESOURCE Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
AUTHORED_RESOURCE (abstract) |
|
|---|---|---|
Description |
Abstract idea of an online resource created by a human author. |
|
Attributes |
Signature |
Meaning |
1..1 |
original_language: |
Language in which this resource was initially authored. Although there is no language primacy of resources overall, the language of original authoring is required to ensure natural language translations can preserve quality. Language is relevant in both the description and ontology sections. |
0..1 |
is_controlled: |
True if this resource is under any kind of change control (even file copying), in which case revision history is created. |
0..1 |
translations: |
List of details for each natural-language translation made of this resource, keyed by language. For each translation listed here, there must be corresponding sections in all language-dependent parts of the resource. The |
0..1 |
description: |
Description and lifecycle information of the resource. |
0..1 |
revision_history: |
The revision history of the resource. Only required if |
Functions |
Signature |
Meaning |
1..1 |
current_revision (): |
Most recent revision in |
1..1 |
Total list of languages available in this resource, derived from |
|
Invariants |
Original_language_valid: |
|
Languages_available_valid: |
||
Revision_history_valid: |
||
Current_revision_valid: |
||
Translations_valid: |
||
Description_valid: |
||
| AUTHORED_RESOURCE (abstract) | |
|---|---|
Abstract idea of an online resource created by a human author. |
|
Attributes |
|
original_language: |
Language in which this resource was initially authored. Although there is no language primacy of resources overall, the language of original authoring is required to ensure natural language translations can preserve quality. Language is relevant in both the description and ontology sections. |
is_controlled: |
True if this resource is under any kind of change control (even file copying), in which case revision history is created. |
translations: |
List of details for each natural-language translation made of this resource, keyed by language. For each translation listed here, there must be corresponding sections in all language-dependent parts of the resource. The |
description: |
Description and lifecycle information of the resource. |
revision_history: |
The revision history of the resource. Only required if |
Functions |
|
current_revision (): |
Most recent revision in |
Total list of languages available in this resource, derived from |
|
Invariants |
|
Original_language_valid: |
|
Languages_available_valid: |
|
Revision_history_valid: |
|
Current_revision_valid: |
|
Translations_valid: |
|
Description_valid: |
|
{
"name": "AUTHORED_RESOURCE",
"documentation": "Abstract idea of an online resource created by a human author. \n",
"is_abstract": true,
"properties": {
"original_language": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "original_language",
"documentation": "Language in which this resource was initially authored. Although there is no language primacy of resources overall, the language of original authoring is required to ensure natural language translations can preserve quality. Language is relevant in both the description and ontology sections. ",
"is_mandatory": true,
"type": "CODE_PHRASE"
},
"is_controlled": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "is_controlled",
"documentation": "True if this resource is under any kind of change control (even file copying), in which case revision history is created. ",
"type": "Boolean"
},
"translations": {
"_type": "P_BMM_GENERIC_PROPERTY",
"name": "translations",
"documentation": "List of details for each natural-language translation made of this resource, keyed by language. For each translation listed here, there must be corresponding sections in all language-dependent parts of the resource. The `_original_language_` does not appear in this list.",
"type_def": {
"root_type": "Hash",
"generic_parameters": [
"String",
"TRANSLATION_DETAILS"
]
}
},
"description": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "description",
"documentation": "Description and lifecycle information of the resource.",
"type": "RESOURCE_DESCRIPTION"
},
"revision_history": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "revision_history",
"documentation": "The revision history of the resource. Only required if `_is_controlled_ = True` (avoids large revision histories for informal or private editing situations). ",
"type": "REVISION_HISTORY"
}
},
"functions": {
"current_revision": {
"name": "current_revision",
"documentation": "Most recent revision in `_revision_history_` if `_is_controlled_` else (uncontrolled) . ",
"post_conditions": {
"Post": "Result = revision_history.most_recent_version"
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "String"
}
},
"languages_available": {
"name": "languages_available",
"documentation": "Total list of languages available in this resource, derived from `_original_language_` and `_translations_`.\n",
"result": {
"_type": "P_BMM_CONTAINER_TYPE",
"container_type": "List",
"type": "String"
}
}
},
"invariants": {
"Original_language_valid": "code_set (Code_set_id_languages).has_code (original_language.as_string)",
"Languages_available_valid": "languages_available.has (original_language)",
"Revision_history_valid": "is_controlled xor revision_history = Void",
"Current_revision_valid": "(current_revision /= Void and not is_controlled) implies current_revision.is_equal (“(uncontrolled)”)",
"Translations_valid": "translations /= Void implies (not translations.is_empty and not translations.has (orginal_language.code_string))",
"Description_valid": "translations /= Void implies (description.details.for_all (d |\ntranslations.has_key (d.language.code_string)))"
}
}
TRANSLATION_DETAILS Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
TRANSLATION_DETAILS |
|
|---|---|---|
Description |
Class providing details of a natural language translation. |
|
Attributes |
Signature |
Meaning |
1..1 |
language: |
Language of the translation. |
1..1 |
Translator name and other demographic details. |
|
0..1 |
accreditaton: |
Accreditation of translator, usually a national translator’s registration or association membership id. |
0..1 |
Any other meta-data. |
|
Invariants |
Language_valid: |
|
| TRANSLATION_DETAILS | |
|---|---|
Class providing details of a natural language translation. |
|
Attributes |
|
language: |
Language of the translation. |
Translator name and other demographic details. |
|
accreditaton: |
Accreditation of translator, usually a national translator’s registration or association membership id. |
Any other meta-data. |
|
Invariants |
|
Language_valid: |
|
{
"name": "TRANSLATION_DETAILS",
"documentation": "Class providing details of a natural language translation. ",
"properties": {
"language": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "language",
"documentation": "Language of the translation.",
"is_mandatory": true,
"type": "CODE_PHRASE"
},
"author": {
"_type": "P_BMM_GENERIC_PROPERTY",
"name": "author",
"documentation": "Translator name and other demographic details.",
"is_mandatory": true,
"type_def": {
"root_type": "Hash",
"generic_parameters": [
"String",
"String"
]
}
},
"accreditaton": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "accreditaton",
"documentation": "Accreditation of translator, usually a national translator's registration or association membership id.",
"type": "String"
},
"other_details": {
"_type": "P_BMM_GENERIC_PROPERTY",
"name": "other_details",
"documentation": "Any other meta-data.",
"type_def": {
"root_type": "Hash",
"generic_parameters": [
"String",
"String"
]
}
}
},
"invariants": {
"Language_valid": "code_set (Code_set_id_languages).has_code (language)"
}
}
RESOURCE_DESCRIPTION Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
RESOURCE_DESCRIPTION |
|
|---|---|---|
Description |
Defines the descriptive meta-data of a resource. |
|
Attributes |
Signature |
Meaning |
1..1 |
Original author of this resource, with all relevant details, including organisation. |
|
0..1 |
Other contributors to the resource, probably listed in |
|
1..1 |
lifecycle_state: |
Lifecycle state of the resource, typically including states such as: |
0..1 |
resource_package_uri: |
URI of package to which this resource belongs. |
0..1 |
Additional non language-senstive resource meta-data, as a list of name/value pairs. |
|
1..1 |
parent_resource: |
Reference to owning resource. |
1..1 |
details: |
Details of all parts of resource description that are natural language-dependent, keyed by language code. |
Invariants |
Original_author_valid: |
|
Lifecycle_state_valid: |
||
Details_valid: |
||
Language_valid: |
||
Parent_resource_valid: |
||
| RESOURCE_DESCRIPTION | |
|---|---|
Defines the descriptive meta-data of a resource. |
|
Attributes |
|
Original author of this resource, with all relevant details, including organisation. |
|
Other contributors to the resource, probably listed in |
|
lifecycle_state: |
Lifecycle state of the resource, typically including states such as: |
resource_package_uri: |
URI of package to which this resource belongs. |
Additional non language-senstive resource meta-data, as a list of name/value pairs. |
|
parent_resource: |
Reference to owning resource. |
details: |
Details of all parts of resource description that are natural language-dependent, keyed by language code. |
Invariants |
|
Original_author_valid: |
|
Lifecycle_state_valid: |
|
Details_valid: |
|
Language_valid: |
|
Parent_resource_valid: |
|
{
"name": "RESOURCE_DESCRIPTION",
"documentation": "Defines the descriptive meta-data of a resource.",
"properties": {
"original_author": {
"_type": "P_BMM_GENERIC_PROPERTY",
"name": "original_author",
"documentation": "Original author of this resource, with all relevant details, including organisation.",
"is_mandatory": true,
"type_def": {
"root_type": "Hash",
"generic_parameters": [
"String",
"String"
]
}
},
"other_contributors": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "other_contributors",
"documentation": "Other contributors to the resource, probably listed in `'name <email>'` form. ",
"type_def": {
"container_type": "List",
"type": "String"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
},
"lifecycle_state": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "lifecycle_state",
"documentation": "Lifecycle state of the resource, typically including states such as: `initial | submitted | experimental | awaiting_approval | approved | superseded | obsolete`.",
"is_mandatory": true,
"type": "String"
},
"resource_package_uri": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "resource_package_uri",
"documentation": "URI of package to which this resource belongs.",
"type": "String"
},
"other_details": {
"_type": "P_BMM_GENERIC_PROPERTY",
"name": "other_details",
"documentation": "Additional non language-senstive resource meta-data, as a list of name/value pairs. ",
"type_def": {
"root_type": "Hash",
"generic_parameters": [
"String",
"String"
]
}
},
"parent_resource": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "parent_resource",
"documentation": "Reference to owning resource. ",
"is_mandatory": true,
"type": "AUTHORED_RESOURCE",
"default": "0..1"
},
"details": {
"_type": "P_BMM_GENERIC_PROPERTY",
"name": "details",
"documentation": "Details of all parts of resource description that are natural language-dependent, keyed by language code. ",
"is_mandatory": true,
"type_def": {
"root_type": "Hash",
"generic_parameters": [
"String",
"RESOURCE_DESCRIPTION_ITEM"
]
}
}
},
"invariants": {
"Original_author_valid": "not original_author.is_empty",
"Lifecycle_state_valid": "not lifecycle_state.is_empty",
"Details_valid": "not details.is_empty",
"Language_valid": "parent_resource /= Void implies details.for_all (d | parent_resource.languages_available.has (d.language.code_string))",
"Parent_resource_valid": "parent_resource /= Void implies parent_resource.description = self"
}
}
RESOURCE_DESCRIPTION_ITEM Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
RESOURCE_DESCRIPTION_ITEM |
|
|---|---|---|
Description |
Language-specific detail of resource description. When a resource is translated for use in another language environment, each |
|
Attributes |
Signature |
Meaning |
1..1 |
language: |
The localised language in which the items in this description item are written. Coded from openEHR code set |
1..1 |
purpose: |
Purpose of the resource. |
0..1 |
Keywords which characterise this resource, used e.g. for indexing and searching. |
|
0..1 |
use: |
Description of the uses of the resource, i.e. contexts in which it could be used. |
0..1 |
misuse: |
Description of any misuses of the resource, i.e. contexts in which it should not be used. |
0..1 |
copyright: |
Optional copyright statement for the resource as a knowledge resource. |
0..1 |
URIs of original clinical document(s) or description of which resource is a formalisation, in the language of this description item; keyed by meaning. |
|
0..1 |
Additional language-senstive resource metadata, as a list of name/value pairs. |
|
Invariants |
Language_valid: |
|
Purpose_valid: |
||
Use_valid: |
||
misuse_valid: |
||
copyright_valid: |
||
| RESOURCE_DESCRIPTION_ITEM | |
|---|---|
Language-specific detail of resource description. When a resource is translated for use in another language environment, each |
|
Attributes |
|
language: |
The localised language in which the items in this description item are written. Coded from openEHR code set |
purpose: |
Purpose of the resource. |
Keywords which characterise this resource, used e.g. for indexing and searching. |
|
use: |
Description of the uses of the resource, i.e. contexts in which it could be used. |
misuse: |
Description of any misuses of the resource, i.e. contexts in which it should not be used. |
copyright: |
Optional copyright statement for the resource as a knowledge resource. |
URIs of original clinical document(s) or description of which resource is a formalisation, in the language of this description item; keyed by meaning. |
|
Additional language-senstive resource metadata, as a list of name/value pairs. |
|
Invariants |
|
Language_valid: |
|
Purpose_valid: |
|
Use_valid: |
|
misuse_valid: |
|
copyright_valid: |
|
{
"name": "RESOURCE_DESCRIPTION_ITEM",
"documentation": "Language-specific detail of resource description. When a resource is translated for use in another language environment, each `RESOURCE_DESCRIPTION_ITEM` needs to be copied and translated into the new language.",
"properties": {
"language": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "language",
"documentation": "The localised language in which the items in this description item are written. Coded from openEHR code set `languages`.",
"is_mandatory": true,
"type": "CODE_PHRASE"
},
"purpose": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "purpose",
"documentation": "Purpose of the resource.",
"is_mandatory": true,
"type": "String"
},
"keywords": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "keywords",
"documentation": "Keywords which characterise this resource, used e.g. for indexing and searching. ",
"type_def": {
"container_type": "List",
"type": "String"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
},
"use": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "use",
"documentation": "Description of the uses of the resource, i.e. contexts in which it could be used. \n",
"type": "String"
},
"misuse": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "misuse",
"documentation": "Description of any misuses of the resource, i.e. contexts in which it should not be used.",
"type": "String"
},
"copyright": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "copyright",
"documentation": "Optional copyright statement for the resource as a knowledge resource. \n",
"type": "String"
},
"original_resource_uri": {
"_type": "P_BMM_GENERIC_PROPERTY",
"name": "original_resource_uri",
"documentation": "URIs of original clinical document(s) or description of which resource is a formalisation, in the language of this description item; keyed by meaning. ",
"type_def": {
"root_type": "Hash",
"generic_parameters": [
"String",
"String"
]
}
},
"other_details": {
"_type": "P_BMM_GENERIC_PROPERTY",
"name": "other_details",
"documentation": "Additional language-senstive resource metadata, as a list of name/value pairs. ",
"type_def": {
"root_type": "Hash",
"generic_parameters": [
"String",
"String"
]
}
}
},
"invariants": {
"Language_valid": "code_set (Code_set_id_languages).has_code (language)",
"Purpose_valid": "not purpose.is_empty",
"Use_valid": "use /= Void implies not use.is_empty",
"misuse_valid": "misuse /= Void implies not misuse.is_empty",
"copyright_valid": "copyright /= Void implies not copyright.is_empty"
}
}