Skip to main content
Version: v0.0.3

Function: newRx()

newRx(message): NewRx | undefined

Convenience accessor: the NewRx body of a message, or undefined.

Parameters

message

ScriptMessage

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;