Function: newRx()
newRx(
message):NewRx|undefined
Convenience accessor: the NewRx body of a message, or undefined.
Parameters
message
A parsed ScriptMessage.
Returns
NewRx | undefined
The NewRx body, or undefined when the message is another transaction.
Example
const rx = newRx(parseScript(xml));
rx?.patient?.name?.lastName;