permafrost06 / DiagMan

Patient/disease case management software
2 stars 1 forks source link

Create CRUD for patient #47

Closed permafrost06 closed 1 year ago

permafrost06 commented 1 year ago

Make a CRUD the same way it was done for tests. The properties are:

  1. id -> string (auto increment) (not sure if string can be auto incremented, let know)
  2. type -> "histo" | "cyto"
  3. status -> "draft" | "pending" | "locked" | "delivered"
  4. patient name -> string
  5. sample collection date -> date
  6. entry date -> date
  7. age -> number
  8. gender -> "male" | "female"
  9. contactNo -> string
  10. specimen -> string
  11. referer -> string
  12. delivery date -> date
  13. tests -> []test_ids
  14. discount -> number
  15. advance -> number
  16. timestamp -> datetime

* Some v2 properties are mapped as follows:

* Some v2 properties are not included here (these can be calculated):

Please have a look at v2 app and code and check if anything is missing.

Possible issues:

Possible solution: We may have an invoices table where we store the invoice properties (e.g. hardcoded test id, name, prices etc.)

Fixed by #51

protibimbok commented 1 year ago

Right now, strings cannot be auto incremented. However, we may use uuid to get a similar result. But if you need strings that goes like this, a,b,....,z,1a,......,1z,2a,..... I can try to achieve this. This might be possible using TRIGGERS. https://sqlite.org/lang_createtrigger.html

permafrost06 commented 1 year ago

I'm sure we can find a better solution than triggers. I'll let you know.

permafrost06 commented 1 year ago

closed by #53