Okay
  Public Ticket #2634519
passing variables and conditional logic in amelia
Closed

Comments

  • franklin started the conversation

    I have a lot of database experience but no wordpress experience

    I am writing an on call program for 80 doctors in 3 groups. Each day 1 or 2 doctors from each group are on on call. In the web site I need to maintain a list of doctors that are on call on any particular day. When a patient wants an appointment there are 3 steps 

    1 choose their doctor from a dropdown list (page 1)

    2 depending on the doctor the system will display the appropriate schedule on the appropriate page  (different page 2)

    3. we collect the kind of service they require ( phone zoom or in person) and some confidential health information  

    we send an email to the doctor on call with the basic and additional custom information  Which doctor gets it depends on who is on call and what service they request

    In order for this work I need to use conditional logic to display the correct page 2 and I need to pass the variable about which doctors are on call to the email system

    If the website is done with elementor and amelia does the scheduling I need to pass the doctors name to amelia or have amelia look it up in the database

    which is in elementor and I am not sure if this sharing of data or parameter passing is possible 


    franklin 




      

  • franklin replied

    just to clarify  I have 1 list of all 80 doctors . The patient selects a doctor and we look up which group that doctor belongs to and display the appropriate page and options on that page. We also look up which doctor is on call for that group and pass their name and address on as  parameters to the email system 

     

  •  1,819
    Miloš replied

    Hi Franklin,
    Thank you for your inquire

    1 choose their doctor from a dropdown list (page 1) and 2 depending on the doctor the system will display the appropriate schedule on the appropriate page  (different page 2)

    We do have this and my suggestion is to check out our demo sites to see how this looks like .


    3. we collect the kind of service they require ( phone zoom or in person) and some confidential health information  

    Do you need to write those confidential information to appointment or this is just said in person with doctor?



    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • franklin replied

    either within amelia or within elementor we need to maintain  databases that looks something like 


    date                                   group           on call 

    monday  june 1 2021       1                  dr smith    dr jones

                                                2                  dr brown 

                                                3                   dr allen

    tuesday june 2 2022      


    and another database that contains emails and other information about the doctors

     dr smith    fredsmith@ gmail.com

    dr brown    [email protected]

    etc


    the patient is one of mine (dr sheps) he selects me from the drop down box.  I am part of group 2   so amelia needs to present the group 2 schedule . the patient chooses a phone appointment for the doctor on call for group 2 who is dr brown 

    so we need to pass to amelia that the doctor on call is dr brown and his email is allanbrown so that he can be the recipient of an email with the patient information including the confidential information. 

    in database terms 

    we would be calling a subroutine (amelia) from the main routine and passing the parameters of dr brown and his email which we obtained by doing lookups to the two databases

    eg  do amelia with ("group2", dr allan brown, [email protected])

    and amelia would use this information to display the correct form ( the one for group 2 ) and send the correct email 

    It is a bit simpler because we can grab the doctor on call for the day immediately because we only book 1 day ahead otherwise we would have to grab the doctor after the patient makes its selection 

    In essence we have 3 groups but we have 80 doctors that share the three calendars 

    I hope that is clearer 


    franklin 











        

  •  1,819
    Miloš replied

    Hi franklin,

    Thank you for your explanation.

    Sorry to disappoint you but unfortunately in this case our plugin will not do the trick here, since we do not have option like this "I am part of group 2   so Amelia needs to present the group 2 schedule"

    The schedule is displayed based on the selected employee (doctor) and we do not have this option in the plugin built-in features.

    Also all 3 doctors in this case can not share 3 calendars, only 1 calendar is available.

    AS for the database: the display of the table that you described does not looks like it in our plugin.

    There is no group column, or something similar.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables