ppazos / cabolabs-emrapp

openEHR Electronic Medical Record Application for testing comits and queries to the EHRServer.
5 stars 11 forks source link

binder not saving ITEM path and value #14

Closed ppazos closed 10 years ago

ppazos commented 10 years ago

The item table doesn't have a value for path and value_id is null (the datatype is not being saved).

ID VERSION AOM_TYPE ARCHETYPE_ID ATTR NODE_ID PATH TYPE CLASS VALUE_ID
1 0 C_COMPLEX_OBJECT openEHR-EHR-OBSERVATION.blood_pressure.v1 content at0000 OBSERVATION registros.Structure null 2 0 C_COMPLEX_OBJECT openEHR-EHR-OBSERVATION.blood_pressure.v1 protocol at0011 ITEM_TREE registros.Structure null 3 0 C_COMPLEX_OBJECT openEHR-EHR-OBSERVATION.blood_pressure.v1 data at0001 HISTORY registros.Structure null

ppazos commented 10 years ago

Values are saved in a map not in the structure for datavalues, and are committed to the server from that map.

It seems that also paths are not being used to serialize and commit the data.

It would be better to remove the datatypes model if it is not being used, or start using it instead of the mapping. Evaluate which is better, quicker and more scalable.

ppazos commented 10 years ago

The only DATA_VALUE saved in the structure is DV_DATE_TIME for HISTORY.origin and EVENT.time.

ppazos commented 10 years ago

value is null because binder is not binding ELEMENTs

ppazos commented 10 years ago

The problem is the binder can't access the path for each template node, the path is set on each XML node for the parsed template. This was working ok but now it doesn't work: the path appears on the XML but node.path returns null. This might be because lazy updates to GPathResult when using XMLSlurper to parse the XML.

ppazos commented 10 years ago

The OPT model has been added to remove the current GPathResult wrapper and the value is being saved.