Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into referral_in_patient

 Conflicts:
	lib/screens/patients/profile/note/progress_note_screen.dart
merge-requests/573/head
Mohammad Aljammal 5 years ago
commit a8dc3a8933

@ -85,80 +85,103 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
itemBuilder: (BuildContext ctxt, int index) { itemBuilder: (BuildContext ctxt, int index) {
return InkWell( return InkWell(
onTap: () { onTap: () {
Navigator.push( if (model
context, .medicalFileList[0]
MaterialPageRoute( .entityList[0]
builder: (context) => MedicalFileDetails( .timelines[index]
age: patient.age is String .timeLineEvents[0]
? patient.age ?? "" .consulations
: "${patient.age}", .length !=
firstName: patient.firstName, 0)
lastName: patient.lastName, Navigator.push(
gender: patient.genderDescription, context,
encounterNumber: index, MaterialPageRoute(
pp: patient.patientId, builder: (context) => MedicalFileDetails(
patient: patient, age: patient.age is String
doctorName: model ? patient.age ?? ""
.medicalFileList[0] : "${patient.age}",
.entityList[0] firstName: patient.firstName,
.timelines[index] lastName: patient.lastName,
.timeLineEvents[0] gender: patient.genderDescription,
.consulations encounterNumber: index,
.isNotEmpty pp: patient.patientId,
? model patient: patient,
.medicalFileList[0] doctorName: model
.entityList[0] .medicalFileList[0]
.timelines[index] .entityList[0]
.doctorName .timelines[index]
: "", .timeLineEvents[0]
clinicName: model .consulations
.medicalFileList[0] .isNotEmpty
.entityList[0] ? model
.timelines[index] .medicalFileList[0]
.timeLineEvents[0] .entityList[0]
.consulations .timelines[index]
.isNotEmpty .doctorName
? model : "",
.medicalFileList[0] clinicName: model
.entityList[0] .medicalFileList[0]
.timelines[index] .entityList[0]
.clinicName .timelines[index]
: "", .timeLineEvents[0]
doctorImage: model .consulations
.medicalFileList[0] .isNotEmpty
.entityList[0] ? model
.timelines[index] .medicalFileList[0]
.timeLineEvents[0] .entityList[0]
.consulations .timelines[index]
.isNotEmpty .clinicName
? model : "",
.medicalFileList[0] doctorImage: model
.entityList[0] .medicalFileList[0]
.timelines[index] .entityList[0]
.doctorImage .timelines[index]
: "", .timeLineEvents[0]
episode: model.medicalFileList[0].entityList[0].timelines[index].timeLineEvents[0].consulations.isNotEmpty .consulations
? model.medicalFileList[0].entityList[0].timelines[index].timeLineEvents[0].consulations[0].episodeID.toString() .isNotEmpty
: "", ? model
vistDate: model.medicalFileList[0].entityList[0].timelines[index].date.toString())), .medicalFileList[0]
); .entityList[0]
.timelines[index]
.doctorImage
: "",
episode: model.medicalFileList[0].entityList[0].timelines[index].timeLineEvents[0].consulations.isNotEmpty
? model.medicalFileList[0].entityList[0].timelines[index].timeLineEvents[0].consulations[0].episodeID.toString()
: "",
vistDate: model.medicalFileList[0].entityList[0].timelines[index].date.toString())),
);
}, },
child: DoctorCard( child: DoctorCard(
doctorName: model.medicalFileList[0] doctorName: model
.entityList[0].timelines[index].doctorName, .medicalFileList[0]
clinic: model.medicalFileList[0].entityList[0] .entityList[0]
.timelines[index].clinicName, .timelines[index]
branch: model.medicalFileList[0].entityList[0] .doctorName,
.timelines[index].projectName, clinic: model.medicalFileList[0].entityList[0]
profileUrl: model.medicalFileList[0] .timelines[index].clinicName,
.entityList[0].timelines[index].doctorImage, branch: model.medicalFileList[0].entityList[0]
appointmentDate: .timelines[index].projectName,
DateUtils.getDateTimeFromServerFormat( profileUrl: model
model.medicalFileList[0].entityList[0] .medicalFileList[0]
.timelines[index].date, .entityList[0]
), .timelines[index]
isPrescriptions: true, .doctorImage,
), appointmentDate:
DateUtils.getDateTimeFromServerFormat(
model.medicalFileList[0].entityList[0]
.timelines[index].date,
),
isPrescriptions: true,
isShowEye: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations
.length !=
0
? true
: false),
); );
}) })
: Center( : Center(

@ -589,24 +589,23 @@ class _PatientsScreenState extends State<PatientsScreen> {
SizedBox( SizedBox(
height: 10.0, height: 10.0,
), ),
if (int.parse(patientType) == 7) // if (int.parse(patientType) == 7)
Container( // Container(
padding: EdgeInsets.all(5), // padding: EdgeInsets.all(5),
decoration: BoxDecoration( // decoration: BoxDecoration(
color: Colors.white, // color: Colors.white,
border: Border.all( // border: Border.all(
color: Colors.grey), // color: Colors.grey),
borderRadius: // borderRadius:
BorderRadius.circular( // BorderRadius.circular(10)),
10)), // child: ClinicList(
child: ClinicList( // clinicId: clinicId,
clinicId: clinicId, // onClinicChange: (newValue) {
onClinicChange: (newValue) { // clinicId = newValue;
clinicId = newValue; // changeClinic(
changeClinic( // newValue, context, model);
newValue, context, model); // },
}, // )),
)),
Padding( Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: MediaQuery.of(context) top: MediaQuery.of(context)
@ -616,7 +615,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
// child: _locationBar(context) // child: _locationBar(context)
child: SERVICES_PATIANT2[ child: SERVICES_PATIANT2[
int.parse(patientType)] == int.parse(patientType)] ==
"patientArrivalList" "List_MyOutPatient"
? _locationBar(context, model) ? _locationBar(context, model)
: Container(), : Container(),
), ),
@ -657,7 +656,8 @@ class _PatientsScreenState extends State<PatientsScreen> {
isInpatient, isInpatient,
"arrivalType": "arrivalType":
arrivalType, arrivalType,
"isInpatient":isInpatient "isInpatient":
isInpatient
}); });
}, },
); );
@ -903,13 +903,17 @@ class _PatientsScreenState extends State<PatientsScreen> {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
int val2 = int.parse(patientType); int val2 = int.parse(patientType);
GetPatientArrivalListRequestModel getPatientArrivalListRequestModel; GetPatientArrivalListRequestModel getPatientArrivalListRequestModel;
if (val2 == 7) { if (val2 == 0) {
getPatientArrivalListRequestModel = GetPatientArrivalListRequestModel( patient = PatientModel(
from: _patientSearchFormValues.From, From: _patientSearchFormValues.From,
to: _patientSearchFormValues.To, To: _patientSearchFormValues.To,
pageIndex: 0, FirstName: "0",
pageSize: 0, MiddleName: "0",
patientMRN: patient.getPatientID); LastName: "0",
PatientMobileNumber: "0",
PatientIdentificationID: "0",
PatientID: 0,
);
} }
model model

@ -1,5 +1,6 @@
import 'package:doctor_app_flutter/core/model/note/note_model.dart'; import 'package:doctor_app_flutter/core/model/note/note_model.dart';
import 'package:doctor_app_flutter/core/model/note/update_note_model.dart'; import 'package:doctor_app_flutter/core/model/note/update_note_model.dart';
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/patient/progress_note_request.dart'; import 'package:doctor_app_flutter/models/patient/progress_note_request.dart';
@ -14,6 +15,7 @@ import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.d
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart';
import '../../../../config/shared_pref_kay.dart'; import '../../../../config/shared_pref_kay.dart';
import '../../../../models/patient/patiant_info_model.dart'; import '../../../../models/patient/patiant_info_model.dart';
@ -38,6 +40,9 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
final _controller = TextEditingController(); final _controller = TextEditingController();
var _isInit = true; var _isInit = true;
bool isDischargedPatient = false; bool isDischargedPatient = false;
AuthViewModel authProvider;
getProgressNoteList(BuildContext context, PatientViewModel model, {bool isLocalBusy = false}) async { getProgressNoteList(BuildContext context, PatientViewModel model, {bool isLocalBusy = false}) async {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
@ -60,6 +65,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
authProvider = Provider.of(context);
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
@ -116,7 +122,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
if (model.patientProgressNoteList[index].status != 2 && if (model.patientProgressNoteList[index].status != 2 &&
model.patientProgressNoteList[index].status != 4) model.patientProgressNoteList[index].status != 4 && authProvider.doctorProfile.doctorID == model.patientProgressNoteList[index].createdBy)
Row( Row(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,

@ -62,6 +62,13 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
@override @override
void initState() { void initState() {
requestPermissions(); requestPermissions();
event.controller.stream.listen((p) {
if (p['startPopUp'] == 'true') {
if (this.mounted) {
onVoiceText();
}
}
});
super.initState(); super.initState();
} }
@ -236,7 +243,11 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
} }
} }
void errorListener(SpeechRecognitionError error) {} void errorListener(SpeechRecognitionError error) {
event.setValue({"searchText": 'null'});
//SpeechToText.closeAlertDialog(context);
print(error);
}
void statusListener(String status) { void statusListener(String status) {
reconizedWord = status == 'listening' ? 'Lisening...' : 'Sorry....'; reconizedWord = status == 'listening' ? 'Lisening...' : 'Sorry....';
@ -257,6 +268,8 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
SpeechToText.closeAlertDialog(context); SpeechToText.closeAlertDialog(context);
progressNoteController.text = reconizedWord; progressNoteController.text = reconizedWord;
}); });
} else {
print(result.finalResult);
} }
} }
} }

@ -34,13 +34,13 @@ class MyScheduleWidget extends StatelessWidget {
), ),
AppText( AppText(
projectViewModel.isArabic?DateUtils.getWeekDayArabic(workingHoursTable.date.weekday): DateUtils.getWeekDay(workingHoursTable.date.weekday) , projectViewModel.isArabic?DateUtils.getWeekDayArabic(workingHoursTable.date.weekday): DateUtils.getWeekDay(workingHoursTable.date.weekday) ,
fontSize: 18, fontSize: 16,
fontFamily: 'Poppins', fontFamily: 'Poppins',
// fontSize: 18 // fontSize: 18
), ),
AppText( AppText(
' ${workingHoursTable.date.day} ${(DateUtils.getMonth(workingHoursTable.date.month).toString().substring(0, 3))}', ' ${workingHoursTable.date.day} ${(DateUtils.getMonth(workingHoursTable.date.month).toString().substring(0, 3))}',
fontSize: 18, fontSize: 14,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontFamily: 'Poppins', fontFamily: 'Poppins',
// fontSize: 18 // fontSize: 18

@ -21,6 +21,7 @@ class DoctorCard extends StatelessWidget {
final Function onTap; final Function onTap;
final bool isPrescriptions; final bool isPrescriptions;
final String clinic; final String clinic;
final bool isShowEye;
DoctorCard( DoctorCard(
{this.doctorName, {this.doctorName,
@ -31,7 +32,8 @@ class DoctorCard extends StatelessWidget {
this.appointmentDate, this.appointmentDate,
this.orderNo, this.orderNo,
this.isPrescriptions = false, this.isPrescriptions = false,
this.clinic}); this.clinic,
this.isShowEye = true});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -50,7 +52,7 @@ class DoctorCard extends StatelessWidget {
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: InkWell( child: InkWell(
onTap: onTap, onTap: (isShowEye) ? onTap : null,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
@ -169,9 +171,10 @@ class DoctorCard extends StatelessWidget {
]), ]),
), ),
), ),
Icon( if (isShowEye)
EvaIcons.eye, Icon(
) EvaIcons.eye,
)
], ],
), ),
), ),

@ -75,6 +75,10 @@ class _MyStatefulBuilderState extends State<MyStatefulBuilder> {
setState(() { setState(() {
searchText = p['searchText']; searchText = p['searchText'];
}); });
} else if (p['searchText'] == 'null') {
setState(() {
searchText = p['searchText'];
});
} }
}); });
super.initState(); super.initState();

Loading…
Cancel
Save