refere to doctor
parent
01f32a39f6
commit
39cc4fa4bf
@ -0,0 +1,80 @@
|
|||||||
|
class ClinicByProjectIdRequest {
|
||||||
|
|
||||||
|
/*
|
||||||
|
*@author: Ibrahim Albitar
|
||||||
|
*@Date:03/06/2020
|
||||||
|
*@param:
|
||||||
|
*@return:
|
||||||
|
*@desc: ClinicByProjectIdRequest
|
||||||
|
*/
|
||||||
|
|
||||||
|
int projectID;
|
||||||
|
int languageID;
|
||||||
|
String stamp;
|
||||||
|
String iPAdress;
|
||||||
|
double versionID;
|
||||||
|
int channel;
|
||||||
|
String tokenID;
|
||||||
|
String sessionID;
|
||||||
|
bool isLoginForDoctorApp;
|
||||||
|
bool patientOutSA;
|
||||||
|
int patientTypeID;
|
||||||
|
/*
|
||||||
|
{
|
||||||
|
"ProjectID": 21,
|
||||||
|
"LanguageID": 2,
|
||||||
|
"stamp": "2020-06-03T11:18:19.979Z",
|
||||||
|
"IPAdress": "11.11.11.11",
|
||||||
|
"VersionID": 1.2,
|
||||||
|
"Channel": 9,
|
||||||
|
"TokenID": "gyIQFH4WWEm2Tq7xjYMjsg==",
|
||||||
|
"SessionID": "JBXRsDl37L",
|
||||||
|
"IsLoginForDoctorApp": true,
|
||||||
|
"PatientOutSA": false,
|
||||||
|
"PatientTypeID": 1
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
ClinicByProjectIdRequest(
|
||||||
|
{this.projectID,
|
||||||
|
this.languageID = 2,
|
||||||
|
this.stamp = "2020-06-03T11:18:19.979Z",
|
||||||
|
this.iPAdress = "11.11.11.11",
|
||||||
|
this.versionID = 1.2,
|
||||||
|
this.channel = 9,
|
||||||
|
this.tokenID,
|
||||||
|
this.sessionID = "JBXRsDl37L",
|
||||||
|
this.isLoginForDoctorApp = true,
|
||||||
|
this.patientOutSA = false,
|
||||||
|
this.patientTypeID = 1});
|
||||||
|
|
||||||
|
ClinicByProjectIdRequest.fromJson(Map<String, dynamic> json) {
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
languageID = json['LanguageID'];
|
||||||
|
stamp = json['stamp'];
|
||||||
|
iPAdress = json['IPAdress'];
|
||||||
|
versionID = json['VersionID'];
|
||||||
|
channel = json['Channel'];
|
||||||
|
tokenID = json['TokenID'];
|
||||||
|
sessionID = json['SessionID'];
|
||||||
|
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
|
||||||
|
patientOutSA = json['PatientOutSA'];
|
||||||
|
patientTypeID = json['PatientTypeID'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
data['LanguageID'] = this.languageID;
|
||||||
|
data['stamp'] = this.stamp;
|
||||||
|
data['IPAdress'] = this.iPAdress;
|
||||||
|
data['VersionID'] = this.versionID;
|
||||||
|
data['Channel'] = this.channel;
|
||||||
|
data['TokenID'] = this.tokenID;
|
||||||
|
data['SessionID'] = this.sessionID;
|
||||||
|
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
|
||||||
|
data['PatientOutSA'] = this.patientOutSA;
|
||||||
|
data['PatientTypeID'] = this.patientTypeID;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,86 @@
|
|||||||
|
class DoctorsByClinicIdRequest {
|
||||||
|
|
||||||
|
/*
|
||||||
|
*@author: Ibrahim Albitar
|
||||||
|
*@Date:03/06/2020
|
||||||
|
*@param:
|
||||||
|
*@return:
|
||||||
|
*@desc: DoctorsByClinicIdRequest
|
||||||
|
*/
|
||||||
|
|
||||||
|
int projectID;
|
||||||
|
String clinicID;
|
||||||
|
int languageID;
|
||||||
|
String stamp;
|
||||||
|
String iPAdress;
|
||||||
|
double versionID;
|
||||||
|
int channel;
|
||||||
|
String tokenID;
|
||||||
|
String sessionID;
|
||||||
|
bool isLoginForDoctorApp;
|
||||||
|
bool patientOutSA;
|
||||||
|
int patientTypeID;
|
||||||
|
|
||||||
|
/*
|
||||||
|
{
|
||||||
|
"ProjectID": 21,
|
||||||
|
"ClinicID": "0",
|
||||||
|
"LanguageID": 2,
|
||||||
|
"stamp": "2020-06-03T11:22:04.702Z",
|
||||||
|
"IPAdress": "11.11.11.11",
|
||||||
|
"VersionID": 1.2,
|
||||||
|
"Channel": 9,
|
||||||
|
"TokenID": "gyIQFH4WWEm2Tq7xjYMjsg==",
|
||||||
|
"SessionID": "JBXRsDl37L",
|
||||||
|
"IsLoginForDoctorApp": true,
|
||||||
|
"PatientOutSA": false,
|
||||||
|
"PatientTypeID": 1
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
DoctorsByClinicIdRequest(
|
||||||
|
{this.projectID,
|
||||||
|
this.clinicID,
|
||||||
|
this.languageID = 2,
|
||||||
|
this.stamp = "2020-06-03T11:22:04.702Z",
|
||||||
|
this.iPAdress = "11.11.11.11",
|
||||||
|
this.versionID = 1.2,
|
||||||
|
this.channel = 9,
|
||||||
|
this.tokenID,
|
||||||
|
this.sessionID = "JBXRsDl37L",
|
||||||
|
this.isLoginForDoctorApp = true,
|
||||||
|
this.patientOutSA = false,
|
||||||
|
this.patientTypeID = 1});
|
||||||
|
|
||||||
|
DoctorsByClinicIdRequest.fromJson(Map<String, dynamic> json) {
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
clinicID = json['ClinicID'];
|
||||||
|
languageID = json['LanguageID'];
|
||||||
|
stamp = json['stamp'];
|
||||||
|
iPAdress = json['IPAdress'];
|
||||||
|
versionID = json['VersionID'];
|
||||||
|
channel = json['Channel'];
|
||||||
|
tokenID = json['TokenID'];
|
||||||
|
sessionID = json['SessionID'];
|
||||||
|
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
|
||||||
|
patientOutSA = json['PatientOutSA'];
|
||||||
|
patientTypeID = json['PatientTypeID'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
data['ClinicID'] = this.clinicID;
|
||||||
|
data['LanguageID'] = this.languageID;
|
||||||
|
data['stamp'] = this.stamp;
|
||||||
|
data['IPAdress'] = this.iPAdress;
|
||||||
|
data['VersionID'] = this.versionID;
|
||||||
|
data['Channel'] = this.channel;
|
||||||
|
data['TokenID'] = this.tokenID;
|
||||||
|
data['SessionID'] = this.sessionID;
|
||||||
|
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
|
||||||
|
data['PatientOutSA'] = this.patientOutSA;
|
||||||
|
data['PatientTypeID'] = this.patientTypeID;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,75 @@
|
|||||||
|
class STPReferralFrequencyRequest {
|
||||||
|
|
||||||
|
/*
|
||||||
|
*@author: Ibrahim Albitar
|
||||||
|
*@Date:03/06/2020
|
||||||
|
*@param:
|
||||||
|
*@return:
|
||||||
|
*@desc:
|
||||||
|
*/
|
||||||
|
|
||||||
|
int languageID;
|
||||||
|
String stamp;
|
||||||
|
String iPAdress;
|
||||||
|
double versionID;
|
||||||
|
int channel;
|
||||||
|
String tokenID;
|
||||||
|
String sessionID;
|
||||||
|
bool isLoginForDoctorApp;
|
||||||
|
bool patientOutSA;
|
||||||
|
int patientTypeID;
|
||||||
|
/*
|
||||||
|
{
|
||||||
|
"LanguageID": 2,
|
||||||
|
"stamp": "2020-06-03T11:18:19.986Z",
|
||||||
|
"IPAdress": "11.11.11.11",
|
||||||
|
"VersionID": 1.2,
|
||||||
|
"Channel": 9,
|
||||||
|
"TokenID": "gyIQFH4WWEm2Tq7xjYMjsg==",
|
||||||
|
"SessionID": "JBXRsDl37L",
|
||||||
|
"IsLoginForDoctorApp": true,
|
||||||
|
"PatientOutSA": false,
|
||||||
|
"PatientTypeID": 1
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
STPReferralFrequencyRequest(
|
||||||
|
{this.languageID = 2,
|
||||||
|
this.stamp = "2020-06-03T11:18:19.986Z",
|
||||||
|
this.iPAdress = "11.11.11.11",
|
||||||
|
this.versionID = 1.2,
|
||||||
|
this.channel = 9,
|
||||||
|
this.tokenID,
|
||||||
|
this.sessionID = "JBXRsDl37L",
|
||||||
|
this.isLoginForDoctorApp = true,
|
||||||
|
this.patientOutSA = false,
|
||||||
|
this.patientTypeID = 1});
|
||||||
|
|
||||||
|
STPReferralFrequencyRequest.fromJson(Map<String, dynamic> json) {
|
||||||
|
languageID = json['LanguageID'];
|
||||||
|
stamp = json['stamp'];
|
||||||
|
iPAdress = json['IPAdress'];
|
||||||
|
versionID = json['VersionID'];
|
||||||
|
channel = json['Channel'];
|
||||||
|
tokenID = json['TokenID'];
|
||||||
|
sessionID = json['SessionID'];
|
||||||
|
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
|
||||||
|
patientOutSA = json['PatientOutSA'];
|
||||||
|
patientTypeID = json['PatientTypeID'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['LanguageID'] = this.languageID;
|
||||||
|
data['stamp'] = this.stamp;
|
||||||
|
data['IPAdress'] = this.iPAdress;
|
||||||
|
data['VersionID'] = this.versionID;
|
||||||
|
data['Channel'] = this.channel;
|
||||||
|
data['TokenID'] = this.tokenID;
|
||||||
|
data['SessionID'] = this.sessionID;
|
||||||
|
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
|
||||||
|
data['PatientOutSA'] = this.patientOutSA;
|
||||||
|
data['PatientTypeID'] = this.patientTypeID;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,147 @@
|
|||||||
|
class ReferToDoctorRequest {
|
||||||
|
|
||||||
|
/*
|
||||||
|
*@author: Ibrahim Albitar
|
||||||
|
*@Date:03/06/2020
|
||||||
|
*@param:
|
||||||
|
*@return:
|
||||||
|
*@desc: ReferToDoctor
|
||||||
|
*/
|
||||||
|
|
||||||
|
int projectID;
|
||||||
|
int admissionNo;
|
||||||
|
String roomID;
|
||||||
|
String referralClinic;
|
||||||
|
String referralDoctor;
|
||||||
|
int createdBy;
|
||||||
|
int editedBy;
|
||||||
|
int patientID;
|
||||||
|
int patientTypeID;
|
||||||
|
int referringClinic;
|
||||||
|
int referringDoctor;
|
||||||
|
String referringDoctorRemarks;
|
||||||
|
String priority;
|
||||||
|
String frequency;
|
||||||
|
String extension;
|
||||||
|
int languageID;
|
||||||
|
String stamp;
|
||||||
|
String iPAdress;
|
||||||
|
double versionID;
|
||||||
|
int channel;
|
||||||
|
String tokenID;
|
||||||
|
String sessionID;
|
||||||
|
bool isLoginForDoctorApp;
|
||||||
|
bool patientOutSA;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
{
|
||||||
|
"ProjectID": 21,
|
||||||
|
"AdmissionNo": 2020005477,
|
||||||
|
"RoomID": "ISO-6",
|
||||||
|
"ReferralClinic": "36",
|
||||||
|
"ReferralDoctor": "230893",
|
||||||
|
"CreatedBy": 121814,
|
||||||
|
"EditedBy": 121814,
|
||||||
|
"PatientID": 3349491,
|
||||||
|
"PatientTypeID": 1,
|
||||||
|
"ReferringClinic": 14,
|
||||||
|
"ReferringDoctor": 121814,
|
||||||
|
"ReferringDoctorRemarks": "dfcdfdfdf",
|
||||||
|
"Priority": "1",
|
||||||
|
"Frequency": "1",
|
||||||
|
"Extension": "eeee",
|
||||||
|
"LanguageID": 2,
|
||||||
|
"stamp": "2020-06-03T11:26:42.358Z",
|
||||||
|
"IPAdress": "11.11.11.11",
|
||||||
|
"VersionID": 1.2,
|
||||||
|
"Channel": 9,
|
||||||
|
"TokenID": "gyIQFH4WWEm2Tq7xjYMjsg==",
|
||||||
|
"SessionID": "JBXRsDl37L",
|
||||||
|
"IsLoginForDoctorApp": true,
|
||||||
|
"PatientOutSA": false
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
ReferToDoctorRequest(
|
||||||
|
{this.projectID,
|
||||||
|
this.admissionNo,
|
||||||
|
this.roomID = "ISO-6",
|
||||||
|
this.referralClinic,
|
||||||
|
this.referralDoctor ,
|
||||||
|
this.createdBy,
|
||||||
|
this.editedBy ,
|
||||||
|
this.patientID,
|
||||||
|
this.patientTypeID = 1,
|
||||||
|
this.referringClinic,
|
||||||
|
this.referringDoctor,
|
||||||
|
this.referringDoctorRemarks,
|
||||||
|
this.priority ,
|
||||||
|
this.frequency,
|
||||||
|
this.extension,
|
||||||
|
this.languageID = 2,
|
||||||
|
this.stamp = "2020-06-03T11:26:42.358Z",
|
||||||
|
this.iPAdress = "11.11.11.11",
|
||||||
|
this.versionID = 1.2,
|
||||||
|
this.channel = 9,
|
||||||
|
this.tokenID,
|
||||||
|
this.sessionID = "JBXRsDl37L",
|
||||||
|
this.isLoginForDoctorApp = true,
|
||||||
|
this.patientOutSA = false});
|
||||||
|
|
||||||
|
ReferToDoctorRequest.fromJson(Map<String, dynamic> json) {
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
admissionNo = json['AdmissionNo'];
|
||||||
|
roomID = json['RoomID'];
|
||||||
|
referralClinic = json['ReferralClinic'];
|
||||||
|
referralDoctor = json['ReferralDoctor'];
|
||||||
|
createdBy = json['CreatedBy'];
|
||||||
|
editedBy = json['EditedBy'];
|
||||||
|
patientID = json['PatientID'];
|
||||||
|
patientTypeID = json['PatientTypeID'];
|
||||||
|
referringClinic = json['ReferringClinic'];
|
||||||
|
referringDoctor = json['ReferringDoctor'];
|
||||||
|
referringDoctorRemarks = json['ReferringDoctorRemarks'];
|
||||||
|
priority = json['Priority'];
|
||||||
|
frequency = json['Frequency'];
|
||||||
|
extension = json['Extension'];
|
||||||
|
languageID = json['LanguageID'];
|
||||||
|
stamp = json['stamp'];
|
||||||
|
iPAdress = json['IPAdress'];
|
||||||
|
versionID = json['VersionID'];
|
||||||
|
channel = json['Channel'];
|
||||||
|
tokenID = json['TokenID'];
|
||||||
|
sessionID = json['SessionID'];
|
||||||
|
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
|
||||||
|
patientOutSA = json['PatientOutSA'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
data['AdmissionNo'] = this.admissionNo;
|
||||||
|
data['RoomID'] = this.roomID;
|
||||||
|
data['ReferralClinic'] = this.referralClinic;
|
||||||
|
data['ReferralDoctor'] = this.referralDoctor;
|
||||||
|
data['CreatedBy'] = this.createdBy;
|
||||||
|
data['EditedBy'] = this.editedBy;
|
||||||
|
data['PatientID'] = this.patientID;
|
||||||
|
data['PatientTypeID'] = this.patientTypeID;
|
||||||
|
data['ReferringClinic'] = this.referringClinic;
|
||||||
|
data['ReferringDoctor'] = this.referringDoctor;
|
||||||
|
data['ReferringDoctorRemarks'] = this.referringDoctorRemarks;
|
||||||
|
data['Priority'] = this.priority;
|
||||||
|
data['Frequency'] = this.frequency;
|
||||||
|
data['Extension'] = this.extension;
|
||||||
|
data['LanguageID'] = this.languageID;
|
||||||
|
data['stamp'] = this.stamp;
|
||||||
|
data['IPAdress'] = this.iPAdress;
|
||||||
|
data['VersionID'] = this.versionID;
|
||||||
|
data['Channel'] = this.channel;
|
||||||
|
data['TokenID'] = this.tokenID;
|
||||||
|
data['SessionID'] = this.sessionID;
|
||||||
|
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
|
||||||
|
data['PatientOutSA'] = this.patientOutSA;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,269 @@
|
|||||||
|
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
import '../../../config/size_config.dart';
|
||||||
|
import '../../../providers/patients_provider.dart';
|
||||||
|
import '../../../util/dr_app_shared_pref.dart';
|
||||||
|
import '../../../widgets/shared/app_scaffold_widget.dart';
|
||||||
|
import '../../../widgets/shared/app_texts_widget.dart';
|
||||||
|
import '../../../widgets/shared/dr_app_circular_progress_Indeicator.dart';
|
||||||
|
|
||||||
|
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
|
||||||
|
|
||||||
|
/*
|
||||||
|
*@author: ibrahim albitar
|
||||||
|
*@Date:4/6/2020
|
||||||
|
*@param:
|
||||||
|
*@return:
|
||||||
|
*@desc:
|
||||||
|
*/
|
||||||
|
|
||||||
|
class ReferPatientScreen extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
_ReferPatientState createState() => _ReferPatientState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ReferPatientState extends State<ReferPatientScreen> {
|
||||||
|
PatientsProvider patientsProv;
|
||||||
|
var doctorsList;
|
||||||
|
var clinicsList;
|
||||||
|
var referralFrequancyList;
|
||||||
|
final _controller = TextEditingController();
|
||||||
|
var _isInit = true;
|
||||||
|
|
||||||
|
String _selectedClinic;
|
||||||
|
String _selectedDoctor;
|
||||||
|
String _selectedReferralFrequancy;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void didChangeDependencies() {
|
||||||
|
super.didChangeDependencies();
|
||||||
|
if (_isInit) {
|
||||||
|
patientsProv = Provider.of<PatientsProvider>(context);
|
||||||
|
patientsProv.getClinicsList();
|
||||||
|
patientsProv.getReferralFrequancyList();
|
||||||
|
setState(() {
|
||||||
|
clinicsList = patientsProv.clinicsList;
|
||||||
|
referralFrequancyList = patientsProv.referalFrequancyList;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
_isInit = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return AppScaffold(
|
||||||
|
appBarTitle: "Progress Note",
|
||||||
|
showAppDrawer: false,
|
||||||
|
showBottomBar: false,
|
||||||
|
body: patientsProv.isLoading
|
||||||
|
? DrAppCircularProgressIndeicator()
|
||||||
|
: patientsProv.isError
|
||||||
|
? DrAppEmbeddedError(error: patientsProv.error)
|
||||||
|
: clinicsList == null
|
||||||
|
? DrAppEmbeddedError(
|
||||||
|
error: 'You don\'t have any Progress Note')
|
||||||
|
: Column(
|
||||||
|
children: <Widget>[
|
||||||
|
RoundedContainer(
|
||||||
|
margin: 0,
|
||||||
|
showBorder: true,
|
||||||
|
raduis: 30,
|
||||||
|
borderColor: Color(0xff707070),
|
||||||
|
width: double.infinity,
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: SizeConfig.widthMultiplier * 0.9,
|
||||||
|
bottom: SizeConfig.widthMultiplier * 0.9,
|
||||||
|
right: SizeConfig.widthMultiplier * 3,
|
||||||
|
left: SizeConfig.widthMultiplier * 3),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
// add Expanded to have your dropdown button fill remaining space
|
||||||
|
child: DropdownButton(
|
||||||
|
isExpanded: true,
|
||||||
|
value: _selectedClinic,
|
||||||
|
iconSize: 40,
|
||||||
|
elevation: 16,
|
||||||
|
selectedItemBuilder:
|
||||||
|
(BuildContext context) {
|
||||||
|
return patientsProv
|
||||||
|
.getClinicNameList()
|
||||||
|
.map((item) {
|
||||||
|
return Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: <Widget>[
|
||||||
|
AppText(
|
||||||
|
item,
|
||||||
|
fontSize:
|
||||||
|
SizeConfig.textMultiplier *
|
||||||
|
2.1,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}).toList();
|
||||||
|
},
|
||||||
|
onChanged: (newValue) => {
|
||||||
|
setState(() {
|
||||||
|
_selectedDoctor = null;
|
||||||
|
_selectedClinic = newValue;
|
||||||
|
var clinicInfo =
|
||||||
|
clinicsList.singleWhere((i) =>
|
||||||
|
i['ClinicDescription']
|
||||||
|
.toString()
|
||||||
|
.contains(_selectedClinic));
|
||||||
|
var clinicId =
|
||||||
|
clinicInfo['ClinicID'].toString();
|
||||||
|
patientsProv.getDoctorsList(clinicId);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
items: patientsProv
|
||||||
|
.getClinicNameList()
|
||||||
|
.map((item) {
|
||||||
|
return DropdownMenuItem(
|
||||||
|
value: item.toString(),
|
||||||
|
child: Text(
|
||||||
|
item,
|
||||||
|
textAlign: TextAlign.end,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
//--------------------------------------------------------------------//
|
||||||
|
RoundedContainer(
|
||||||
|
margin: 0,
|
||||||
|
showBorder: true,
|
||||||
|
raduis: 30,
|
||||||
|
borderColor: Color(0xff707070),
|
||||||
|
width: double.infinity,
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: SizeConfig.widthMultiplier * 0.9,
|
||||||
|
bottom: SizeConfig.widthMultiplier * 0.9,
|
||||||
|
right: SizeConfig.widthMultiplier * 3,
|
||||||
|
left: SizeConfig.widthMultiplier * 3),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
// add Expanded to have your dropdown button fill remaining space
|
||||||
|
child: DropdownButton(
|
||||||
|
isExpanded: true,
|
||||||
|
value: _selectedDoctor,
|
||||||
|
iconSize: 40,
|
||||||
|
elevation: 16,
|
||||||
|
selectedItemBuilder:
|
||||||
|
(BuildContext context) {
|
||||||
|
return patientsProv
|
||||||
|
.getDoctorNameList()
|
||||||
|
.map((item) {
|
||||||
|
return Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: <Widget>[
|
||||||
|
AppText(
|
||||||
|
item,
|
||||||
|
fontSize:
|
||||||
|
SizeConfig.textMultiplier *
|
||||||
|
2.1,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}).toList();
|
||||||
|
},
|
||||||
|
onChanged: (newValue) => {
|
||||||
|
setState(() {
|
||||||
|
_selectedDoctor = newValue;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
items: patientsProv
|
||||||
|
.getDoctorNameList()
|
||||||
|
.map((item) {
|
||||||
|
return DropdownMenuItem(
|
||||||
|
value: item.toString(),
|
||||||
|
child: Text(
|
||||||
|
item,
|
||||||
|
textAlign: TextAlign.end,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
), //-----------------------------///
|
||||||
|
RoundedContainer(
|
||||||
|
margin: 0,
|
||||||
|
showBorder: true,
|
||||||
|
raduis: 30,
|
||||||
|
borderColor: Color(0xff707070),
|
||||||
|
width: double.infinity,
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: SizeConfig.widthMultiplier * 0.9,
|
||||||
|
bottom: SizeConfig.widthMultiplier * 0.9,
|
||||||
|
right: SizeConfig.widthMultiplier * 3,
|
||||||
|
left: SizeConfig.widthMultiplier * 3),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
// add Expanded to have your dropdown button fill remaining space
|
||||||
|
child: DropdownButton(
|
||||||
|
isExpanded: true,
|
||||||
|
value: _selectedReferralFrequancy,
|
||||||
|
iconSize: 40,
|
||||||
|
elevation: 16,
|
||||||
|
selectedItemBuilder:
|
||||||
|
(BuildContext context) {
|
||||||
|
return patientsProv
|
||||||
|
.getReferralNamesList()
|
||||||
|
.map((item) {
|
||||||
|
return Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: <Widget>[
|
||||||
|
AppText(
|
||||||
|
item,
|
||||||
|
fontSize:
|
||||||
|
SizeConfig.textMultiplier *
|
||||||
|
2.1,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}).toList();
|
||||||
|
},
|
||||||
|
onChanged: (newValue) => {
|
||||||
|
setState(() {
|
||||||
|
_selectedReferralFrequancy = newValue;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
items: patientsProv
|
||||||
|
.getReferralNamesList()
|
||||||
|
.map((item) {
|
||||||
|
return DropdownMenuItem(
|
||||||
|
value: item.toString(),
|
||||||
|
child: Text(
|
||||||
|
item,
|
||||||
|
textAlign: TextAlign.end,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue