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) {
return InkWell(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => MedicalFileDetails(
age: patient.age is String
? patient.age ?? ""
: "${patient.age}",
firstName: patient.firstName,
lastName: patient.lastName,
gender: patient.genderDescription,
encounterNumber: index,
pp: patient.patientId,
patient: patient,
doctorName: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations
.isNotEmpty
? model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.doctorName
: "",
clinicName: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations
.isNotEmpty
? model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.clinicName
: "",
doctorImage: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations
.isNotEmpty
? model
.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())),
);
if (model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations
.length !=
0)
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => MedicalFileDetails(
age: patient.age is String
? patient.age ?? ""
: "${patient.age}",
firstName: patient.firstName,
lastName: patient.lastName,
gender: patient.genderDescription,
encounterNumber: index,
pp: patient.patientId,
patient: patient,
doctorName: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations
.isNotEmpty
? model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.doctorName
: "",
clinicName: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations
.isNotEmpty
? model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.clinicName
: "",
doctorImage: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations
.isNotEmpty
? model
.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(
doctorName: model.medicalFileList[0]
.entityList[0].timelines[index].doctorName,
clinic: model.medicalFileList[0].entityList[0]
.timelines[index].clinicName,
branch: model.medicalFileList[0].entityList[0]
.timelines[index].projectName,
profileUrl: model.medicalFileList[0]
.entityList[0].timelines[index].doctorImage,
appointmentDate:
DateUtils.getDateTimeFromServerFormat(
model.medicalFileList[0].entityList[0]
.timelines[index].date,
),
isPrescriptions: true,
),
doctorName: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.doctorName,
clinic: model.medicalFileList[0].entityList[0]
.timelines[index].clinicName,
branch: model.medicalFileList[0].entityList[0]
.timelines[index].projectName,
profileUrl: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.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(

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

@ -1,5 +1,6 @@
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/viewModel/auth_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/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:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart';
import '../../../../config/shared_pref_kay.dart';
import '../../../../models/patient/patiant_info_model.dart';
@ -38,6 +40,9 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
final _controller = TextEditingController();
var _isInit = true;
bool isDischargedPatient = false;
AuthViewModel authProvider;
getProgressNoteList(BuildContext context, PatientViewModel model, {bool isLocalBusy = false}) async {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
@ -60,6 +65,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
@override
Widget build(BuildContext context) {
authProvider = Provider.of(context);
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
String arrivalType = routeArgs['arrivalType'];
@ -116,7 +122,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
CrossAxisAlignment.start,
children: [
if (model.patientProgressNoteList[index].status != 2 &&
model.patientProgressNoteList[index].status != 4)
model.patientProgressNoteList[index].status != 4 && authProvider.doctorProfile.doctorID == model.patientProgressNoteList[index].createdBy)
Row(
crossAxisAlignment:
CrossAxisAlignment.start,

@ -62,6 +62,13 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
@override
void initState() {
requestPermissions();
event.controller.stream.listen((p) {
if (p['startPopUp'] == 'true') {
if (this.mounted) {
onVoiceText();
}
}
});
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) {
reconizedWord = status == 'listening' ? 'Lisening...' : 'Sorry....';
@ -257,6 +268,8 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
SpeechToText.closeAlertDialog(context);
progressNoteController.text = reconizedWord;
});
} else {
print(result.finalResult);
}
}
}

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

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

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

Loading…
Cancel
Save