Logo GenPRES

Dto Module

Holds the Dto of a patient, with the identity fields and the patient data, and converts a patient to and from the Dto. Returns the validation errors of an invalid Dto.

Types

Type Description

Dto

Functions and values

Function or value Description

dto ()

Full Usage: dto ()

Parameters:
    () : unit

Returns: Dto
() : unit
Returns: Dto

fromDto today resources dto

Full Usage: fromDto today resources dto

Parameters:
Returns: Result<Patient, ValidationErrors>

Validates a Dto as a patient. With the resources, the patient data also gets the estimates and the options. An id, a name and a birth date make an identified patient, none of the three an anonymous patient; only some of the three is an error.

today : DateTime
resources : PatientDataResources option
dto : Dto
Returns: Result<Patient, ValidationErrors>

toDto pat

Full Usage: toDto pat

Parameters:
Returns: Dto

The Dto of a patient.

pat : Patient
Returns: Dto

Type something to start searching.