How identify xml tag in archetype paths?

I have a problem, I need to make an identification to map the path of the archetype and identify it in XML, because I can create the paths correctly, but how to identify what I have in my XML for the ATs path, because in XML that is sent has no specification on how to identify

Is there a way today? or is it necessary to pass this information in XML?

example:

<tns: Overall_test_status_timestamp>
<tns: name>
<tns: value> Overall test status timestamp </ tns: value>
</ tns: name>
<tns: value>
<oe: value> 2021-01-03T13: 15: 27-03: 00 </ oe: value>
</ tns: value>
</ tns: Overall_test_status_timestamp>

the value tag what is your AT? how to identify this?

I’m not sure if I understand your question, what are the “ATs paths” you are referring to? is this a specific archetype?
Usually you would access to values in the XML by using XPath and targeting the archetype_node_id=‘atxxxx’ (or in ADL2 =‘idxx’)

example Path

[openEHR-EHR-OBSERVATION.laboratory_test_result.v1]/data[at0001]/events[at0002]/data[at0003]/items[at0005]/value

at0001 at0002 how identify automatic this fields

<tns:Laboratory_test_result>
			<tns:name>
				<tns:value>Laboratory test result</tns:value>
			</tns:name>
			<tns:language>
				<tns:terminology_id>
					<tns:value>ISO_639-1</tns:value>
				</tns:terminology_id>
				<tns:code_string>en</tns:code_string>
			</tns:language>
			<tns:encoding>
				<tns:terminology_id>
					<tns:value>IANA_character-sets</tns:value>
				</tns:terminology_id>
				<tns:code_string>UTF-8</tns:code_string>
			</tns:encoding>
			<tns:subject/>
			<tns:data>
				<tns:Any_event_as_Point_Event>
					<tns:name>
						<tns:value>Any event</tns:value>
					</tns:name>
					<tns:time>
						<oe:value>2021-01-04T15:45:42-03:00</oe:value>
					</tns:time>
					<tns:data>
						<tns:Test_name>
							<tns:name>
								<tns:value>Test name</tns:value>
							</tns:name>
							<tns:value>
								<oe:value>CALCIO</oe:value>
								<oe:mappings>
									<oe:match/>
									<oe:target>
										<oe:terminology_id>
											<oe:value>exams-procedures-tuss</oe:value>
										</oe:terminology_id>
										<oe:code_string>40301400</oe:code_string>
									</oe:target>
								</oe:mappings>
							</tns:value>
						</tns:Test_name>
						<tns:Specimen>
							<tns:Date_fslash_Time_of_Collection>
								<tns:name>
									<tns:value>Date_fslash_Time_of_Collection</tns:value>
								</tns:name>
								<oe:value>
									<tns:value>2021-01-03T12:30:26-03:00</tns:value>
								</oe:value>
							</tns:Date_fslash_Time_of_Collection>
						</tns:Specimen>
						<tns:Overall_test_status>

Ah, this is one of the things I don’t like about the template with names in xml fields is that you need the original archetype to know which “label” the atcode refers to. In this case you will have to navigate to the value by using the xml labels, e.g.
//tns:Test_name/tns:value/oe:value

In pure openEHR xml data (I’m assuming this is some kind of template byproduct?), there should be an archetype_node_id attribute that will have the atxxxx code

That’s right, there are descriptors inside the ADL, I need to go through, we arrived at the same conclusion, the problem I see now is to make the parse containing the descriptions of the ADL do you know of any?

Thanks @yampeku

So this looks like a TDD a Template Data document which will be based on an equivalent TDS Template Data schema (and XSD).

These are derived simplified versions of canonical openEHR data and there is a standard transform back to a canonical format but it is dependent on having access to the original openEHR template and derived TDS.

Some CDRs support TDD directly e.g Ocean, Better ?? others allow you to post the TDD directly to the CDR, which handles the conversion to canonical server-side, in some cases via a standard xsl transform - https://github.com/openEHR/openEHR-TDD2canonical - something like this but you definitely need access to the original .opt template file and probably the original TDS schema definition.

I think there is also a copy of the Ocean TDD to Canonical xsl convertor at http://www.java2s.com/Open-Source/CSharp_Free_Code/GUI/Download_GastrOS_openEHR_based_Endoscopy_Application.htm

2 Likes