getValidEncountersAsync - geekmdtravis/fluent-cerner-js GitHub Wiki
Get a list of valid encounter ID's for a given patient. This is an enhancement over what's offered by the Discern native library in two ways: (1) we receive an array of numbers instead of a comma-separated string, and (2) it reduces the code required to safely achieve this to a single line, a reduction of about 20 fold.
getValidEncountersAsync(
personId: number
): Promise<PowerChartReturn & { encounterIds: Array<number> }>-
personId- the identifier for the person (patient) for whom to query for valid encounters.
-
encounterIds- an array of encounter identifiers. If no valid encounters are found, this array will be empty. -
inPowerChart- a boolean indicating whether or not the call to this function was made in the PowerChart context.
getValidEncountersAsync implements the Discern native function DiscernObjectFactory and returns the COM object identified by the argument PVCONTXTMPAGE. The method called is GetValidEncounters.