Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Option 1

Prepersons stores in the same table as persons - MPI.persons. Thus all constraints should be removed from this table except status field. For prepersons needs will be added:

...

external_id field of varchar(1000) type - external identifier of preperson in MIS (also can be used as note?)

...

Option 2

Prepersons stores in separate table - MPI.prepersons

...

Name

Type

M/O

Description and constraints

1

id

uuid

M

Identifier of preperson (PK). Authogenerated

2

person_id

uuid

O

Reference to person (if preperson becomes identified)

3first_name

varchar(50)

O

3

second_name

varchar(50)

O

4

last_name

varchar(50)

O

5

birth_date

date

O

6

gender

varchar(10)

O

Gender. Enum: MALE, FEMALE

7

emergency_contact

jsonb

O

8

confidant_person

jsonb

O

9

external_id

varchar(1000255)

M

External identifier of preperson in MIS. Also can be used as note?4

10

note

varchar(1000)

O

Notes

11

status

varchar(10)

M

Status of the preperson. Allowed statuses:

  • ACTIVE

  • INACTIVE

By default is NON_IDENTIFIEDACTIVE

512

is_active

bool

M

Technical flag. By default is true

613

inserted_at

timestamp

M

Insert date and time

714

inserted_by

uuid

M

User id who inserted the entry

815

updated_at

timestamp

M

Update date and time

916

updated_by

uuid

M

User id who updated the entry

Option 3

...