clin.suppressed_hint.txt
text/plain
Filename: clin.suppressed_hint.txt
Type: text/plain
Part: 2
Ausgabeformat ist »wrapped«.
Tabelle »clin.suppressed_hint«
Spalte | Typ | Sortierfolge | NULL erlaubt? | Vorgabewert | Speicherung | Statistikziel | Beschreibung
-----------------+--------------------------+--------------+---------------+------------------------------------------------------+-------------+---------------+-----------------------------------------------------------
pk_audit | integer | | not null | nextval('audit.audit_fields_pk_audit_seq'::regclass) | plain | |
row_version | integer | | not null | 0 | plain | |
modified_when | timestamp with time zone | | not null | CURRENT_TIMESTAMP | plain | |
modified_by | name | | not null | CURRENT_USER | plain | |
pk | integer | | not null | nextval('clin.suppressed_hint_pk_seq'::regclass) | plain | |
fk_encounter | integer | | not null | | plain | | the encounter during which this hint was first suppressed
fk_hint | integer | | not null | | plain | | the hint that is suppressed
suppressed_by | name | | not null | CURRENT_USER | plain | | who suppressed this hint
suppressed_when | timestamp with time zone | | not null | statement_timestamp() | plain | | when was this hint suppressed
rationale | text | | | | extended | | rationale on why this hint is suppressed in this patient
md5_sum | text | | | | extended | | md5 of relevant fields of this hint
Indexe:
"suppressed_hint_pkey" PRIMARY KEY, btree (pk)
"idx_suppressed_hint_fk_encounter" btree (fk_encounter)
"idx_suppressed_hint_fk_hint" btree (fk_hint)
Check-Constraints:
"audit_audit_fields_sane_modified_when" CHECK ((modified_when <= clock_timestamp()) IS TRUE)
"clin_suppressed_hint_sane_by" CHECK (length(suppressed_by::text) > 0)
"clin_suppressed_hint_sane_md5" CHECK (gm.is_null_or_blank_string(md5_sum) IS FALSE)
"clin_suppressed_hint_sane_rationale" CHECK (gm.is_null_or_blank_string(rationale) IS FALSE)
Fremdschlüssel-Constraints:
"fk_clin_suppressed_hint_fk_encounter" FOREIGN KEY (fk_encounter) REFERENCES clin.encounter(pk) ON UPDATE RESTRICT ON DELETE RESTRICT
"fk_clin_suppressed_hint_fk_hint" FOREIGN KEY (fk_hint) REFERENCES ref.auto_hint(pk) ON UPDATE RESTRICT ON DELETE CASCADE
Trigger:
tr_sanity_check_uniq_hint_per_pat_ins_upd AFTER INSERT OR UPDATE ON clin.suppressed_hint DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE PROCEDURE clin.trf_sanity_check_uniq_hint_per_pat_ins_upd()
zt_del_suppressed_hint BEFORE DELETE ON clin.suppressed_hint FOR EACH ROW EXECUTE PROCEDURE audit.ft_del_suppressed_hint()
zt_ins_suppressed_hint BEFORE INSERT ON clin.suppressed_hint FOR EACH ROW EXECUTE PROCEDURE audit.ft_ins_suppressed_hint()
zt_upd_suppressed_hint BEFORE UPDATE ON clin.suppressed_hint FOR EACH ROW EXECUTE PROCEDURE audit.ft_upd_suppressed_hint()
zzz_tr_announce_clin_suppressed_hint_del AFTER DELETE ON clin.suppressed_hint DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE PROCEDURE gm.trf_announce_table_del('operation=DELETE::table=clin.suppressed_hint::PK name=pk', 'select $1.pk', 'select fk_patient from clin.encounter where pk = $1.fk_encounter limit 1')
zzz_tr_announce_clin_suppressed_hint_ins_upd AFTER INSERT OR UPDATE ON clin.suppressed_hint DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE PROCEDURE gm.trf_announce_table_ins_upd('table=clin.suppressed_hint::PK name=pk', 'select $1.pk', 'select fk_patient from clin.encounter where pk = $1.fk_encounter limit 1')
Erbt von: audit.audit_fields