Form ConsultationHistory
Synopsis
URL
#/consultationhistory
Data
The following data is passed to the form:
- selectedDiagnose (TDiagnose)
- selectedSymptoms (TSelectedSymptomArray)
- DiagnoseProbabilities (TProbability)
- wasloaded (boolean).
The following type is used in this form:
TArgument = record
Symptom : TSymptom;
Name : String;
LR : Double;
Classification : string;
Present: boolean;
end;
TArgumentArray = array of TArgument;
GUI
- On Show, execute action Initialize
- Label (name : lblTitle) text (string 227)
History of consultation - Label (name : lblDiagnosis) text (string 487 for literal text)
The disease presented by the tutor was {{SelectedDiagnose.name.Language}}. {{percent}} % - Grid (name: grdHistory) 4 columns:
- Column 1 (title: argument)
- Column 2 (title: LR)
- Column 3 (title: Cat)
-
Column 4 (title: Present)
-
Button (name: btnClose) label 'Close' (string 233)
- on click, execute action Exit
Actions
Initialize
- Initialize variable MyArguments with all symptoms in selectedSymptoms
- Field symptom is copied from selectedSymptoms
- Field present is copied from selectedSymptoms
- let Idx be the index + 1 of the current record.
- Field LR is then calculated from the DiagnoseProbabilities for diagnose.id:
Note: if probdiff=1, set LR:=0.
probdiff:=DiagnoseProbabilities.prob[idx+1]-DiagnoseProbabilities.prob[idx]; lr:=Procent(probdiff)/(1-probdiff); - Field Classification is calculated from LR:
If lr>=58 then Classification:=string_89 // Very strong else if lr>=17 then Classification:=string_88 // Strong else if lr>=6 then Classification:=string_87 // Good else if lr>=1.6 then Classification:=string_86 // Weak else Classification:=string_85 // null
- Show MyArguments in grid grdHistory
Exit
- is wasloaded is false, Navigate to StartConsultation :
#/startconsultation/{{selectedDiagnose.id}} - is wasloaded is true, Navigate to SelectDiagnose :
#/selectdiagnose