1.7 Alpha - CSH Query - Reference/JxPath

In doing http://www.openvpms.org/documentation/csh/1.7/admin/lookup/demographicUp... I came across https://openvpms.atlassian.net/browse/OVPMS-814 (as a result of looking at http://www.openvpms.org/forum/query-re-custom-demographic-update).

Should http://www.openvpms.org/documentation/csh/1.7/reference/jxpath include documentation of the openvpms:set function?

If so, is the following correct?

Function Description Examples

openvpms:set(object, node, value)

  • object: any archetype
  • node: the node name
  • value: the value to be set

Sets the named node to the supplied value.

The node name may be a single or composite name. The former sets the immediate node. A composite name is multiple node names separated by ".".

  • openvpms:set(.,"deceasedDate",java.util.Date.new())
  • openvpms:set(.,"deceased",true())

Regards, Tim G

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: 1.7 Alpha - CSH Query - Reference/JxPath

Possibly - its a fairly low level function which should be avoided if there is a dedicated function for the task.

There is already a function for marking a patient deceased: party:setPatientDeceased(patient)

Personally I think it should only be used as a stop-gap measure until a function is provided that performs the same task, but that can also do any checks of the input.

-Tim

Re: 1.7 Alpha - CSH Query - Reference/JxPath

Agreed - I have included it in http://www.openvpms.org/documentation/csh/1.7/reference/jxpath but with a warning in red.

Regards, Tim G

Syndicate content