merge-requests/76/head
Mohammad ALjammal 6 years ago
commit 9ce7d3267b

2
.gitignore vendored

@ -39,3 +39,5 @@ lib/generated_plugin_registrant.dart
.vscode/settings.json
.vscode/settings.json
.vscode/settings.json
.vscode/settings.json
.vscode/settings.json

@ -1,7 +1,7 @@
{
"commentBox.styles": {
"defaultStyle": {
"commentStartToken": "/* \n *@author: ibrahim albitar \n *@Date:27/4/2020 \n *@param: \n *@return:\n *@desc: ",
"commentStartToken": "/* \n *@author: Amjad Amireh \n *@Date:27/4/2020 \n *@param: \n *@return:\n *@desc: ",
"commentEndToken": "\n */",
"leftEdgeToken": " * ",
"rightEdgeToken": "",

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/screens/patients/profile/insurance_approvals_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/patient_orders_screen.dart';
@ -18,6 +19,7 @@ import './screens/doctor/services_screen.dart';
import './screens/medicine/medicine_search_screen.dart';
import './screens/medicine/pharmacies_list_screen.dart';
import './screens/patients/patient_search_screen.dart';
import './screens/patients/patients_referred_screen.dart';
import './screens/patients/patients_screen.dart';
import './screens/patients/profile/lab_result/lab_orders_screen.dart';
import './screens/patients/profile/patient_profile_screen.dart';
@ -41,6 +43,7 @@ const String QR_READER = 'qr-reader';
const String PATIENT_SEARCH = 'patients/patient-search';
const String PATIENTS = 'patients/patients';
const String PATIENTS_PROFILE = 'patients/patients-profile';
const String PATIENTS_REFERRED = 'patients/patients-referred';
const String BLOOD_BANK = 'blood-bank';
const String DOCTOR_REPLY = 'doctor-reply';
const String MEDICINE_SEARCH = 'medicine/medicine-search';
@ -64,6 +67,7 @@ var routes = {
PROFILE: (_) => ProfileScreen(),
MY_SCHEDULE: (_) => MyScheduleScreen(),
PATIENT_SEARCH: (_) => PatientSearchScreen(),
PATIENTS_REFERRED:(_)=>PatientReferredScreen(),
PATIENTS: (_) => PatientsScreen(),
QR_READER: (_) => QrReaderScreen(),
BLOOD_BANK: (_) => BloodBankScreen(),

@ -58,7 +58,16 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
PatientOutSA: false);
void _validateInputs() async {
print("============== _selectedType============"+ _selectedType);
if(_selectedType!='3')
{
try {
//====================
//_selectedType=='3'?
//=====================
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile =
new DoctorProfileModel.fromJson(profile);
@ -93,6 +102,15 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
} catch (err) {
handelCatchErrorCase(err);
}
}
else
{
Navigator.of(context).pushNamed(PATIENTS_REFERRED, arguments: {
"patientSearchForm": _patientSearchFormValues,
"selectedType": _selectedType
});
}
}
handelCatchErrorCase(err) {

@ -0,0 +1,102 @@
/*
*@author: Amjad Amireh Modified Referred Patients
*@Date:27/5/2020
*@desc:
*/
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/expandable_item_widget.dart';
import 'package:flutter/material.dart';
class PatientReferredScreen extends StatefulWidget {
PatientReferredScreen({Key key}) : super(key: key);
@override
_PatientReferredScreenState createState() => _PatientReferredScreenState();
}
class _PatientReferredScreenState extends State<PatientReferredScreen> {
String patientType;
String patientTypetitle;
List<Map<dynamic,dynamic>>list_product;
@override
void initState() {
super.initState();
list_product=new List();
for(var k=1;k<=5;k++)
{
Map map=Map();
map.putIfAbsent(getName(k), ()=>getContent());
list_product.add(map);
}
list_product.map((s){
}).map((list)=>list).toList();}
@override
Widget build(BuildContext context) {
List<String>list=List();
return AppScaffold(
appBarTitle: "My Referred Patients",//patientTypetitle,
body: Center(
child: ListView(
children: <Widget>[
for(final map in list_product)
for(final keys in map.keys)
ExpandableItem(keys,map[keys].toList())
,
],
)
),
);
}
String getName(int month)
{
switch(month)
{
case 1:
return "Mahmoud Shrouf";
case 2:
return "Mahmoud Shrouf";
case 3:
return "Mahmoud Shrouf";
case 4:
return "Mahmoud Shrouf";
case 5:
return "Mahmoud Shrouf";
case 6:
return "Mahmoud Shrouf";
case 7:
return "Mahmoud Shrouf";
case 8:
return "Mahmoud Shrouf";
case 9:
return "Mahmoud Shrouf";
case 10:
return "Mahmoud Shrouf";
case 11:
return "Mahmoud Shrouf";
case 12:
return "Mahmoud Shrouf";
}
}
List<dynamic> getContent()
{
return ["1","2","3","4","5","6"].toList();
}
}

@ -374,8 +374,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
.start,
children: [
Image.network(
"https://p.kindpng.com/picc/s/404-4042774_profile-photo-circle-circle-profile-picture-png-transparent.png",
"https://p.kindpng.com/picc/s/404-4042774_profile-photo-circle-circle-profile-picture-png-transparent.png",
height: 100,
width: 100),
],
@ -472,8 +471,9 @@ class _PatientsScreenState extends State<PatientsScreen> {
),
),
SizedBox(
width:60,
),
width:
60,
),
Container(
child:
AppText(

@ -165,6 +165,37 @@ class Helpers {
),
);
}
/*
*@author: Amjad Amireh
*@Date:5/5/2020
*@param: checkDate
*@return: DateTime
*@desc: convert String to DateTime
*/
static String checkDate(String dateString) {
DateTime checkedTime = DateTime.parse(dateString);
DateTime currentTime = DateTime.now();
if ((currentTime.year == checkedTime.year) &&
(currentTime.month == checkedTime.month) &&
(currentTime.day == checkedTime.day)) {
return "Today";
} else if ((currentTime.year == checkedTime.year) &&
(currentTime.month == checkedTime.month)) {
if ((currentTime.day - checkedTime.day) == 1) {
return "YESTERDAY";
} else if ((currentTime.day - checkedTime.day) == -1) {
return "Tomorrow";
}
if ((currentTime.day - checkedTime.day) <= -2) {
return "Next Week";
} else {
return "Old Date";
}
}
return "Old Date";
}
/*
*@author: Mohammad Aljammal
@ -286,6 +317,9 @@ class Helpers {
return myWorkingHours;
}
/*
*@author: Elham Rababah
*@Date:12/5/2020

@ -0,0 +1,91 @@
/*
*@author: Amjad Amireh
*@Date:27/5/2020
*@param:listItems , headerTitle
*@return:ListItem Expand
*@desc:
*/
import 'package:flutter/material.dart';
class ExpandableItem extends StatefulWidget{
final List<String>listItems;
final String headerTitle;
ExpandableItem(this.headerTitle,this.listItems);
@override
_ExpandableItemState createState() => _ExpandableItemState();
}
class _ExpandableItemState extends State<ExpandableItem>
{
bool isExpand=false;
@override
void initState() {
super.initState();
isExpand=false;
}
@override
Widget build(BuildContext context) {
List<String>listItem=this.widget.listItems;
return Container(
child: Padding(
padding: (isExpand==true)?const EdgeInsets.all(6.0):const EdgeInsets.all(8.0),
child: Container(
decoration:BoxDecoration(
color: Colors.white,
borderRadius: (isExpand!=true)?BorderRadius.all(Radius.circular(50)):BorderRadius.all(Radius.circular(25)),
),
child: ExpansionTile(
key: PageStorageKey<String>(this.widget.headerTitle),
title: Container(
width: double.infinity,
child: Text(this.widget.headerTitle,style: TextStyle(fontSize: (isExpand!=true)?18:22,color: Colors.black,fontWeight: FontWeight.bold),)),
trailing: (isExpand==true)?Icon(Icons.keyboard_arrow_up,color: Colors.black,):Icon(Icons.keyboard_arrow_down,color: Colors.black),
onExpansionChanged: (value){
setState(() {
isExpand=value;
});
},
children: [
for(final item in listItem)
Padding(
padding: const EdgeInsets.all(8.0),
child: InkWell(
onTap: (){
print(Text("Selected Item $item "+this.widget.headerTitle ));
//========Stop Snak bar=========== Scaffold.of(context).showSnackBar(SnackBar(backgroundColor: Colors.black,duration:Duration(microseconds: 500),content: Text("Selected Item $item "+this.widget.headerTitle )));
},
child: Container(
width: double.infinity,
decoration:BoxDecoration(
color: Colors.white,
border: Border(top: BorderSide(color: Theme.of(context).dividerColor))
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(item,style: TextStyle(color: Colors.black),),
)),
),
)
],
),
),
),
);
}
}
Loading…
Cancel
Save