pentominos:pidiod
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
pentominos:pidiod [2009/05/01 12:02] – jsc | pentominos:pidiod [2010/04/27 12:03] (current) – jsc | ||
---|---|---|---|
Line 7: | Line 7: | ||
* Map Genuine IDs to locations | * Map Genuine IDs to locations | ||
* Detect if a Patient or Operator IDs are used instead of Pseudo IDs | * Detect if a Patient or Operator IDs are used instead of Pseudo IDs | ||
- | * Resolve | + | * Solve Locations to Patient and Operator |
+ | * Solve Pseudo IDs to Genuine | ||
* Automatic removal of expired maps | * Automatic removal of expired maps | ||
+ | |||
+ | ==== Terminology ==== | ||
+ | * ID types: | ||
+ | * Pseudo ID (ps_id): A pseudo ID | ||
+ | * Genuine ID (ge_id): An non-pseudo ID (Patient ID or Operator ID) | ||
+ | * Operator ID (op_id): A string s of 4 digits where s[0] > 3 | ||
+ | * Patient ID (pa_id): A string s of 10 characters where s[0] < = 3 (how does this comply with dummy CPR?) | ||
+ | * Location: A location of an Apparatus | ||
===== Pitfalls ===== | ===== Pitfalls ===== | ||
Line 18: | Line 27: | ||
===== Design ===== | ===== Design ===== | ||
- | |||
- | ==== Terminology ==== | ||
- | * ID types: | ||
- | * Pseudo ID (ps_id): A pseudo ID | ||
- | * Genuine ID (ge_id): An non-pseudo ID (Patient ID or Operator ID) | ||
- | * Operator ID (op_id): A string s of 4 digits where s[0] > 3 | ||
- | * Patient ID (pa_id): A string s of 10 characters where s[0] < = 3 (how does this comply with dummy CPR?) | ||
- | * Location: A location of an Apparatus | ||
==== Tables ==== | ==== Tables ==== | ||
Line 31: | Line 32: | ||
* [A]: location: (VARCHAR op_id, VARCHAR pa_id, VARCHAR location, TIMESTAMP create_time, | * [A]: location: (VARCHAR op_id, VARCHAR pa_id, VARCHAR location, TIMESTAMP create_time, | ||
* [B]: idmap: (VARCHAR ps_id, VARCHAR pa_id, TIMESTAMP create_time, | * [B]: idmap: (VARCHAR ps_id, VARCHAR pa_id, TIMESTAMP create_time, | ||
+ | |||
+ | ==== Database maintenance ==== | ||
+ | |||
+ | Data maintenance is done every time a table is written too or read from. | ||
==== Protocol ==== | ==== Protocol ==== | ||
- | Format is as follow: ("< | + | Format is as follow: ("< |
Example: | Example: | ||
< | < | ||
Send: | Send: | ||
- | | + | |
- | "id1: <an id>\r\n" | + | "id1: < |
- | "id2: <another id>\r\n" | + | "id2: <another id> |
- | " | + | " |
- | "ttl: <a ttl>\r\n" | + | "ttl: < |
- | "\r\n" | + | " |
Answer (on success): | Answer (on success): | ||
- | "OK\r\n" | + | "status: |
+ | "msg: <STATUS MSG> | ||
+ | "\n" | ||
</ | </ | ||
- | Ie. every line terminated by "\r\n" and each parameter takes an argument and has its own line. The request is terminated by "\r\n". NOTE! Similar to input parameters an answer can to be a list. | + | Ie. every line terminated by " |
- | === (" | + | === (" |
- | Put IDs (Genuine or Pseudo) on location with ttl. The server detects type of IDs. | + | Put IDs (Genuine or Pseudo) on location with ttl. |
- | === (" | + | === (" |
Get list of IDs (Genuine IDs) mapped to location. | Get list of IDs (Genuine IDs) mapped to location. | ||
- | === (" | + | === (" |
Clear all IDs (Genuine IDs) on location. | Clear all IDs (Genuine IDs) on location. | ||
- | === (" | + | === (" |
Map Pseudo ID to Genuine ID with ttl. Note! One of the IDs must be a Pseudo ID. | Map Pseudo ID to Genuine ID with ttl. Note! One of the IDs must be a Pseudo ID. | ||
- | === (" | + | === (" |
Unmap Pseudo ID from a genuine ID. | Unmap Pseudo ID from a genuine ID. | ||
- | === (" | + | === (" |
- | Lookup of ID mapped to id. | + | Lookup of ID mapped to id and its type (of the mapped to id). |
+ | |||
+ | |||
+ | ===== TODO ===== | ||
+ | |||
+ | ==== Next Version ==== | ||
+ | * {{: | ||
+ | * {{: | ||
+ | * {{: | ||
+ | * {{: | ||
+ | |||
+ | ==== Current Version ==== |
pentominos/pidiod.txt · Last modified: 2010/04/27 12:03 by jsc