Ga naar inhoud

StartConsultation form

Synopsis

Form to allow the user to select basic symptoms

Route URL

#/StartConsultation/:DIAGID

Old form in legacy FMX application

unit cons_start (cons_star_f form)

GUI

  • On show, execute action Start.

Top

2 columns

Left

  • Label (name: lblPerson), caption: '1. '+' Arguments' (string 72)
  • Radio group (name: rgPerson)
    • Radio button (name: rbMan), caption: man (string 216), initially disabled. Attribute data-symId 136
    • Radio button (name rbWoman), caption: woman (string 419), initially disabled. Attribute data-symId 81
    • Radio button (name: rbChild), caption: child (string 420), initially disabled. Attribute data-symId 98
    • Radio button (name rbBaby), caption: baby (string 421), initially disabled. Attribute data-symId 110 on change, execute action SelectPerson
  • Label (name: lblUrgency), caption: '2. '+' Arguments' (string 72)
  • Radio group (name: rgUrgency)
    • Radio button (name: rbAcute), caption: acute (string 217), enabled, checked.
    • Radio button (name rbSubAcute), caption: subacute (string 422), initially disabled. Attribute data-symID 112.
    • Radio button (name: rbRecurrent), caption: recurrent (string 423), initially disabled. Attribute data-symID 104.
    • Radio button (name rbChronic), caption: Chronic (string 424), initially disabled. Attribute data-symID 8.

Center

3 columns

Left

  • Grid (name: grdSymptom1) with 1 column

Middle

  • Button (name: btnStart), on click execute action StartConsultation
  • Button (name: btnStop), on click execute action Exit

Right

  • Grid (name: grdSymptom2) with 1 column

Actions

Start

  • Save route parameter DIAG in selectedDiagnose
  • Create an array SymptomIDs of integers Add the symptoms IDs that match the following criteria:
    • There is an Association object that links the symptom to the SelectedDiagnose
    • Symptom.ttype=0
  • For any symptom Id in [136,81,98,110] that is present in the SymptomIDs array, enable the radiobutton with corresponding data-symId.
  • Check the first available enabled radiobutton in order rbMan,rbWoman,rbChild,rbBaby

  • clear the array tmpSymptoms of integers Add the symtoms that match the following criteria:

    • There is an Association object that links the symptom to the SelectedDiagnose
    • Symptom.ttype=1
  • For any symptom Id in [112,104,8] that is present in the SymptomIDs array, enable the radiobutton with corresponding data-symId.

SelectPerson

  • Let personSymId equal the data-symId attribute of the selected radiobutton in rgPerson.
  • let GenderSymptom be the symptom selected.
  • Construct an array availableStartupSymptoms of Symptom matching the following criteria:
    • associated with diagnosis selectedDiagnose through Association object
    • ttype>1
    • startup is true.
    • It is not in the list of excludes of Symptom with ID personSymId
  • Show in grdSymptom1 the symptoms in availableStartupSymptoms (Symptom.name.Language)
  • Clear grid grdSymptom2
  • let Symptom2Id=0

SelectSymptom

  • Let Symptom1 equal the symptom Id of the selected row in grdSymptom1
  • From array availableStartupSymptoms Construct a second array availableSymptoms2 of Symptom matching the following criteria:
    • It is not in the list of excludes of Symptom with ID Symptom1.Id
  • Show in grdSymptom2 the symptoms in availableSymptoms2 (Symptom.name.Language)

SelectSymptom

  • Let Symptom2Id equal the symptom with ID of the selected row in grdSymptom2

StartConsultation

  • if Symptom1Id is zero, or Symptom2Id is zero, show dialog (string id 90):
    Select an argument of either type
    
    exit the action.
  • let AcuteSymptom be the symptom selected in rgUrgency (use symId). If urgency is 0, then string to display is 'Acute' (string 217)
  • Display a message

    [Your patient is a] GenderSymptom.Name.Language [with a] AcuteSymptom.Name.Language  [Disease]
    
    (string ids 218,410,433)

  • Display a message

    [The complaints are] Symptom1.Name.Language [and] RandSym2.Name.Language
    
    (string ids 411,412,433)

  • Navigate to route:
    #/consultation/select/{{selectedDiagnose}}/{{GenderSymptom.id}}/{{AcuteSymptom.id}}/{{Symptom1.id}}/{{Symptom2.id}}
    

Exit

  • Navigate to
    #/selectdiagnose