Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespace human readable references by entity type #630

Closed
jniles opened this issue Aug 9, 2016 · 1 comment
Closed

Namespace human readable references by entity type #630

jniles opened this issue Aug 9, 2016 · 1 comment
Assignees
Labels

Comments

@jniles
Copy link
Collaborator

jniles commented Aug 9, 2016

The human-readable IDs of 1.x were highly useful for distinguishing entities of the same type, but did not carry much information to separate entities of different types. For example, an employee might have an employee reference TPA3 , while a different patient might also have a patient reference TPA3.

I propose that we add a single letter prefix to the reference, the entity type. Some examples are shown below:

  1. patient - PTPA2445, PTPA3234. The leading P is for patient.
  2. employee - ETPA1, ETPB345. The leading E is for an employee.
  3. supplier - CTPA343, CTPC999. The leading C is for creditor/supplier.
  4. cash - ? ZTPA1245, ZTPA5. The leading Z is for the cash payment. If someone has a better idea, please comment!
  5. invoice - ITPA31, IPTC8. The leading I is for invoice.
  6. voucher - VTPA2, VTPB72. The leading V is for voucher.

Since we control the rendering of the human readable ID, we can make these any format we desire to try and make it more readable. The proposal above is the standard proposal. However, other formats might be:

  • V.TPA.2 - separation with periods
  • I-TPB-941 - separation with dashes
@jniles jniles added the design label Aug 9, 2016
@jniles jniles added this to the Future milestone Aug 9, 2016
@jniles jniles self-assigned this Sep 28, 2016
@jniles
Copy link
Collaborator Author

jniles commented Sep 28, 2016

I'll take this one.

jniles pushed a commit to jniles/bhima that referenced this issue Sep 28, 2016
This commit creates a table that contains a mapping between entity uuids
and their human readable text.  All updates to this table are made via
triggers, leaving the controller code on both the server and the client
the same.

The entities are:
 1. Suppliers
 2. Employees
 3. Patients

NOTE that entities are both creditors and debtors.  Another table will
be made for documents (vouchers, invoices, payments, etc).

I've moved all triggers into triggers.sql.

Closes IMA-WorldHealth#753.

Closes IMA-WorldHealth#629.  Partially addresses IMA-WorldHealth#630.
jniles pushed a commit to jniles/bhima that referenced this issue Sep 28, 2016
This commit makes the rest of the UUIDs for records and references in
the journal readable.

Closes IMA-WorldHealth#630.
jniles pushed a commit to jniles/bhima that referenced this issue Sep 28, 2016
This commit creates a table that contains a mapping between entity uuids
and their human readable text.  All updates to this table are made via
triggers, leaving the controller code on both the server and the client
the same.

The entities are:
 1. Suppliers
 2. Employees
 3. Patients

NOTE that entities are both creditors and debtors.  Another table will
be made for documents (vouchers, invoices, payments, etc).

I've moved all triggers into triggers.sql.

Closes IMA-WorldHealth#753.

Closes IMA-WorldHealth#629.  Partially addresses IMA-WorldHealth#630.
jniles pushed a commit to jniles/bhima that referenced this issue Sep 28, 2016
This commit makes the rest of the UUIDs for records and references in
the journal readable.

Closes IMA-WorldHealth#630.
jniles pushed a commit to jniles/bhima that referenced this issue Sep 30, 2016
This commit creates a table that contains a mapping between entity uuids
and their human readable text.  All updates to this table are made via
triggers, leaving the controller code on both the server and the client
the same.

The entities are:
 1. Suppliers
 2. Employees
 3. Patients

NOTE that entities are both creditors and debtors.  Another table will
be made for documents (vouchers, invoices, payments, etc).

I've moved all triggers into triggers.sql.

Closes IMA-WorldHealth#753.

Closes IMA-WorldHealth#629.  Partially addresses IMA-WorldHealth#630.
jniles pushed a commit to jniles/bhima that referenced this issue Sep 30, 2016
This commit makes the rest of the UUIDs for records and references in
the journal readable.

Closes IMA-WorldHealth#630.
jniles pushed a commit to jniles/bhima that referenced this issue Oct 1, 2016
This commit creates a table that contains a mapping between entity uuids
and their human readable text.  All updates to this table are made via
triggers, leaving the controller code on both the server and the client
the same.

The entities are:
 1. Suppliers
 2. Employees
 3. Patients

NOTE that entities are both creditors and debtors.  Another table will
be made for documents (vouchers, invoices, payments, etc).

I've moved all triggers into triggers.sql.

Closes IMA-WorldHealth#753.

Closes IMA-WorldHealth#629.  Partially addresses IMA-WorldHealth#630.
jniles pushed a commit to jniles/bhima that referenced this issue Oct 1, 2016
This commit makes the rest of the UUIDs for records and references in
the journal readable.

Closes IMA-WorldHealth#630.
jniles pushed a commit to jniles/bhima that referenced this issue Oct 4, 2016
This commit creates a table that contains a mapping between entity uuids
and their human readable text.  All updates to this table are made via
triggers, leaving the controller code on both the server and the client
the same.

The entities are:
 1. Suppliers
 2. Employees
 3. Patients

NOTE that entities are both creditors and debtors.  Another table will
be made for documents (vouchers, invoices, payments, etc).

I've moved all triggers into triggers.sql.

Closes IMA-WorldHealth#753.

Closes IMA-WorldHealth#629.  Partially addresses IMA-WorldHealth#630.
jniles pushed a commit to jniles/bhima that referenced this issue Oct 4, 2016
This commit makes the rest of the UUIDs for records and references in
the journal readable.

Closes IMA-WorldHealth#630.
jniles pushed a commit to jniles/bhima that referenced this issue Oct 5, 2016
This commit creates a table that contains a mapping between entity uuids
and their human readable text.  All updates to this table are made via
triggers, leaving the controller code on both the server and the client
the same.

The entities are:
 1. Suppliers
 2. Employees
 3. Patients

NOTE that entities are both creditors and debtors.  Another table will
be made for documents (vouchers, invoices, payments, etc).

I've moved all triggers into triggers.sql.

Closes IMA-WorldHealth#753.

Closes IMA-WorldHealth#629.  Partially addresses IMA-WorldHealth#630.
jniles pushed a commit to jniles/bhima that referenced this issue Oct 5, 2016
This commit makes the rest of the UUIDs for records and references in
the journal readable.

Closes IMA-WorldHealth#630.
jniles pushed a commit to jniles/bhima that referenced this issue Oct 6, 2016
This commit creates a table that contains a mapping between entity uuids
and their human readable text.  All updates to this table are made via
triggers, leaving the controller code on both the server and the client
the same.

The entities are:
 1. Suppliers
 2. Employees
 3. Patients

NOTE that entities are both creditors and debtors.  Another table will
be made for documents (vouchers, invoices, payments, etc).

I've moved all triggers into triggers.sql.

Closes IMA-WorldHealth#753.

Closes IMA-WorldHealth#629.  Partially addresses IMA-WorldHealth#630.
jniles pushed a commit to jniles/bhima that referenced this issue Oct 6, 2016
This commit makes the rest of the UUIDs for records and references in
the journal readable.

Closes IMA-WorldHealth#630.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant