by @Mariam Fork
{"functions":[],"name":"Hospital Appointment System","main":{"rawId":"main","tpe":"Void","name":"main","statements":[{"@type":"Begin","id":"id_4908ad4a_4123_47a8_8f5b_340e49a9a067"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"String","name":"PatientName","lengthValue2":"5","id":"id_0e13bcc6_f27d_4c34_8a56_8e8bd53adf06","initValue":null},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Integer","name":"PatientID","lengthValue2":"5","id":"id_47173341_60f2_4df8_a640_c0ab62c7b49e","initValue":null},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"String","name":"Specialty","lengthValue2":"5","id":"id_e9ac5022_ed1a_4820_956f_a0893c92b1d3","initValue":null},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"String","name":"PreferredTime","lengthValue2":"5","id":"id_d701d9a9_0c97_4c4f_a55e_f38c4c23f77d","initValue":null},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"String","name":"AlternativeTime","lengthValue2":"5","id":"id_201254e4_9a3c_4343_8695_03bf57939790","initValue":null},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Integer","name":"AcceptAlternative","lengthValue2":"5","id":"id_dfa42d54_ea98_47e8_b0a9_6b68a57b1a6f","initValue":null},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"String","name":"ContinueChoice","lengthValue2":"5","id":"id_aca6e19a_186c_4f8d_9ba4_d37f878f3aff","initValue":null},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"String","name":"AppointmentStatus","lengthValue2":"5","id":"id_80af7b2b_c37c_470b_af5c_7c7532f57cdb","initValue":null},{"newline":true,"@type":"Output","id":"id_31daec40_7d73_401d_b310_3869bb34db15","value":"\"Welcome to the Hospital Appointment System.\""},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Integer","name":"PatientStatus","lengthValue2":"5","id":"id_9a66ab6a_e84e_4df8_83c3_a6f634238ef0","initValue":null},{"condition":"PatientStatus < 1 || PatientStatus > 2","@type":"DoWhile","id":"id_897004a6_6764_427d_9143_3ab80020a244","body":{"statements":[{"newline":true,"@type":"Output","id":"id_dd8d3626_20f3_4f51_9c70_6f90d394a175","value":"\"Please enter your patient type:-\""},{"newline":true,"@type":"Output","id":"id_7b04567f_ac76_4da4_aa3f_74c047bda8a7","value":"\"1. New Patient\""},{"newline":true,"@type":"Output","id":"id_82e705b3_253c_4f88_9e31_894d3c057031","value":"\"2. Existing Patient\""},{"@type":"Input","name":"PatientStatus","id":"id_5b689855_3790_42f3_8cf3_2563dd227614","prompt":"(Enter 1 or 2):"},{"falseBlock":{"statements":[],"id":"id_16c9fc32_bdab_4d9f_975e_878a71b8ca44"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_af7fb5e4_0468_4a08_a35b_b21d6fa82bb1","value":"\"Invalid choice. Please enter 1 or 2.\""}],"id":"id_f3f9ce1f_a7a4_4703_9d93_77c9e5c0c640"},"condition":"(PatientStatus != 1) && (PatientStatus != 2)","@type":"If","id":"id_ce29f42c_d751_4864_9e6c_495301d70691"}],"id":"id_548a2171_865d_466f_94db_6c544f7365cd"}},{"falseBlock":{"statements":[{"@type":"Input","name":"PatientName","id":"id_0ad576dd_d953_40d9_8cc1_35ee8c41f6ce","prompt":"Please enter the patient's full name:"},{"@type":"Input","name":"PatientID","id":"id_88da2c95_5248_44b3_a0c9_99935d3fe112","prompt":"Please enter your patient ID:"},{"newline":true,"@type":"Output","id":"id_0d6a5f7b_7b59_472d_9df3_b2d9fe6a049c","value":"\"Welcome, \" + PatientName + \"! Your patient ID has been accepted. You may proceed to book your appointment.\""}],"id":"id_fed10466_efeb_4fe7_9adb_935af4dd24ea"},"trueBlock":{"statements":[{"@type":"Input","name":"PatientName","id":"id_cd08c09c_dc9a_45f7_a0ac_384664f4476d","prompt":"Please enter the patient's full name:"},{"@type":"Assign","name":"PatientID","id":"id_99a172c0_9d43_4424_b33e_3237111eecf4","value":"448812957"},{"newline":true,"@type":"Output","id":"id_9d0b585e_c8e2_4a17_9fb7_c09f8404c471","value":"\"Welcome, \" + PatientName + \"! Your new patient ID is \" + PatientID + \". \""},{"newline":true,"@type":"Output","id":"id_267bc834_67f7_4b6c_a599_21452b9cb64d","value":"\"Your registration has been completed successfully, you may proceed to book your appointment.\""}],"id":"id_31ed303a_1c97_43df_be30_61ec9b07b95b"},"condition":"PatientStatus == 1","@type":"If","id":"id_fa51c4c9_ebb8_42cd_ae04_c47e49735f3e"},{"@type":"Input","name":"Specialty","id":"id_d6593b5c_c713_4eae_8244_c9b2dd147b46","prompt":"Please enter your required medical specialty:"},{"@type":"Input","name":"PreferredTime","id":"id_490a4b13_421c_4f19_9aa2_205948752c25","prompt":"Please enter your preferred appointment time (12-hour format, e.g., 9:00 AM or 12:00 PM):"},{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_f0bf9e4e_2ba1_49bf_aaa3_b680e4ebe283","value":"\"Your preferred slot is unavailable. The hospital offers an alternative appointment at 3:30 PM.\""},{"condition":"(AcceptAlternative != 1) && (AcceptAlternative != 2)","@type":"DoWhile","id":"id_9927199c_06d0_4a33_96e5_f14e7aa00e83","body":{"statements":[{"newline":true,"@type":"Output","id":"id_7713665a_61f4_4aac_a065_b44e4a8a2e03","value":"\"Would you like to accept the alternative appointment?\""},{"newline":true,"@type":"Output","id":"id_9546db49_bb08_4354_95b7_ad6ee6c537cf","value":"\"1. Yes\""},{"newline":true,"@type":"Output","id":"id_cff89afd_b1b1_4733_a54c_0c513f61b969","value":"\"2. No\""},{"@type":"Input","name":"AcceptAlternative","id":"id_acf01b53_0282_4fd6_a46e_65b3b9cb3803","prompt":"(Enter 1 or 2):"},{"falseBlock":{"statements":[],"id":"id_306f1997_b8e0_473e_83b9_6a0f7e68fa2d"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_a5aaed16_2640_4180_8bcb_aa667c3c4c63","value":"\"Invalid choice. Please enter 1 or 2.\""}],"id":"id_56d50204_a546_47a4_8575_df0c6152b98b"},"condition":"(AcceptAlternative != 1) && (AcceptAlternative != 2)","@type":"If","id":"id_c92b6ef9_6035_4e96_985f_158b8c62a418"}],"id":"id_aa6691d3_69d0_45a2_96fa_0a69493d6950"}},{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_9524091d_d5fa_4994_b850_f8de035c9ae2","value":"\"The alternative appointment was rejected. No appointment has been confirmed.\""},{"@type":"Assign","name":"AppointmentStatus","id":"id_70b727ef_261d_4585_9fe4_ea48a6bf9519","value":"\"No appointment confirmed\""}],"id":"id_b444d4da_2588_4a21_90d6_d3ddfc83e24a"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_2d8466d2_fc8e_4657_91e5_25817ff4c2ff","value":"\"Your alternative appointment is confirmed!\""},{"@type":"Assign","name":"AppointmentStatus","id":"id_f3ed3a08_93dd_4d21_a79a_cad2cb195c2a","value":"\"Confirmed at alternative time (3:30 PM)\""}],"id":"id_8bae94a7_acaf_4cde_a9e0_b50370b36f5e"},"condition":"AcceptAlternative == 1","@type":"If","id":"id_29d5085e_c0e0_4e5c_bae9_5ddc773ae26e"}],"id":"id_fe692098_a276_4599_99ea_04c2926c3e19"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_b0c65a12_94e9_4448_ad07_5c094f77290d","value":"\"Your preferred appointment time is available. Your appointment is confirmed!\""},{"@type":"Assign","name":"AppointmentStatus","id":"id_87b32c0a_b1a3_4f95_9770_b7b1b810d8a6","value":"\"Confirmed\""}],"id":"id_1436c7df_699b_42bb_a123_f591f10460cc"},"condition":"PreferredTime == \"3:30 PM\"","@type":"If","id":"id_2d66c561_93e4_4f8c_8e1f_96271edafc94"},{"newline":true,"@type":"Output","id":"id_6bb504ec_9d43_4676_937f_74d29e02b025","value":"\"----- APPOINTMENT SUMMARY -----\""},{"newline":true,"@type":"Output","id":"id_b1985e03_2f97_4f17_9775_5d237c947e9a","value":"\"Patient Name: \" + PatientName"},{"newline":true,"@type":"Output","id":"id_0ec6f609_6681_46d9_884c_4ce75522ef3f","value":"\"Patient ID: \" + PatientID"},{"newline":true,"@type":"Output","id":"id_576c5917_8a5d_42e2_94c3_2e98e619d589","value":"\"Medical Specialty: \" + Specialty"},{"newline":true,"@type":"Output","id":"id_167a2d5d_bbb3_4cae_8d24_1dacb24b0a5e","value":"\"Requested Appointment Time: \" + PreferredTime"},{"newline":true,"@type":"Output","id":"id_09fe5867_de5c_4571_bda4_cc72da2cfb66","value":"\"Appointment Status: \" + AppointmentStatus"},{"@type":"Return","id":"id_280fb91d_e7f5_48b9_8f34_9e3a2874bc35","maybeValue":null}],"parameters":[]},"id":"id_e1b01b9a_036d_42d2_8511_a8edea57a3d2","config":{"showDebugVars":true,"useInputPrompt":true,"echoEnteredValue":true,"showIoBtns":false,"showFunctions":true,"lang":"python","showGenCode":true},"version":"0.3","revision":3111}