Merge branch 'development' into video-stream-background

# Conflicts:
#	android/app/src/main/kotlin/com/hmg/hmgDr/ui/fragment/VideoCallFragment.kt
#	lib/core/service/VideoCallService.dart
#	lib/screens/patients/profile/profile_screen/patient_profile_screen.dart
merge-requests/759/head
mosazaid 3 years ago
commit c722c9b05a

@ -28,6 +28,15 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 30
// signingConfigs {
// release {
// storeFile file('C:\\Users\\admin\\Downloads\\DQKey.jks')
// storePassword 'HmGsa123'
// keyAlias 'key'
// keyPassword 'HmGsa123'
// }
// }
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
@ -50,10 +59,25 @@ android {
buildTypes {
release {
// TODO: Add your own signing config for the release build.
signingConfig signingConfigs.debug
}
debug {
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
// flavorDimensions 'environment'
// productFlavors {
// production {
// dimension 'environment'
// }
// }
//
// configurations {
// productionDebugImplementation
// productionReleaseImplementation
// }
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8

@ -395,6 +395,7 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
}
mPublisherViewContainer.addView(mPublisher!!.view)
mSession!!.publish(mPublisher)
if (!resume) {
@ -687,6 +688,11 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
localPreviewLayoutParam.width = localPreviewWidth
localPreviewLayoutParam.height = localPreviewHeight
localPreviewLayoutParam.setMargins(0, localPreviewMargin, localPreviewMargin, 0)
if (mPublisher != null && mPublisher!!.view.parent == null){
mPublisherViewContainer.addView(mPublisher!!.view)
}
mPublisherViewContainer.visibility = View.VISIBLE
// remotePreviewLayoutParam = FrameLayout.LayoutParams(remotePreviewIconSize, remotePreviewIconSize)
remotePreviewLayoutParam.width = remotePreviewIconSize
remotePreviewLayoutParam.height = remotePreviewIconSize
@ -709,6 +715,11 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
localPreviewLayoutParam.width = 0
localPreviewLayoutParam.height = 0
localPreviewLayoutParam.setMargins(0, localPreviewMargin / 2, localPreviewMargin / 2, 0)
if (mPublisher != null){
mPublisherViewContainer.removeView(mPublisher!!.view)
}
mPublisherViewContainer.visibility = View.GONE
// localPreviewLayoutIconParam = FrameLayout.LayoutParams(localPreviewIconSmall, localPreviewIconSmall)
//// localPreviewLayoutParam = RelativeLayout.LayoutParams(localPreviewWidthSmall, localPreviewHeightSmall)
// localPreviewLayoutParam.width = localPreviewWidthSmall
@ -880,7 +891,7 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
override fun onFinish() {
mParams.x = -(szWindow.x - videoCallContainer.width)
dialog!!.window!!.attributes = mParams
dialog?.window!!.attributes = mParams
}
}.start()
}
@ -906,7 +917,7 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
override fun onFinish() {
mParams.x = szWindow.x - videoCallContainer.width
dialog!!.window!!.attributes = mParams
dialog?.window!!.attributes = mParams
}
}.start()
}

@ -86,7 +86,7 @@ class BaseAppClient {
int projectID = await sharedPref.getInt(PROJECT_ID);
if (projectID == 2 || projectID == 3)
body['PatientOutSA'] = true;
else if(body.containsKey('facilityId') && body['facilityId']==2 || body['facilityId']==3)
else if((body.containsKey('facilityId') && body['facilityId']==2 || body['facilityId']==3)|| body['ProjectID']==2 || body['ProjectID']==3)
body['PatientOutSA'] = true;
else
body['PatientOutSA'] = false;

@ -57,6 +57,7 @@ const Map<String, Map<String, String>> localizedValues = {
'operations': {'en': 'Operations', 'ar': 'عمليات'},
'patientServices': {'en': 'Patient Services', 'ar': 'خدمات المرضى'},
'searchMedicineDashboard': {'en': 'Search\nMedicines', 'ar': 'بحث\nعن الدواء'},
'searchMedicine': {'en': 'Search Medicines', 'ar': 'بحث عن الدواء'},
'myReferralPatient': {'en': 'My Referral Patient', 'ar': 'مرضى الاحالة'},
'referPatient': {'en': 'Referral Patient', 'ar': 'إحالة مريض'},
'myReferral': {'en': 'My Referral', 'ar': 'إحالة'},

@ -9,13 +9,14 @@ class PatientSearchRequestModel {
String from;
String to;
int searchType;
int projectID;
String mobileNo;
String identificationNo;
int nursingStationID;
int clinicID=0;
PatientSearchRequestModel(
{this.doctorID = 0,
{this.doctorID ,
this.firstName = "0",
this.middleName = "0",
this.lastName = "0",
@ -28,7 +29,7 @@ class PatientSearchRequestModel {
this.from = "0",
this.to = "0",
this.clinicID,
this.nursingStationID = 0});
this.nursingStationID = 0,this.projectID});
PatientSearchRequestModel.fromJson(Map<String, dynamic> json) {
doctorID = json['DoctorID'];
@ -45,6 +46,7 @@ class PatientSearchRequestModel {
identificationNo = json['IdentificationNo'];
nursingStationID = json['NursingStationID'];
clinicID = json['ClinicID'];
projectID = json['ProjectID'];
}
Map<String, dynamic> toJson() {
@ -61,9 +63,9 @@ class PatientSearchRequestModel {
data['SearchType'] = this.searchType;
data['MobileNo'] = this.mobileNo;
data['IdentificationNo'] = this.identificationNo;
data['NursingStationID'] = this.nursingStationID;
//data['NursingStationID'] = this.nursingStationID;
data['ClinicID'] = this.clinicID;
data['ProjectID'] = 0;
data['ProjectID'] =this.projectID;
return data;
}
}

@ -11,11 +11,11 @@ class ScanQrService extends BaseService {
hasError = false;
await getDoctorProfile();
if (isMyInpatient) {
requestModel.doctorID = doctorProfile.doctorID;
} else {
// if (isMyInpatient) {
// requestModel.doctorID = doctorProfile.doctorID;
// } else {
requestModel.doctorID = 0;
}
//}
await baseAppClient.post(
GET_PATIENT_IN_PATIENT_LIST,

@ -75,6 +75,16 @@ class PatientSearchViewModel extends BaseViewModel {
}
}
sortOutPatient({bool isDes = false}){
if(isDes)
filterData= filterData.reversed.toList();
// filterData.sort((PatiantInformtion a, PatiantInformtion b)=>b.appointmentDateWithDateTimeForm.compareTo(a.appointmentDateWithDateTimeForm));
else
filterData= filterData.reversed.toList();
// filterData.sort((PatiantInformtion a, PatiantInformtion b)=>a.appointmentDateWithDateTimeForm.compareTo(b.appointmentDateWithDateTimeForm));
setState(ViewState.Idle);
}
getPatientFileInformation(PatientSearchRequestModel patientSearchRequestModel,
{bool isLocalBusy = false}) async {
setState(ViewState.Busy);
@ -169,6 +179,14 @@ class PatientSearchViewModel extends BaseViewModel {
}
}
sortInPatient({bool isDes = false}){
if(isDes)
filteredInPatientItems.sort((PatiantInformtion a, PatiantInformtion b)=>b.admissionDateWithDateTimeForm.compareTo(a.admissionDateWithDateTimeForm));
else
filteredInPatientItems.sort((PatiantInformtion a, PatiantInformtion b)=>a.admissionDateWithDateTimeForm.compareTo(b.admissionDateWithDateTimeForm));
setState(ViewState.Idle);
}
Future setDefaultInPatientList() async {
setState(ViewState.BusyLocal);
await getDoctorProfile();

@ -13,7 +13,7 @@ class ScanQrViewModel extends BaseViewModel {
await getDoctorProfile();
setState(ViewState.Busy);
await _scanQrService.getInPatient(requestModel, true);
await _scanQrService.getInPatient(requestModel, isMyInpatient);
if (_scanQrService.hasError) {
error = _scanQrService.error;

@ -1,10 +1,13 @@
// TODO : it have to be changed.
import 'package:doctor_app_flutter/util/date-utils.dart';
class PatiantInformtion {
final PatiantInformtion patientDetails;
int genderInt;
dynamic age;
String appointmentDate;
DateTime appointmentDateWithDateTimeForm;
dynamic appointmentNo;
dynamic appointmentType;
String arrivalTime;
@ -52,6 +55,7 @@ class PatiantInformtion {
int patientMRN;
String admissionNo;
String admissionDate;
DateTime admissionDateWithDateTimeForm;
String createdOn;
String roomId;
String bedId;
@ -148,7 +152,8 @@ class PatiantInformtion {
this.dischargeDate,
this.status,
this.vcId,
this.voipToken});
this.voipToken,
this.admissionDateWithDateTimeForm, this.appointmentDateWithDateTimeForm});
factory PatiantInformtion.fromJson(Map<String, dynamic> json) =>
PatiantInformtion(
@ -254,5 +259,11 @@ class PatiantInformtion {
consultationNotes: json['ConsultationNotes'],
patientStatus: json['PatientStatus'],
voipToken: json['VoipToken'],
admissionDateWithDateTimeForm: json["AdmissionDate"] != null
? AppDateUtils.convertStringToDate(json["AdmissionDate"])
: json["admissionDate"] != null ? AppDateUtils.convertStringToDate(
json["admissionDate"]) : null,
appointmentDateWithDateTimeForm: json["AppointmentDate"]!= null?AppDateUtils.convertStringToDate(json["AppointmentDate"]):null
);
}

@ -7,8 +7,10 @@ import 'package:doctor_app_flutter/widgets/shared/app_loader_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_container.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import '../../routes.dart';
@ -24,6 +26,8 @@ class InPatientPage extends StatefulWidget {
class _InPatientPageState extends State<InPatientPage> {
TextEditingController _searchController = TextEditingController();
bool isSortDes = true;
@override
void dispose() {
_searchController.dispose();
@ -47,20 +51,45 @@ class _InPatientPageState extends State<InPatientPage> {
),
Container(
margin: EdgeInsets.all(16.0),
child: AppTextFieldCustom(
hintText: TranslationBase.of(context).searchPatientName,
isTextFieldHasSuffix: true,
suffixIcon: IconButton(
icon: Icon(
Icons.search,
color: Colors.black,
child: Stack(
children: [
AppTextFieldCustom(
hintText: TranslationBase.of(context).searchPatientName,
isTextFieldHasSuffix: true,
suffixIcon: IconButton(
icon: Icon(
Icons.search,
color: Colors.black,
),
onPressed: () {},
),
controller: _searchController,
onChanged: (value) {
model.filterSearchResults(value);
}),
Positioned(
right: 35,
top:5,
child: IconButton(
icon: Icon(
isSortDes
? FontAwesomeIcons.sortAmountDown
: FontAwesomeIcons.sortAmountUp,
color: Colors.black,
),
iconSize: 20,
// padding: EdgeInsets.only(bottom: 30),
onPressed: () {
GifLoaderDialogUtils.showMyDialog(context);
model.sortInPatient(isDes: isSortDes);
isSortDes = !isSortDes;
GifLoaderDialogUtils.hideDialog(context);
},
),
onPressed: () {},
),
controller: _searchController,
onChanged: (value) {
model.filterSearchResults(value);
}),
)
],
),
),
model.state == ViewState.Idle?model.filteredInPatientItems.length > 0
? Expanded(

@ -39,7 +39,7 @@ class _InsuranceApprovalScreenNewState
? (model) => model.getInsuranceInPatient(mrn: patient.patientId)
: patient.appointmentNo != null
? (model) => model.getInsuranceApproval(patient,
appointmentNo: patient?.appointmentNo,
appointmentNo: int.parse(patient?.appointmentNo.toString()) ,
projectId: patient.projectId)
: (model) => model.getInsuranceApproval(patient),
builder: (BuildContext context, InsuranceViewModel model, Widget child) =>

@ -77,6 +77,7 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
PatientModel patient;
OutPatientFilterType outPatientFilterType = OutPatientFilterType.Today;
bool isSortDes = true;
@override
Widget build(BuildContext context) {
@ -201,7 +202,7 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
SizedBox(height: 18.5),
Container(
width: SizeConfig.screenWidth * 0.9,
height: 75,
height: 85,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
@ -218,37 +219,61 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
TranslationBase.of(context).searchPatientName,
fontSize: 13,
)),
AppTextFormField(
// focusNode: focusProject,
controller: _controller,
borderColor: Colors.white,
prefix: IconButton(
icon: Icon(
_activeLocation != 0
? DoctorApp.filter_1
: FontAwesomeIcons.slidersH,
color: Colors.black,
Stack(
children: [
AppTextFormField(
// focusNode: focusProject,
controller: _controller,
borderColor: Colors.white,
prefix: IconButton(
icon: Icon(
_activeLocation != 0
? DoctorApp.filter_1
: FontAwesomeIcons.slidersH,
color: Colors.black,
),
iconSize: 20,
padding: EdgeInsets.only(bottom: 30),
onPressed: _activeLocation != 0
? null
: () {
Navigator.push(
context,
MaterialPageRoute(
builder:
(BuildContext context) =>
FilterDatePage(
outPatientFilterType:
outPatientFilterType,
patientSearchViewModel:
model,
)));
},
),
onChanged: (String str) {
model.searchData(str);
}),
Positioned(
right: 25,
child: IconButton(
icon: Icon(
isSortDes
? FontAwesomeIcons.sortAmountDown
: FontAwesomeIcons.sortAmountUp,
color: Colors.black,
),
iconSize: 20,
padding: EdgeInsets.only(bottom: 30),
onPressed: () {
model.sortOutPatient(isDes: isSortDes);
isSortDes = !isSortDes;
},
),
iconSize: 20,
padding: EdgeInsets.only(bottom: 30),
onPressed: _activeLocation != 0
? null
: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (BuildContext context) =>
FilterDatePage(
outPatientFilterType:
outPatientFilterType,
patientSearchViewModel:
model,
)));
},
),
onChanged: (String str) {
model.searchData(str);
}),
)
],
),
])),
SizedBox(
height: 10.0,

@ -46,6 +46,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
bool isCallFinished = false;
bool isDischargedPatient = false;
bool isSearchAndOut = false;
bool isCallStarted = false;
String patientType;
String arrivalType;
String from;
@ -228,16 +229,12 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
height: 30,
),
onPressed: () async {
if ((isFromLiveCare &&
patient.appointmentNo != null &&
patient.appointmentNo != 0) ||
patient.patientStatusType ==
43) {
if ((isFromLiveCare && patient.appointmentNo != null ) || patient.patientStatusType == 43) {
PostEpisodeReqModel
postEpisodeReqModel =
PostEpisodeReqModel(
appointmentNo:
patient.appointmentNo,
int.parse(patient.appointmentNo.toString()),
patientMRN:
patient.patientMRN);
GifLoaderDialogUtils.showMyDialog(
@ -283,10 +280,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
height: 30,
),
onPressed: () {
if ((isFromLiveCare &&
patient.appointmentNo !=
null &&
patient.appointmentNo != 0) ||
if ((isFromLiveCare && patient.appointmentNo != null && patient.appointmentNo != 0) ||
patient.patientStatusType ==
43) {
Navigator.of(context).pushNamed(
@ -294,7 +288,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
arguments: {
'patient': patient
});
}
}
}),
],
),
@ -331,7 +325,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
title: isCallFinished?
TranslationBase.of(context).endCall:
TranslationBase.of(context).initiateCall,
disabled: model.state == ViewState.BusyLocal,
disabled: isCallStarted || model.state == ViewState.BusyLocal,
onPressed: () async {
// Navigator.push(context, MaterialPageRoute(
// builder: (BuildContext context) =>
@ -354,9 +348,11 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
Helpers.showErrorToast(model.error);
} else {
await model.getDoctorProfile();
patient.appointmentNo = model.startCallRes.appointmentNo;
patient.appointmentNo = int.parse(model.startCallRes.appointmentNo.toString());
patient.episodeNo = 0;
setState(() {
isCallStarted = true;
});
GifLoaderDialogUtils.hideDialog(context);
AppPermissionsUtils.requestVideoCallPermission(context: context,onTapGrant: (){
locator<VideoCallService>().openVideo(model.startCallRes, patient, callConnected, callDisconnected);

@ -55,7 +55,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
episodeID: widget.patientInfo.episodeNo.toString(),
editedBy: '',
doctorID: '',
appointmentNo: widget.patientInfo.appointmentNo);
appointmentNo: int.parse(widget.patientInfo.appointmentNo));
await model.getPatientAssessment(getAssessmentReqModel);
if (model.patientAssessmentList.isNotEmpty) {
if (model.listOfDiagnosisCondition.length == 0) {

@ -67,7 +67,7 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
GetPhysicalExamReqModel(
patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo.toString(),
appointmentNo: widget.patientInfo.appointmentNo);
appointmentNo: int.parse(widget.patientInfo.appointmentNo.toString()));
await model.getPatientPhysicalExam(getPhysicalExamReqModel);
if (model.patientPhysicalExamList.isNotEmpty) {

@ -78,7 +78,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
onModelReady: (model) async {
GetGetProgressNoteReqModel getGetProgressNoteReqModel =
GetGetProgressNoteReqModel(
appointmentNo: widget.patientInfo.appointmentNo,
appointmentNo: int.parse(widget.patientInfo.appointmentNo),
patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo.toString(), editedBy: '', doctorID: '');
await model.getPatientProgressNote(getGetProgressNoteReqModel);

@ -63,7 +63,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
GetHistoryReqModel getHistoryReqModel = GetHistoryReqModel(
patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo.toString(),
appointmentNo: widget.patientInfo.appointmentNo,
appointmentNo: int.parse(widget.patientInfo.appointmentNo.toString()),
doctorID: '',
editedBy: '');
@ -152,7 +152,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
GeneralGetReqForSOAP generalGetReqForSOAP = GeneralGetReqForSOAP(
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
appointmentNo: int.parse(widget.patientInfo.appointmentNo.toString()),
doctorID: '',
editedBy: '');
await model.getPatientAllergy(generalGetReqForSOAP);
@ -201,7 +201,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
GetChiefComplaintReqModel getChiefComplaintReqModel =
GetChiefComplaintReqModel(
patientMRN: widget.patientInfo.patientMRN,
appointmentNo: widget.patientInfo.appointmentNo,
appointmentNo: int.parse(widget.patientInfo.appointmentNo.toString()),
episodeId: widget.patientInfo.episodeNo,
episodeID: widget.patientInfo.episodeNo,
doctorID: '');

@ -592,9 +592,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
child: AppTextFieldCustom(
hintText: TranslationBase.of(context).boxQuantity,
isTextFieldHasSuffix: false,
dropDownText: box != null
? TranslationBase.of(context).boxQuantity +
": " +
dropDownText: box != null?
model.boxQuintity.toString()
: null,
enabled: false,

@ -186,7 +186,7 @@ class _PrescriptionCheckOutScreenState extends State<PrescriptionCheckOutScreen>
setState(() {
SpeechToText.closeAlertDialog(context);
speech.stop();
indicationController.text += reconizedWord + '\n';
instructionController.text += reconizedWord + '\n';
});
} else {
print(result.finalResult);

@ -76,25 +76,25 @@ class _QrReaderScreenState extends State<QrReaderScreen> {
}
_scanQrAndGetPatient(BuildContext context, ScanQrViewModel model) async {
/// When give qr we will change this method to get data
/// var result = await BarcodeScanner.scan();
/// int patientID = get from qr result
var result = await BarcodeScanner.scan();
if (result != "") {
List<String> listOfParams = result.split(',');
int patientID = 0;
if (listOfParams[1].length != 0) patientID = int.parse(listOfParams[1]);
PatientSearchRequestModel patientSearchRequestModel = PatientSearchRequestModel(
patientID: patientID,
patientID: patientID,clinicID: 0,
doctorID: 0,
projectID: int.parse(listOfParams[0])
);
await model.getInPatientList(patientSearchRequestModel, isMyInpatient: true).then((d) {
await model.getInPatientList(patientSearchRequestModel, isMyInpatient: false).then((d) {
if (model.state != ViewState.ErrorLocal) {
if (model.inPatientList.isEmpty)
DrAppToastMsg.showErrorToast('No patient');
else
Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: {
"patient": model.inPatientList[0],
"isInpatient": true,
});
} else {
DrAppToastMsg.showErrorToast(model.error);

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save