merge-requests/139/head
hussam al-habibeh 6 years ago
commit 420cc0622c

@ -27,6 +27,8 @@ const GET_PATIENT_LAB_OREDERS =
const GET_PRESCRIPTION = 'Patients.svc/REST/GetPrescriptionApptList';
const GET_RADIOLOGY = 'DoctorApplication.svc/REST/GetPatientRadResult';
const LIVE_CARE_STATISTICS_FOR_CERTAIN_DOCTOR_URL = "Lists.svc/REST/DashBoard_GetLiveCareDoctorsStatsticsForCertainDoctor";
var selectedPatientType = 1;
//*********change value to decode json from Dropdown ************

@ -0,0 +1,36 @@
class StatsticsForCertainDoctorRequest {
bool outSA;
int doctorID;
String tokenID;
int channel;
int projectID;
String generalid;
StatsticsForCertainDoctorRequest(
{this.outSA,
this.doctorID,
this.tokenID,
this.channel,
this.projectID,
this.generalid});
StatsticsForCertainDoctorRequest.fromJson(Map<String, dynamic> json) {
outSA = json['OutSA'];
doctorID = json['DoctorID'];
tokenID = json['TokenID'];
channel = json['Channel'];
projectID = json['ProjectID'];
generalid = json['generalid'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['OutSA'] = this.outSA;
data['DoctorID'] = this.doctorID;
data['TokenID'] = this.tokenID;
data['Channel'] = this.channel;
data['ProjectID'] = this.projectID;
data['generalid'] = this.generalid;
return data;
}
}

@ -0,0 +1,68 @@
import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/models/doctor/statstics_for_certain_doctor_request.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:flutter/cupertino.dart';
Helpers helpers = Helpers();
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
StatsticsForCertainDoctorRequest _statsticsForCertainDoctorRequest = StatsticsForCertainDoctorRequest();
var certainDoctorsStasticsList = [];
/*@author: ibrahem albitar
*@Date:22/6/2020
*@desc: Doctor Provider
*/
class DoctorsProvider with ChangeNotifier {
bool isLoading = false;
bool isError = false;
String error = '';
resetDefaultValues() {
isLoading = true;
isError = false;
error = '';
notifyListeners();
}
/*@author: ibrahem albitar
*@Date:22/6/2020
*@desc: StatsticsForCertainDoctor
*/
getStatsticsForCertainDoctor(String generalId) async {
resetDefaultValues();
try {
_statsticsForCertainDoctorRequest.generalid = generalId;
await BaseAppClient.post(LIVE_CARE_STATISTICS_FOR_CERTAIN_DOCTOR_URL,
onSuccess: (dynamic response, int statusCode) {
certainDoctorsStasticsList = response['List_LiveCareCertainDoctorsStastics'];
isLoading = false;
isError = false;
this.error = '';
}, onFailure: (String error, int statusCode) {
isLoading = false;
isError = true;
this.error = error;
}, body: _statsticsForCertainDoctorRequest.toJson());
notifyListeners();
} catch (err) {
handelCatchErrorCase(err);
}
}
handelCatchErrorCase(err) {
isLoading = false;
isError = true;
error = helpers.generateContactAdminMsg(err);
notifyListeners();
throw err;
}
}

@ -60,6 +60,10 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
hintText: TranslationBase.of(context).searchMedicineNameHere,
controller: myController,
onSaved: (value) {},
onFieldSubmitted: (value){
searchMedicine(context);
},
textInputAction: TextInputAction.search,
inputFormatter: ONLY_LETTERS),
),
Container(

@ -61,7 +61,9 @@ class _InsuranceApprovalsState extends State<InsuranceApprovalsScreen> {
patientTypeID: patient.patientType,
languageID: 2);
patientsProv
.getPatientInsuranceApprovals(insuranceApprovalsRequest.toJson());
.getPatientInsuranceApprovals(insuranceApprovalsRequest.toJson()).then((c){
approvalsList = patientsProv.insuranceApporvalsList;
});
}
@override
@ -97,6 +99,7 @@ class _InsuranceApprovalsState extends State<InsuranceApprovalsScreen> {
onChanged: (String str) {
this.searchData(str);
},
textInputAction: TextInputAction.done,
decoration: buildInputDecoration(
context,
TranslationBase.of(context)

@ -59,7 +59,9 @@ class _PatientsOrdersState extends State<PatientsOrdersScreen> {
tokenID: token,
patientTypeID: patient.patientType,
languageID: 2);
patientsProv.getPatientProgressNote(progressNoteRequest.toJson());
patientsProv.getPatientProgressNote(progressNoteRequest.toJson()).then((c){
notesList = patientsProv.patientProgressNoteList;
});
}
@override
@ -94,6 +96,7 @@ class _PatientsOrdersState extends State<PatientsOrdersScreen> {
onChanged: (String str) {
this.searchData(str);
},
textInputAction: TextInputAction.done,
decoration: buildInputDecoration(context,
TranslationBase.of(context).searchOrders),
),

@ -59,7 +59,9 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
tokenID: token,
patientTypeID: patient.patientType,
languageID: 2);
patientsProv.getPatientProgressNote(progressNoteRequest.toJson());
patientsProv.getPatientProgressNote(progressNoteRequest.toJson()).then((c){
notesList = patientsProv.patientProgressNoteList;
});
}
@override
@ -94,6 +96,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
onChanged: (String str) {
this.searchData(str);
},
textInputAction: TextInputAction.done,
decoration: buildInputDecoration(context,
TranslationBase.of(context).searchNote),
),

@ -19,7 +19,9 @@ class AppTextFormField extends FormField<String> {
bool autovalidate = true,
TextInputType textInputType,
String hintText,
FocusNode focusNode
FocusNode focusNode,
TextInputAction textInputAction,
ValueChanged<String> onFieldSubmitted,
}) : super(
onSaved: onSaved,
validator: validator,
@ -34,6 +36,8 @@ class AppTextFormField extends FormField<String> {
onChanged: onChanged?? (value){
state.didChange(value);
},
textInputAction: textInputAction,
onFieldSubmitted: onFieldSubmitted,
decoration: InputDecoration(
hintText: hintText,
hintStyle: TextStyle(fontSize: SizeConfig.textMultiplier * 2),

Loading…
Cancel
Save