Object Simulation
- Simulation is an object with the data to save & restore a consultation.
Store
- Objects are stored in localstorage in 2 steps:
- SimulationList = Semicolon-separated list of simulation IDs
- Each simulation is serialized as JSON and stored with name Simulation_{{ID}}
Properties
- name : string with name of simulation
- diagId : Id of selected diagnosis
- subjId : Id of person type symptom record
- "acuteSymId" : Id of acute symptom record
- "sym1Id" : Id of first initial symptom record
- "sym2Id" : Id of second symptom record
- "syms": array of objects with the following fields
- symId symtom id;
- present boolean;
- mayUni boolean;
example
{
"name": "My simulation",
"diagId" : 789,
"subjId" : 457,
"acuteSymId" : 897,
"sym1Id" : 897,
"sym2Id" : 998,
"symptoms" : [
{ "symId" : 123, "present" : true, "mayUni" : true },
{ "symId" : 456, "present" : false, "mayUni" : false }
]
}