Why is location code only a string?

We’re working on patterns for making sure our document meta model is mapped to incoming openEHR compositions. One such element concerns location code. An example in structured JSON:

"event_context": [
            {
                "start_time": [
                    "2021-04-19T14:36:49.691+01:00"
                ],
                "setting": [
                    {
                        "|code": "232",
                        "|value": "secondary medical care",
                        "|terminology": "openehr"
                    }
                ],
                "_location":[
                        {
                            "|id": "RQFH5",
                            "|id_scheme": "LocationCode",
                            "|id_namespace": "wrds.wales.nhs",
                            "|name": "Velindre Cancer Center"
                        }
                ],
                "_health_care_facility": [
                        {
                            "|id": "RQF",
                            "|id_scheme": " OrganisationCode ",
                            "|id_namespace": "wrds.wales.nhs",
                            "|name": "Velindre NHS Trust"
                        }
                ],
                "_participation": {
                        "|id": "123456F",
                        "|id_scheme": "GMC",
                        "|id_namespace": "uk.org.gmc",
                        "|name": "Dr Jake Jones",
                        "|function": "Attending Clinician" 
                }
            }
]

The above element from "_location": gets stripped out and stored as a string. Is there a reason for this? As a workaround we would need to store the above elsewhere but I would like to find out what the preferred pattern should be?

That field is a PARTY_IDENTIFIED in EhrScape format, consisting of the name field, and then a flattened & modified form of identifiers (type DV_IDENTIFIER), limited to one instance, i.e. the id_xxx parts. We should have that documented in the Simplified Data Formats, but we don’t yet.

I think the most obvious suggestion to get this into a single string would be to support a compressed form of PARTY_IDENTIFIED, which includes a compressed form of DV_IDENTIFIER. The latter, using this example could be: "wrds.wales.nhs::LocationCode::::RQFH5". or similar (we need to agree the field order). The general pattern would be something like: issuer::type::assigner::id.

This would need to be combined with the remaining name field, in this case, "Velindre Cancer Center", maybe something like this: "Velindre Cancer Center|wrds.wales.nhs::LocationCode::::RQFH5".

I’m not 100% sure of the EhrScape field mappings to the openEHR RM types here.