Dumped on 2024-12-23
basic units are SI units, units derived from them and the Unity
F-Key | Name | Type | Description |
---|---|---|---|
pk | serial | PRIMARY KEY | |
name_short | text | UNIQUE NOT NULL | |
name_long | text | UNIQUE |
Tables referencing this one via Foreign Key Constraints:
F-Key | Name | Type | Description |
---|---|---|---|
name | text | UNIQUE | |
pk | serial | PRIMARY KEY |
Tables referencing this one via Foreign Key Constraints:
List of fields for a particular form
F-Key | Name | Type | Description |
---|---|---|---|
pk | serial | PRIMARY KEY | |
fk_form | integer | UNIQUE#1 UNIQUE#2 NOT NULL | |
long_name | text |
UNIQUE#1
NOT NULL
The full name of the form field as presented to the user |
|
template_placeholder | text |
UNIQUE#2
NOT NULL
The name of the field as exposed to the form template. In other words, the placeholder in form_defs.template where the value entered into this field ist to be substituted. Must be a valid identifier in the form template's script language (viz. Python) |
|
help | text |
longer help text |
|
form_field_types.pk | fk_type | integer |
NOT NULL
the field type |
param | text |
a parameter for the field's behaviour, meaning is type-dependent |
|
display_order | integer |
used to *suggest* display order, but client may ignore |
Queue table for rendered form instances. Note that the rows in this table will get deleted after processing. This is NOT an archive of form jobs.
F-Key | Name | Type | Description |
---|---|---|---|
pk | serial | PRIMARY KEY | |
fk_form_instance | integer |
NOT NULL
points to the unrendered source instance of the form, useful for recalling submitted jobs for changing |
|
form | bytea |
NOT NULL
the rendered form, IOW binary data such as a PDF file |
|
form_job_targets.pk | fk_job_target | integer |
NOT NULL
points to the job target |
submitted_when | timestamp with time zone |
NOT NULL
DEFAULT now()
when was this form job submitted |
|
fk_submitted_by | integer |
NOT NULL
who of the staff submitted this form job |
|
submitted_from | text |
NOT NULL
the workplace this form job was submitted from |
|
status | text |
NOT NULL
DEFAULT 'submitted'::text
status of the form job: - submitted: ready for processing - in progress: being processed - removable: fit for removal (either cancelled, timed out or done) - halted: do not process |
the form job targets (eg. printers, faxes, smtp servers) in whatever granularity is needed locally, can be used for load balancing/round robin servicing busy queues
F-Key | Name | Type | Description |
---|---|---|---|
pk | serial | PRIMARY KEY | |
target | text | UNIQUE NOT NULL |
Tables referencing this one via Foreign Key Constraints:
F-Key | Name | Type | Description |
---|---|---|---|
pk | serial | PRIMARY KEY | |
fk_form | integer | UNIQUE NOT NULL | |
fk_papersize | integer | NOT NULL | |
offset_top | integer |
NOT NULL
in mm - and yes, they do change even within one type of form, but we do not want to change the offset for all the fields in that case |
|
offset_left | integer | NOT NULL | |
pages | integer | NOT NULL DEFAULT 1 | |
printer | text | NOT NULL | |
tray | text | NOT NULL | |
manual_feed | boolean | NOT NULL DEFAULT false | |
papertype | text |
NOT NULL
type of paper such as "watermarked rose", mainly for user interaction on manual_feed==true |
|
eject_direction | character(1) | NOT NULL | |
orientation | character(1) | NOT NULL |
allows lookup of whether a given client version can work with a particular database revision
F-Key | Name | Type | Description |
---|---|---|---|
pk | serial | PRIMARY KEY | |
client_type | text |
UNIQUE#1
NOT NULL
the type of client this row refers to |
|
client_version | text |
UNIQUE#1
NOT NULL
the version of the client this row refers to |
|
db_identity_hash | text |
UNIQUE#1
NOT NULL
the identity_hash of a database revision that the client version can work with |
this table stores items that originate in headless processes running in the background but need to be brought to the attention of someone, say, errors that an integrity checker may find
F-Key | Name | Type | Description |
---|---|---|---|
pk | serial | PRIMARY KEY | |
reported_when | timestamp with time zone | NOT NULL DEFAULT now() | |
reported_by | text |
NOT NULL
DEFAULT "current_user"()
who or what reported this condition, may be a user or software |
|
reported_to | text |
NOT NULL
DEFAULT 'admin'::text
who is this condition reported to, user or admin, used for filtering |
|
problem | text |
NOT NULL
a description of the reported condition |
|
solution | text |
a proposed solution to the problem |
|
context | text |
specific context for this condition that would make the problem field unnecessary complex and bulky |
|
category | text |
NOT NULL
a category for the condition, this is used for filtering, too |
|
cookie | text |
stores arbitrary information related to the condition, mostly used for semantic duplicates detection, eg. do not report on a single problem more than once in subsequent runs of, say, an import script |
Name | Constraint |
---|---|
housekeeping_todo_reported_to_check | CHECK ((reported_to = ANY (ARRAY['user'::text, 'admin'::text]))) |
each row defines one set of measurement reference data
F-Key | Name | Type | Description |
---|---|---|---|
pk | serial | PRIMARY KEY | |
fk_ref_src | integer |
UNIQUE#1
NOT NULL
source this reference data set was taken from |
|
data | text |
UNIQUE#1
NOT NULL
the actual reference data in some format, say, XML or like in a *.conf file |
|
comment | text |
units as used in real life
F-Key | Name | Type | Description |
---|---|---|---|
pk | serial | PRIMARY KEY | |
basic_unit.pk | fk_basic_unit | integer |
what is the SI-Standard unit for this, e.g. for the unit mg it is kg |
name_short | text | NOT NULL | |
name_long | text | ||
factor | double precision |
NOT NULL
DEFAULT 1.0
what factor the value with this unit has to be multiplied with to get values in the basic_unit |
|
shift | double precision |
NOT NULL
DEFAULT 0.0
what has to be added (after multiplying by factor) to a value with this unit to get values in the basic_unit |
will return either the translation into i18n.curr_lang.lang for the current user or the input, created in public schema for easy access
select i18n._($1)
will return either the translation into <text> (2nd argument) for the current user or the input, created in public schema for easy access
select i18n._($1, $2)
function used to check referential integrity from clin.lnk_type2item to clin.clin_root_item with a custom trigger
declare dummy integer; msg text; begin -- does fk_item change at all ? if TG_OP = 'UPDATE' then if NEW.fk_item = OLD.fk_item then return NEW; end if; end if; -- check referential integrity select into dummy 1 from clin.clin_root_item where pk_item=NEW.fk_item; if not found then msg := 'referential integrity violation: clin.lnk_type2item.fk_item [' || NEW.fk_item || '] not in <clin_root_item.pk_item>'; raise exception '%', msg; return NULL; end if; return NEW; end;
begin if TG_OP = 'INSERT' then NEW.source_time_zone := (select (extract(timezone from (select now()))::text || 'seconds')::interval); else NEW.source_time_zone := OLD.source_time_zone; end if; return NEW; end;
Generated by PostgreSQL Autodoc