How to model this XML type as Archetype?

Authorities require the reporting of injury. It is defined XSD for the message to be sent. Some items have numbers. These are perfect ordinal. The problem is the following XML type. How should these be modeled as archetype data types?

<!—‘other scene’ →

So far I have modelled it like below. Is there a better way? I wish I could use ordinal with letters….

ELEMENT[at0072] occurrences matches {0..1} matches { – Skadested

value matches {

DV_CODED_TEXT matches {

defining_code matches {

[local::

at0073, – V - Vei, gate, fortau, gang- , sykkelvei

at0074, – T - Annet transportområde

at0075, – B - Bolig boligområde

at0076, – G - Jordbruksbedrift, skogbruk

at0077, – I - Institusjon, sykehus, syke-, adershjem, off.kontor

at0078, – H - Lekeplass

at0079, – S - Skole, høyskole, universitet, barnehage, familiebarnehage i privat hjem eller liknende skolefritidsordning

at0080, – P - Sport-, idrettsområde (også på skole/høyskole/universitet)

at0081, – N - Fri natur, hav, sjø og vann

at0082, – A - Annet skadested

at0083] – U - Ukjent skadested

}

}

}

}

With regards,
Bjørn Næss
Product owner
Telephone +47 75 59 24 55
Mobile +47 93 43 29 10

www.dips.com

This message is for the designated recipient only and may contain confidential or private information. If you have received it in error, please notify the sender immediately and delete the original.

Hi Bjorn,

This is exactly how I would have modelled it. This is not really an Ordinal which implies some sort of ordering or scale of the values e.g -,0,+,+++,++++.

In your examples the letters V, T , B , G etc are really just shortcuts.

Ian

}

Hi Ian

Thank you for a quick response!

Ok – so my modeling is ok J Still there is a minor problem/challenge. I have to make a report from the Archetype. Given the following value instance of the archetype element:

AccidentSite_001

T - Other transport area

<defining_code>

<terminology_id>

local

</terminology_id>

<code_string>at0074</code_string>

</defining_code>

I need to transform this into the following XML element in the report:

As I can see there is no way to model the key of the coded text (“T”). I can do some business logic to look up the value from an external terminology. But it would be simple and clean if I could model the key (“T”) in the Archetype. Then a value instance could look like this:

AccidentSite_001

T - Other transport area

T

<defining_code>

<terminology_id>

local

</terminology_id>

<code_string>at0074</code_string>

</defining_code>

Are there anyone facing the same problem? How do you handle this?

With regards,
Bjørn Næss
Product owner
Telephone +47 75 59 24 55
Mobile +47 93 43 29 10

www.dips.com

This message is for the designated recipient only and may contain confidential or private information. If you have received it in error, please notify the sender immediately and delete the original.

Hi Bjorn,

2 options

  1. Just parse the term, since you know that you are using a controlled terminology, the first letter will always be the key.

  2. Alternatively, create a term binding, since each valueset is essentially a mini-terminology with a keyed ‘code’ i.e ‘V’, ‘T’ etc, or do these come from a formal terminology, such as ICD-X?

e.g.

term_bindings = <
[“AccidentSiteTerms”] = <
items = <
[“at0073”]= <[AccidentSiteTerms::v::V - Vei, gate, fortau, gang- , sykkelvei]>
[“at0074”] = <[AccidentSiteTerms::T::T - Other transport area ]>

Ian

Bjørn,

the main question is whether these terms exist in a terminology outside the archetype. Then a binding is appropriate, as Ian shows below. However, I don't think the following would parse. It should be :

     term_bindings = <
["AccidentSiteTerms"] = <
items = <
   ["at0073"]= <[AccidentSiteTerms::V]>
["at0074"] = <[AccidentSiteTerms::T]>
>

In a better version of the parser, it would allow:

     term_bindings = <
["AccidentSiteTerms"] = <
items = <
   ["at0073"]= <[AccidentSiteTerms::V|V - Vei, gate, fortau, gang- , sykkelvei>]>
["at0074"] = <[AccidentSiteTerms::T|T - Other transport area|]>
>

i.e. using the standard IHTSDO string form of a coded term, which looks like

code>natural language term|

Normally this should be accepted in any location where just the 'code' is accepted.

- thomas

(attachments)

oceanfullsmall.jpg
btnliprofileblue80x15.png