Skip to content

Error retrieving composition by UUID FLAT & RAW #193

@dileep-ehr

Description

@dileep-ehr

I am getting the following errors retrieving vitals compositions (template file set and OPT attached) committed using ECISFLAT in v1.3.0

FLAT

Error 500 #1.0.0 Invocation exception to method:retrieve:javax.xml.bind.UnmarshalException: Unable to create an instance of org.openehr.jaxb.rm.ItemStructure
 - with linked exception:
[java.lang.InstantiationException]

RAW
``Error500 #1.0.0 Invocation exception to method:retrieve:java.lang.StackOverflowError
###Sequence of events
In Pulse/Heart beat, the Rate field has runtime name constraint of Pulse Rate/Heart Rate. As I was not sure how to do this using ECISFLAT, tried the following options.

1. "/content[openEHR-EHR-SECTION.vital_signs.v0]/items[openEHR-EHR-OBSERVATION.pulse.v1]/data[at0002]/events[at0003]/data[at0001]/items[at0004, 'pulse_rate/value']": "72,/min",
2. "/content[openEHR-EHR-SECTION.vital_signs.v0]/items[openEHR-EHR-OBSERVATION.pulse.v1]/data[at0002]/events[at0003]/data[at0001]/items[at0004, 'pulse_rate']|value": "72,/min",

Both options successfully committed, and I was able to retrieve them using ECISFLAT but not using FLAT or RAW. After that, even if I commit without the name constraining FLAT & RAW are giving above error.

Looks like the corruption to the JSON structure in one composition is affecting all compositions that use the same template.

Sample compositions with and without name constraint

Option 1 - with name constraint

{
"/language": "en",
"/territory": "IN",    
"/composer|identifier": "123456-5::UUID::EHR.Network::UUID",
"/composer|name": "5th Person",
"/context/start_time": "2019-03-07T05:00:31.461Z",
"/context/end_time": "2019-03-07T05:15:31.461Z",
"/context/health_care_facility|identifier": "123456-5::UUID::EHR.Network::UUID",
"/context/health_care_facility|name": "5th hospital",
"/context/setting": "openehr::232|secondary medical care|", 
"/context/location": "Room 101",
"/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.ehrc_metadata.v0]/items[at0001]|value": "3",
"/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.ehrc_metadata.v0]/items[at0006]/items[at0002]|value": "MHMS",  
"/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.ehrc_metadata.v0]/items[at0006]/items[at0003]|value": "456789",
"/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.ehrc_metadata.v0]/items[at0006]/items[at0004]|value": "234567-123",  
"/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.ehrc_metadata.v0]/items[at0006]/items[at0005]|value": "123456-123",
"/content[openEHR-EHR-SECTION.vital_signs.v0]/items[openEHR-EHR-OBSERVATION.pulse.v1]/data[at0002]/events[at0003]/data[at0001]/items[at0004, 'pulse_rate']|value": "72,/min",
"/content[openEHR-EHR-SECTION.vital_signs.v0]/items[openEHR-EHR-OBSERVATION.body_temperature.v2]/data[at0002]/events[at0003]/data[at0001]/items[at0004]|value": "95.0,[degF]",
"/content[openEHR-EHR-SECTION.vital_signs.v0]/items[openEHR-EHR-OBSERVATION.respiration.v1]/data[at0001]/events[at0002]/data[at0003]/items[at0004]|value": "25,/min",
"/content[openEHR-EHR-SECTION.vital_signs.v0]/items[openEHR-EHR-EVALUATION.clinical_synopsis.v1]/data[at0001]/items[at0002]|value": "Pulse Rate - 84/min, regular, rhythmic, normal volume, character and no vessel wall thickening. BP- 140/80 mm Hg, Supine, Left arm, adult cuff size"
}

Option 2 - with name constraint

{
"/language": "en",
"/territory": "IN",    
"/composer|identifier": "123456-5::UUID::EHR.Network::UUID",
"/composer|name": "5th Person",
"/context/start_time": "2019-03-07T05:00:31.461Z",
"/context/end_time": "2019-03-07T05:15:31.461Z",
"/context/health_care_facility|identifier": "123456-5::UUID::EHR.Network::UUID",
"/context/health_care_facility|name": "5th hospital",
"/context/setting": "openehr::232|secondary medical care|", 
"/context/location": "Room 101",
"/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.ehrc_metadata.v0]/items[at0001]|value": "3",
"/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.ehrc_metadata.v0]/items[at0006]/items[at0002]|value": "MHMS",  
"/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.ehrc_metadata.v0]/items[at0006]/items[at0003]|value": "456789",
"/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.ehrc_metadata.v0]/items[at0006]/items[at0004]|value": "234567-123",  
"/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.ehrc_metadata.v0]/items[at0006]/items[at0005]|value": "123456-123",
"/content[openEHR-EHR-SECTION.vital_signs.v0]/items[openEHR-EHR-OBSERVATION.pulse.v1]/data[at0002]/events[at0003]/data[at0001]/items[at0004, 'pulse_rate/value']": "72,/min",
"/content[openEHR-EHR-SECTION.vital_signs.v0]/items[openEHR-EHR-OBSERVATION.body_temperature.v2]/data[at0002]/events[at0003]/data[at0001]/items[at0004]|value": "95.0,[degF]",
"/content[openEHR-EHR-SECTION.vital_signs.v0]/items[openEHR-EHR-OBSERVATION.respiration.v1]/data[at0001]/events[at0002]/data[at0003]/items[at0004]|value": "25,/min",
"/content[openEHR-EHR-SECTION.vital_signs.v0]/items[openEHR-EHR-EVALUATION.clinical_synopsis.v1]/data[at0001]/items[at0002]|value": "Pulse Rate - 84/min, regular, rhythmic, normal volume, character and no vessel wall thickening. BP- 140/80 mm Hg, Supine, Left arm, adult cuff size"
}

Option3 - without name constraint

{
"/language": "en",
"/territory": "IN",    
"/composer|identifier": "123456-5::UUID::EHR.Network::UUID",
"/composer|name": "5th Person",
"/context/start_time": "2019-03-07T05:00:31.461Z",
"/context/end_time": "2019-03-07T05:15:31.461Z",
"/context/health_care_facility|identifier": "123456-5::UUID::EHR.Network::UUID",
"/context/health_care_facility|name": "5th hospital",
"/context/setting": "openehr::232|secondary medical care|", 
"/context/location": "Room 101",
"/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.ehrc_metadata.v0]/items[at0001]|value": "3",
"/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.ehrc_metadata.v0]/items[at0006]/items[at0002]|value": "MHMS",  
"/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.ehrc_metadata.v0]/items[at0006]/items[at0003]|value": "456789",
"/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.ehrc_metadata.v0]/items[at0006]/items[at0004]|value": "234567-123",  
"/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.ehrc_metadata.v0]/items[at0006]/items[at0005]|value": "123456-123",
"/content[openEHR-EHR-SECTION.vital_signs.v0]/items[openEHR-EHR-OBSERVATION.pulse.v1]/data[at0002]/events[at0003]/data[at0001]/items[at0004]|value": "72,/min",
"/content[openEHR-EHR-SECTION.vital_signs.v0]/items[openEHR-EHR-OBSERVATION.body_temperature.v2]/data[at0002]/events[at0003]/data[at0001]/items[at0004]|value": "95.0,[degF]",
"/content[openEHR-EHR-SECTION.vital_signs.v0]/items[openEHR-EHR-OBSERVATION.respiration.v1]/data[at0001]/events[at0002]/data[at0003]/items[at0004]|value": "25,/min",
"/content[openEHR-EHR-SECTION.vital_signs.v0]/items[openEHR-EHR-EVALUATION.clinical_synopsis.v1]/data[at0001]/items[at0002]|value": "Pulse Rate - 84/min, regular, rhythmic, normal volume, character and no vessel wall thickening. BP- 140/80 mm Hg, Supine, Left arm, adult cuff size"
}

EHRC - Vitals.v1.zip
EHRC - Vitals.v1.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions