Database Record format

  • PouchDB (on the device) and CouchDB on the server are a non-SQL record-based key-value database.
  • All records have a
    • unique key (ID)
    • housekeeping fields for version control and replication
    • Application assigned key:value pairs

eMission design used the unique Id as follows:

  • Type (Patient,Operation,Mission,Note)
  • Version
  • unique Patient identifier
  • Date
  • This allows a patient's records to be grouped together

Patient record

keynametypenote
_idPatient Idautomaticp;0;Last;First;DOB "p",version,...
authoruser nameautomaticusername of record creator
patient_idpatientIdautomaticreference back to this (main patient) record
typerecord typeautomatic"patient"
LastNameLast nametextrequired
FirstNameFirst Nametextrequired
DOBDate of BirthYYYY-MM-DDrequired
emaile-mail addressemail formatin Demographics
phonephone numberphone formatin Demographics
Addressaddressfree textin Demographics
Contactcontact infofree textin Demographics
DxDiagnosisfree textin Medical
SexSexmultiple choicein Medical
WeightPatient weight (kg)numberin Medical
HeightPatient height (cm)numberin Medical
ASAASA classmultiple choicein Medical
AllergiesAllergiesfree textin Medical
MedsMedicationsfree textin Medical
_attachments:image:dataImageautomaticbinary image data
_attachments:image:content_typeImage typeautomatice.g. png

Operation record

keynametypenote
_idOperation Idautomatico;0;Last;First;DOB;timestamp modified patient_id + creation timestamp
patient_idpatientIdautomaticreference back to this patient's main record
authoruser nameautomaticusername of record creator
typerecord typeautomatic"operation"
patient_idPatient Idautomaticlink back to patient
ComplaintPatient presenting complaintfree textin Medical
ProcedureType of operationtext
SurgeonSurgeontext
EquipmentNeeded equipmentfree text
StatusScheduling statusmultiple choice
Date-TimeTime of operationdate timeif known
DurationExpected length (hours)numberwithout turnover
LateralityLeft / Rightmultiple choice

Note Record

keynametypenote
_idOperation Idautomaticc;0;Last;First;DOB;timestamp modified patient_id + creation timestamp
patient_idpatientIdautomaticreference back to patient's main record
authoruser nameautomaticusername of record creator
typerecord typeautomatic"note"
patient_idPatient Idautomaticlink back to patient
textNote textfree text
dateDateYYY-MM-DDautomatic and editable
_attachments:image:dataImageautomaticbinary image data
_attachments:image:content_typeImage typeautomatice.g. png

Mission

keynametypenote
_idMissionIdautomaticUnique single ID
patient_idMissionIdautomaticreference back to this record
OrganizationSponsoring Organizationtextfor attribution
MissionThis JourneytextName of this mission
linkWeb linkURLto the mission or organization
LocationCountry and CitytextPlace of mission
StartDateBeginningDateof mission
EndDateEndDateof mission
EmergencyEmergency contactfree textWho to contact -- i.e. local official
_attachments:image:dataMission Logoautomaticbinary image data
_attachments:image:content_typeMission logoautomatice.g. png

Patterns

  • Mission record is similar to a patient record
    • ID has same number of fields
    • Mission Notes have a patient_id field that refers back to it
    • There is no analog to Lastname, Firstname or DOB in id
    • Only a single mission record per database is allowed
  • Mission Notes are similar to patient notes
    • Same fields and editing
    • no real use of categories