User Tools

Site Tools


pentominos:pidiod

This is an old revision of the document!


Pidiod

Functionality

  • Map Patient and Operator IDs to Pseudo IDs
  • Map Pseudo IDs to locations
  • Map Genuine IDs to locations
    • Detect if a Patient or Operator IDs are used instead of Pseudo IDs
  • Resolve Locations to Patient and Operator IDs
  • Automatic removal of expired maps

Failure

  • Pseudo ID not registered
  • Genuine ID invalid (out of scope)
  • Location has no mapped Operator ID and/or Genuine ID
  • Difference between ID types

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 logical location of an Apparatus

Tables

  • [A]: location_patientid_operatorid: (VARCHAR location, VARCHAR pa_id, VARCHAR op_id, TIMESTAMP create_time, TIMESTAMP expire_time)
  • [B]: pseudoid_patientid: (VARCHAR ps_id, VARCHAR pa_id, TIMESTAMP create_time, TIMESTAMP expire_time)
  • [C]: pseudoid_operatorid: (VARCHAR ps_id, VARCHAR pa_id, TIMESTAMP create_time, TIMESTAMP expire_time)

Protocol

Format is as follow: (“<FUNCTION>”, “<PARAMETERS…>” ⇒ “<SUCCESS>“|”<ERROR”):

Example:

Send:
 ("PUT", "id location ttl" "OK") => "OK"|"FAILED" : "PUT\r\n" 
                                                    "id: <my_id>\r\n"
                                                    "location: <my_location>\r\n"
                                                    "ttl: <my_ttl>\r\n"
                                                    "\r\n"
Answer (on success):
                                                    "OK\r\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! An answer can be a list similar to input parameters.

("PUT", "id location ttl") => "OK"|"FAILED"

Put ID (Genuine or Pseudo) on location with ttl. The server detects type of ID.

("GET", "location") => "pa_id op_id"|"FAILED"

Get list of Genuine IDs mapped to location.

("CLEAR", "location") => "OK"|"FAILED"

Clear location from Genuine IDs.

("MAP", "ps_id ge_id ttl") => "OK"|"FAILED"

Map Pseudo ID to Genuine ID with ttl.

("UNMAP", "os_id" ) => "OK"|"FAILED"

Unmap Pseudo ID from a genuine ID.

pentominos/pidiod.1240818412.txt.gz · Last modified: 2009/04/27 09:46 by jsc