Logo GenPRES

Api Module

Holds the commands, queries and responses the client and the server exchange, and the record of server functions the client calls.

Types and nested modules

Type/Module Description

AdminCommand (Module)

Returns an admin command as text for the log, without the password or the token.

ContextTotalsQuery (Module)

Returns a short name of a totals query of an order context for the log, instead of the whole query.

InteractionCommand (Module)

Returns the name of an interaction command for the log, without the medication names.

LaunchCommand (Module)

Returns the name of a launch command for the log, without the launch token or the public key.

OrderContextCommand (Module)

Returns an order context command as text for the log, without the order context or the patient data.

OrderPlanCommand (Module)

Returns an order plan command as text for the log, without the order plan.

OrderViewCommand (Module)

Returns an order view command as text for the log, tells whether the answer carries linked orders, and previews the order context after the command.

PatientDataCommand (Module)

Returns the name of a patient data command for the log, without the patient data.

SessionCommand (Module)

Returns the name of a session command for the log, without the confirmation code, the PIN or the token.

SigningCommand (Module)

Returns the name of a signing command for the log, without the order plan or the PIN.

TotalsQuery (Module)

Returns the number of order contexts of a totals query as text for the log.

AdminCommand (Type)

The admin commands. ValidatePassword returns a token and the other commands need that token. They need no cookie and work before the formulary is loaded, so a failed load can be retried from the settings page.

AdminResponse

ContextTotalsQuery (Type)

The order context whose orders are counted in the totals, over every scenario, and the norms the totals are checked against. The context is not evaluated.

IServerApi

The protocol between client and server, one function per use case. See https://zaid-ajaj.github.io/Fable.Remoting/src/basics.html.

InteractionCommand (Type)

The interaction commands: check the interactions between the medications of a plan, or get the medication names of the interaction source.

InteractionResponse

LaunchCommand (Type)

The launch commands. A launch command arrives without a session cookie, so it is a separate type from the session commands.

OrderContextCommand (Type)

A command on an order context that is not in the plan. New patient data have no case: the client sends ClearAllFilterProperty on an empty context with the new patient data. The type is a union with one case so that every API function takes a named command type and a new command can be added as a case.

OrderPlanCommand (Type)

The commands on the order plan, nutrition included.

OrderViewCommand (Type)

The commands that change an order context, both for a single order context and for an order context in the plan. They select options and scenarios, set, step or recalculate values, reset the scenario and write the argumentation.

PatientDataCommand (Type)

Sends the patient data edited on the panel. The server answers with the patient data completed with the estimates.

PatientDataEdit

An edit of the patient data that the user makes on the patient panel. GenCORE applies it on the server.

Reply<'resp>

A computing reply: the response and an optional notice for the session, either a newer version of the record or the end of the session.

Request<'cmd>

A computing request: the command and the OpenedToken of the session. Opened is None when there is no session, the session is anonymous or the client has not yet received its first token.

ServerSettings

What the client learns from the server at start-up: how the server was configured.

SessionCommand (Type)

The session commands. They are authenticated by the session cookie.

SessionResponse

SigningCommand (Type)

The signing commands. They are authenticated by the session cookie, like the session commands.

TotalsAnswer

The answer to a totals query: the totals, and the volume that is left within the volume norm while the orders are below the minimum of the norm.

TotalsQuery (Type)

The patient and the order contexts whose orders are counted in the totals, and the norms the totals are checked against; the plan is not changed.

Functions and values

Function or value Description

routerPaths typeName method

Full Usage: routerPaths typeName method

Parameters:
    typeName : string
    method : string

Returns: string

Returns the route of an API function, /api/typeName/method, for both server and client.

typeName : string
method : string
Returns: string

Type something to start searching.