UNPKG

ehrcraft-form-api

Version:

API/SDK for EHR Craft Forms (this version adds support lab)

138 lines (137 loc) 5 kB
export declare namespace DIPS { namespace Terminology { /** * * @see https://dev.azure.com/dips/DIPS/_git/OpenEhr.Forms?path=/src/OpenEhr.Forms/Terminology/CodedItem.cs * NOTE: the attributes are readonly since it's defined with only getter in the c# class */ class CodedItem { /** * When DIPS felles kodeverk - mapped to "KODE" */ readonly code: string; /** * When DIPS felles kodeverk - mapped to "LANGTNAVN" */ readonly name: string; /** * When DIPS felles kodeverk - mapped to "BESKRIVELSE" */ readonly description: string; /** * When DIPS felles kodeverk - mapped to the name of the codelist, i.e. ARK-FE-KODEVERKA */ readonly terminology: string | null; /** * When DIPS felles kodeverk - mapped to the database identifiers */ readonly terminologyMappings?: CodeValueMapping[]; /** * When DIPS felles kodeverk - populated by user-defined properties for each code */ readonly properties?: CodedItemProperty[]; /** * Need to use the full constructor since c# support multiple constructor definitions and typescript not. * @param code_v code definining the code item * @param name_v name (label) of the code item * @param description_v optional description * @param terminology_v optional terminology * @param properties_v optional properties */ constructor(code_v: string, name_v: string, description_v: string, terminology_v: string | null, properties_v?: CodedItemProperty[]); /** * * @param name name of the property to get the value for * @returns the value or an empty string */ getPropertyValue(name: string): string; } /** * @see https://dev.azure.com/dips/DIPS/_git/OpenEhr.Forms?path=/src/OpenEhr.Forms/Terminology/CodedItemProperty.cs */ class CodedItemProperty { readonly name: string; readonly value: string; constructor(name: string, value: string); } type CodeValueMapping = { /** * 0 = is broader * 1 = is equal * 2 = is narrower * 3 = unknown */ match: 0 | 1 | 2 | 3; terminology: string; codeString: string; }; /** * Wrapper around the the context to be used when searching for terminologies */ class TerminologyContextOrganisation { /** * Field is required in the underlying terminology service (DIPS Felles Koder) * */ hospitalId: number; departmentId?: number; } } namespace Context { /** * Information about the logged in user. */ interface ContextUser { hospitalId: number; departmentId: number; localizationId?: number; } /** * Defines a SemVer definition to be used to define the ContextVersion of openEHR and forms library. */ interface SemVer { version: string; major: number; minor: number; patch: number; revision: number; } /** * Context information about the software versions. */ interface ContextVersion { /** * The semver version of the DIPS openEHR implementation. */ openEhr: SemVer; /** * The semver version of the DIPS openEHR FORMS DLL */ forms: SemVer; } /** * DTO class for the organisational context. Used i.e. to query system configurations. * https://dev.azure.com/dips/DIPS/_git/OpenEhr.Forms?path=/src/OpenEhr.Forms/Scripting/SystemConfig/SystemConfigurationOrganization.cs&version=GBmaster */ class SystemConfigurationOrganization { hospitalId?: number; departmentId?: number; sectionId?: number; wardId?: number; locationId?: number; /** * Empty constructor as defined in the proxy .net class. */ constructor(); } /** * https://dev.azure.com/dips/DIPS/_git/OpenEhr.Forms?path=/src/OpenEhr.Forms/Context/OrganizationContext.cs&_a=contents&version=GBmaster */ class OrganizationContext { hospitalId?: number; departmentId?: number; sectionId?: number; wardId?: number; constructor(); } } }