Advertisement
Guest User

Manager Subpages Structural Code

a guest
Jul 20th, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 8.63 KB | None | 0 0
  1. class Info extends StatelessWidget {
  2.  
  3. // Test Subject Data
  4. var name = 'John Doe';
  5. var race = 'Asian';
  6. int PSA = 5;
  7. int age = 22;
  8. int systolic = 120;
  9. int diastolic = 80;
  10. bool cervicalCancerRisk = true;
  11. bool familyHistoryColorectal = true;
  12. bool heartDiseaseRisk = true;
  13. bool highBloodPressure = true;
  14. bool highRiskBP = true;
  15. bool highRiskCholestrol = true;
  16. bool puberty = true;
  17. date birthdate = July 20, 1994 at 12:00:00 AM UTC-5;
  18. date lastBloodPressureScreening = July 6, 2016 at 12:00:00 AM UTC-5;
  19. date lastColonoscopyScreening = July 20, 2016 at 12:00:00 AM UTC-5;
  20. date lastInfluenzaScreening = July 20, 2017 at 12:00:00 AM UTC-5;
  21. date lastProstateScreening = July 20, 1997 at 12:00:00 AM UTC-5;
  22.  
  23.  
  24.  @override
  25.  Widget build (BuildContext ctxt) {
  26.    return new Scaffold(
  27.      appBar: new AppBar(
  28.        title: new Text("Your Information"),
  29.      ),
  30.      body: Column(
  31.          mainAxisAlignment: MainAxisAlignment.spaceAround,
  32.        children: [
  33.              Row(
  34.                  children: [
  35.                      Text('Name: '),
  36.                      new Flexible(
  37.                        child: new Text('$name')
  38.                      )
  39.                  ]
  40.              ),
  41.              Row(
  42.                  children: [
  43.                      Text('Age: '),
  44.                      new Flexible(
  45.                        child: new Text($age)
  46.                      )
  47.                  ]
  48.              ),
  49.              Row(
  50.                  children: [
  51.                      Text('Race: '),
  52.                      new Flexible(
  53.                        child: new Text($race)
  54.                      )
  55.                  ]
  56.              ),
  57.              Row(
  58.                  children: [
  59.                      Text('Birthdate '),
  60.                      new Flexible(
  61.                        child: new Text($birthdate)
  62.                      )
  63.                  ]
  64.              ),
  65.              Row(
  66.                  children: [
  67.                      Text('Systolic / Diastolic: '),
  68.                      new Flexible(
  69.                        child: new Text($systolic + ' / ' + $diastolic)
  70.                      )
  71.                  ]
  72.              ),
  73.              Row(
  74.                  children: [
  75.                      Text('High Blood Pressure: '),
  76.                      new Flexible(
  77.                        child: new Text($highBloodPressure)
  78.                      )
  79.                  ]
  80.              ),
  81.              Row(
  82.                  children: [
  83.                      Text('High Blood Pressure Risk: '),
  84.                      new Flexible(
  85.                        child: new Text($highRiskBP)
  86.                      )
  87.                  ]
  88.              ),
  89.              Row(
  90.                  children: [
  91.                      Text('High Cholesterol Risk: '),
  92.                      new Flexible(
  93.                        child: new Text($highRiskCholestrol)
  94.                      )
  95.                  ]
  96.              ),
  97.              Row(
  98.                  children: [
  99.                      Text('Heart Disease Risk: '),
  100.                      new Flexible(
  101.                        child: new Text($heartDiseaseRisk)
  102.                      )
  103.                  ]
  104.              )
  105.          ]
  106.      )
  107.    );
  108.  }
  109. }
  110.  
  111. class Current extends StatelessWidget {
  112.  
  113. // Current Schedule Data
  114. // list from DB
  115. var list;
  116. var element;
  117. date nextBloodPressureScreening = August 6, 2019 at 12:00:00 AM UTC-5;
  118. date nextColonoscopyScreening = July 25, 2019 at 12:00:00 AM UTC-5;
  119. date nextInfluenzaScreening = July 20, 2021 at 12:00:00 AM UTC-5;
  120. date nextProstateScreening = July 20, 2020 at 12:00:00 AM UTC-5;
  121.  
  122.  
  123.  @override
  124.  Widget build (BuildContext ctxt) {
  125.    return new Scaffold(
  126.      appBar: new AppBar(
  127.        title: new Text("Currently Scheduled Procedures"),
  128.      ),
  129.      body: Column(
  130.          mainAxisAlignment: MainAxisAlignment.spaceAround,
  131.             child: [
  132.              Row(
  133.                  children: [
  134.                      Text('Currently Scheduled Appointments: '),
  135.                      Column(
  136.                         children: [
  137.                             new Flexible(
  138.                                 // Loop thru list object and call below statement each time
  139.                                 // for each element in list
  140.                                 child: new Text($'element')
  141.                             )
  142.                         ]
  143.                      )
  144.                  ]
  145.              )
  146.          ]
  147.      )
  148.    );
  149.  }
  150. }
  151.  
  152. class Schedule extends StatelessWidget {
  153.  
  154. // All Possible Procedures Data
  155. // list from DB
  156. var list;
  157.  
  158.  
  159.  @override
  160.  Widget build (BuildContext ctxt) {
  161.    return new Scaffold(
  162.      appBar: new AppBar(
  163.        title: new Text("Your Information"),
  164.      ),
  165.      body: Column(
  166.          mainAxisAlignment: MainAxisAlignment.spaceAround,
  167.             child: [
  168.              Row(
  169.                  children: [
  170.                      Text('Schedule a New Appointment: '),
  171.                      Column(
  172.                         children: [
  173.                             new Flexible(
  174.                                 for (var element in list)
  175.                                     child: new RaisedButton(
  176.                                         onPressed: () {
  177.                                             //TODO: What action to take once you push to schedule
  178.                                             Navigator.push(
  179.                                                 ctxt,
  180.                                                 new MaterialPageRoute(builder: (ctxt) => new ()),
  181.                                             );
  182.                                         },
  183.                                         child: Text('$element')
  184.                                     )
  185.                             )
  186.                         ]
  187.                      )
  188.                  ]
  189.              )
  190.          ]
  191.      )
  192.    );
  193.  }
  194. }
  195.  
  196. class Faq extends StatelessWidget {
  197.  @override
  198.  Widget build (BuildContext ctxt) {
  199.    return new Scaffold(
  200.      appBar: new AppBar(
  201.        title: new Text("Frequently Asked Questions"),
  202.      ),
  203.      body: Column(
  204.          mainAxisAlignment: MainAxisAlignment.spaceAround,
  205.             children: [
  206.              Row(
  207.                  children: [
  208.                      Column(
  209.                         children: [
  210.                             new Flexible (
  211.                                 Text('When should I schedule a blood pressure screening?'),
  212.                                 Text('It is recommended men receive a blood pressure screening at least every two years, beginning at age 18.')
  213.                                 Text('Women should also schedule a blood pressure screening, beginning at age 18, at least every two years if blood pressure is normal (lower than 120/80).  Get checked annually if blood pressure is between 120/80 and 139/89.  Discuss with your doctor if you have a blood pressure of 140/90 or higher.')
  214.                             )
  215.                         ]
  216.                      )
  217.                  ]
  218.              ),
  219.              Row(
  220.                  children: [
  221.                      Column(
  222.                         children: [
  223.                             new Flexible (
  224.                             Text('When should I schedule a cholesterol screening?')
  225.                             Text('Men should receive a baseline screening from age 17 to 21.  Routine screenings beginning at age 25 for men with high-risk factors, and age 35 for men with no risk factors.')
  226.                             Text('For women with increased risk for heart disease, a regular test is needed, starting at age 20.  Ask your doctor how often this is needed.')
  227.                             )
  228.                         ]
  229.                      )
  230.                  ]
  231.              ),
  232.              Row(
  233.                  children: [
  234.                      Column(
  235.                         children: [
  236.                         new Flexible (
  237.                             Text('When is an influenza(flu) vaccine recommended?'),
  238.                             Text('An annual influenza vaccine is recommended for both men and women aged 17 and older.)
  239.                         )
  240.                         ]
  241.                      )
  242.                 ]
  243.             ),
  244.              Row(
  245.                 children: [
  246.                      Column(
  247.                         children: [
  248.                         new Flexible (
  249.                             Text('When is a pneumonia vaccine recommended?'),
  250.                             Text('For men and women, two different vaccines are recommended at age 65 and older.')
  251.                         )
  252.                         ]
  253.                      )
  254.                 ]
  255.             ),
  256.              Row(
  257.                 children: [
  258.                      Column(
  259.                         children: [
  260.                         new Flexible (
  261.                             Text('When is a shingles vaccine recommended?'),
  262.                             Text('For men and women, a one-time vaccination is recommended at age 60 and older.')
  263.                         )
  264.                         ]
  265.                      )
  266.                 ]
  267.             ),
  268.              Row(
  269.                 children: [
  270.                      Column(
  271.                         children: [
  272.                         new Flexible (
  273.                             Text('When is a tetenus vaccine recommended?'),
  274.                             Text('For men and women aged 17 and older, a tetenus vaccine is recommended every ten years.')
  275.                         )
  276.                         ]
  277.                      )
  278.                 ]
  279.             )
  280.         ]
  281.     )
  282.   );
  283. }
  284. }
  285.  
  286. class About extends StatelessWidget {
  287. @override
  288. Widget build (BuildContext ctxt) {
  289.   return new Scaffold(
  290.     appBar: new AppBar(
  291.       title: new Text("About Us"),
  292.      ),
  293.     body: Column(
  294.         mainAxisAlignment: MainAxisAlignment.spaceAround,
  295.             children: [
  296.             new Flexible (
  297.                 Text('This app was created on the premise that patients should have greater ease-of-access for information, personalization and consultion about recommended preventative health procedures, such as cancer screenings and vaccines.'),
  298.                 Text(''),
  299.                 Text('Developers: Michael Chang, Will Wang, Dipak Subramaniam, James Goede, Will Wissmiller'),
  300.                 Text('Contact Us: Saint Francis Healthcare: (573)331-3000')
  301.                 Text('Website: www.sfmc.net')
  302.             )
  303.             ]
  304.         )
  305.     );
  306. }
  307. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement