Compare commits

...

7 Commits

@ -11,15 +11,15 @@ const DOCTOR_ROTATION = 'https://doctorrota.hmg.com/';
// const BASE_URL = 'https://hmgwebservices.com/'; // const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'http://10.20.200.111:1010/'; // const BASE_URL = 'http://10.20.200.111:1010/';
const BASE_URL = 'https://uat.hmgwebservices.com/'; // const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/'; const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'https://webservices.hmg.com/'; // const BASE_URL = 'https://webservices.hmg.com/';
// //
// const BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; //Vida Plus URL // const BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; //Vida Plus URL
// const BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/'; //Vida Plus URL // const BASE_URL = 'htxtps://vidamergeuat.cloudsolutions.com.sa/'; //Vida Plus URL
const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh"; const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh";
const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList"; const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList";
@ -413,7 +413,7 @@ const TRANSACTION_NO = 0;
const LANGUAGE_ID = 2; const LANGUAGE_ID = 2;
const STAMP = '2020-04-27T12:17:17.721Z'; const STAMP = '2020-04-27T12:17:17.721Z';
const IP_ADDRESS = '9.9.9.9'; const IP_ADDRESS = '9.9.9.9';
const VERSION_ID = 20.5; const VERSION_ID = 10.5;
const CHANNEL = 9; const CHANNEL = 9;
const SESSION_ID = 'BlUSkYymTt'; const SESSION_ID = 'BlUSkYymTt';
const IS_LOGIN_FOR_DOCTOR_APP = true; const IS_LOGIN_FOR_DOCTOR_APP = true;

@ -1,3 +1,5 @@
import 'package:flutter/cupertino.dart';
class InterventionHistoryList{ class InterventionHistoryList{
List<InterventionHistory>? history = []; List<InterventionHistory>? history = [];
InterventionHistoryList.fromJson(Map<String, dynamic> json){ InterventionHistoryList.fromJson(Map<String, dynamic> json){
@ -19,6 +21,7 @@ class InterventionHistory {
String? interventionDesc; String? interventionDesc;
int? interventionId; int? interventionId;
String? remark; String? remark;
TextEditingController remarksController = TextEditingController();
InterventionHistory({ InterventionHistory({
this.authizationFormText, this.authizationFormText,

@ -105,7 +105,7 @@ class FinalRadiology {
doctorID = json['DoctorID']; doctorID = json['DoctorID'];
clinicID = json['ClinicID']; clinicID = json['ClinicID'];
orderDate = AppDateUtils.convertStringToDate(json['OrderDate']); orderDate = AppDateUtils.convertStringToDate(json['OrderDate']);
reportDate = AppDateUtils.convertStringToDate(json['ReadOn']); reportDate = AppDateUtils.convertStringToDate(json['ReadOn'] == null ? json['OrderDate'] : json['ReadOn']);
reportData = json['ReportData']; reportData = json['ReportData'];
imageURL = json['ImageURL']; imageURL = json['ImageURL'];
procedureID = json['ProcedureID']; procedureID = json['ProcedureID'];

@ -46,7 +46,7 @@ class AuthenticationService extends BaseService {
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: {"IMEI": imei, }); }, body: {"IMEI": imei, }, isCustomRequest: true);
} catch (error) { } catch (error) {
hasError = true; hasError = true;
super.error = error.toString(); super.error = error.toString();

@ -10,9 +10,11 @@ class ScanQrService extends BaseService {
Future getInPatient( Future getInPatient(
PatientSearchRequestModel requestModel, bool isMyInpatient) async { PatientSearchRequestModel requestModel, bool isMyInpatient) async {
hasError = false; hasError = false;
await getDoctorProfile(); await getDoctorProfile(isGetProfile: true);
requestModel.loginDoctorID = doctorProfile!.doctorID; requestModel.loginDoctorID = doctorProfile!.doctorID;
requestModel.doctorID = 0; requestModel.doctorID = 0;
requestModel.from = "0";
requestModel.to = "0";
await baseAppClient.post( await baseAppClient.post(
GET_PATIENT_IN_PATIENT_LIST, GET_PATIENT_IN_PATIENT_LIST,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {

@ -29,6 +29,7 @@ class LabsService extends BaseService {
body['ProjectID'] = doctorProfile?.projectID; body['ProjectID'] = doctorProfile?.projectID;
url = GET_PATIENT_LAB_OREDERS; url = GET_PATIENT_LAB_OREDERS;
} else { } else {
body["ProjectID"] = 0; // ADDED AS PER BACKEND REQUEST
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
url = GET_Patient_LAB_ORDERS; url = GET_Patient_LAB_ORDERS;
} }
@ -95,7 +96,7 @@ class LabsService extends BaseService {
body['OrderNo'] = patientLabOrder.orderNo; body['OrderNo'] = patientLabOrder.orderNo;
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
body['SetupID'] = patientLabOrder.setupID; body['SetupID'] = patientLabOrder.setupID;
body['ProjectID'] = patientLabOrder.projectID; // body['ProjectID'] = patientLabOrder.projectID; commented as per backend request
body['ClinicID'] = patientLabOrder.clinicID ?? 0; body['ClinicID'] = patientLabOrder.clinicID ?? 0;
body['InvoiceType'] = patientLabOrder.invoiceType ?? ""; body['InvoiceType'] = patientLabOrder.invoiceType ?? "";
await baseAppClient.postPatient(url, patient: patient, onSuccess: (dynamic response, int statusCode) { await baseAppClient.postPatient(url, patient: patient, onSuccess: (dynamic response, int statusCode) {

@ -31,6 +31,9 @@ class RadiologyService extends BaseService {
if (isInPatient) { if (isInPatient) {
url = GET_IN_PATIENT_ORDERS; url = GET_IN_PATIENT_ORDERS;
body['ProjectID'] = patient.projectId; body['ProjectID'] = patient.projectId;
}else{
body['ProjectID'] = 0; // ADDED AS PER BACKEND REQUEST
} }
hasError = false; hasError = false;

@ -115,11 +115,11 @@ class VitalSignsViewModel extends BaseViewModel {
var bodyMassIndex = double.parse(bodyMax); var bodyMassIndex = double.parse(bodyMax);
if (bodyMassIndex < 18.5) { if (bodyMassIndex < 18.5) {
return 1; return 1;
} else if (bodyMassIndex >= 18.5 && bodyMassIndex <= 24.9) { } else if (bodyMassIndex >= 18.5 && bodyMassIndex < 24.9) {
return 2; return 2;
} else if (bodyMassIndex >= 25 && bodyMassIndex <= 29.9) { } else if (bodyMassIndex >= 24.9 && bodyMassIndex < 29.9) {
return 3; return 3;
} else if (bodyMassIndex >= 30 && bodyMassIndex <= 34.9) { } else if (bodyMassIndex >= 29.9 && bodyMassIndex < 34.9) {
return 4; return 4;
} else { } else {
return 5; return 5;

@ -9,7 +9,7 @@ class NoData extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Center( return SingleChildScrollView(
child: Container( child: Container(
child: ErrorMessage(error: TranslationBase.of(context).noDataAvailable), child: ErrorMessage(error: TranslationBase.of(context).noDataAvailable),
), ),

@ -436,9 +436,10 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Expanded(child: AppText(projectViewModel.isArabic?model.insuranceApproval[indexInsurance].companyNameN??'':model.insuranceApproval[indexInsurance].companyName??'')) Expanded(child: AppText(projectViewModel.isArabic?model.insuranceApproval[indexInsurance].companyNameN??'':model.insuranceApproval[indexInsurance].companyName??''))
], ],
), ),
Row( model.insuranceApproval[indexInsurance].rceiptOn != null
children: [ ? Row(
AppText( children: [
AppText(
TranslationBase.of(context).receiptOn + ": ", TranslationBase.of(context).receiptOn + ": ",
color: Colors.grey[500], color: Colors.grey[500],
), ),
@ -450,7 +451,8 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
), ),
), ),
], ],
), )
: SizedBox.shrink(),
Row( Row(
children: [ children: [
AppText( AppText(

@ -166,7 +166,7 @@ String noteValidation ="";
children: [ children: [
Column( Column(
children: [ children: [
PatientProfileHeaderNewDesignAppBar(patient, arrivalType!, patientType!, PatientProfileHeaderNewDesignAppBar(patient, arrivalType ?? "1", patientType ?? "1",
videoCallDurationStream: videoCallDurationStream, videoCallDurationStream: videoCallDurationStream,
isInpatient: isInpatient, isInpatient: isInpatient,
isFromLiveCare: isFromLiveCare, isFromLiveCare: isFromLiveCare,

@ -228,7 +228,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
), ),
), ),
AppText( AppText(
"(35<)", "(>35)",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier! * 1.15, fontSize: SizeConfig.textMultiplier! * 1.15,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,

@ -1,3 +1,5 @@
import 'dart:ui';
import 'package:doctor_app_flutter/core/enum/view_state.dart'; import 'package:doctor_app_flutter/core/enum/view_state.dart';
import 'package:doctor_app_flutter/core/model/pharmacy-intervention-model/intervention_history.dart'; import 'package:doctor_app_flutter/core/model/pharmacy-intervention-model/intervention_history.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
@ -19,6 +21,7 @@ class PharmacyIntervention extends StatefulWidget {
} }
class _PharmacyInterventionState extends State<PharmacyIntervention> { class _PharmacyInterventionState extends State<PharmacyIntervention> {
bool isBottomSheetShown = false;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<PharmacyInterventionViewModel>(onModelReady: (model) { return BaseView<PharmacyInterventionViewModel>(onModelReady: (model) {
@ -29,7 +32,8 @@ class _PharmacyInterventionState extends State<PharmacyIntervention> {
]); ]);
}); });
}, builder: (_, model, __) { }, builder: (_, model, __) {
if (model.interventionHistoryList != null) { if (model.interventionHistoryList != null && !model.isBottomSheetShown) {
model.toggleBottomOpenValue(true);
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
showBottomSheet( showBottomSheet(
context, context,
@ -117,28 +121,23 @@ class _PharmacyInterventionState extends State<PharmacyIntervention> {
showModalBottomSheet( showModalBottomSheet(
isDismissible: true, isDismissible: true,
context: context, context: context,
isScrollControlled: true,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(20), topRight: Radius.circular(20))), topLeft: Radius.circular(20), topRight: Radius.circular(20))),
builder: (_) { builder: (_) {
return DraggableScrollableSheet( return Padding(
key: _sheet, padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
initialChildSize: 0.7, child: InterventionHistoryBottomSheet(
minChildSize: 0.7, interventionList: interventionHistory,
maxChildSize: 1, model: model,
snapSizes: [ ),
0.7, // constraints.maxHeight, );
1,
],
expand: false,
controller: _controller,
builder: (_, controller) => InterventionHistoryBottomSheet(
interventionList: interventionHistory,
model: model,
controller: controller,
));
}, },
).then((value) => model.toggleShowBottomSheetValue()); ).then((value) {
model.toggleShowBottomSheetValue();
model.toggleBottomOpenValue(false);
});
} }
void SearchDialog(BuildContext context, PharmacyInterventionViewModel model) { void SearchDialog(BuildContext context, PharmacyInterventionViewModel model) {

@ -12,6 +12,7 @@ import 'package:intl/intl.dart';
class PharmacyInterventionViewModel extends BaseViewModel { class PharmacyInterventionViewModel extends BaseViewModel {
PharmacyInterventionService _service = locator<PharmacyInterventionService>(); PharmacyInterventionService _service = locator<PharmacyInterventionService>();
MedicationList? medicationList; MedicationList? medicationList;
bool isBottomSheetShown = false;
// MedicationList? medicationList = MedicationList.fromJson({ // MedicationList? medicationList = MedicationList.fromJson({
// "entityList": [ // "entityList": [
@ -630,4 +631,8 @@ class PharmacyInterventionViewModel extends BaseViewModel {
toggleShowBottomSheetValue() { toggleShowBottomSheetValue() {
interventionHistoryList = null; interventionHistoryList = null;
} }
toggleBottomOpenValue(bool bottomSheetValue){
isBottomSheetShown = bottomSheetValue;
}
} }

@ -8,80 +8,74 @@ import 'package:flutter/material.dart';
class InterventionHistoryBottomSheet extends StatelessWidget { class InterventionHistoryBottomSheet extends StatelessWidget {
final List<InterventionHistory> interventionList; final List<InterventionHistory> interventionList;
final ScrollController controller;
// final ScrollController controller;
final PharmacyInterventionViewModel model; final PharmacyInterventionViewModel model;
const InterventionHistoryBottomSheet( const InterventionHistoryBottomSheet({super.key, required this.interventionList, required this.model});
{super.key, required this.interventionList, required this.controller, required this.model});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Material( return SizedBox(
color: Color(0xFFF7F7F7), height: MediaQuery.sizeOf(context).height * (interventionList.length == 1 ? 0.5 : 0.7),
shape: RoundedRectangleBorder( child: Material(
borderRadius: BorderRadius.only( color: Color(0xFFF7F7F7),
topLeft: Radius.circular(20), topRight: Radius.circular(20))), shape: RoundedRectangleBorder(borderRadius: BorderRadius.only(topLeft: Radius.circular(20), topRight: Radius.circular(20))),
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 20.0, vertical: 32), padding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 32),
child: Column( child: SingleChildScrollView(
crossAxisAlignment: CrossAxisAlignment.start, child: Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
AppText( children: [
TranslationBase AppText(
.of(context) TranslationBase.of(context).histories,
.histories, fontWeight: FontWeight.w700,
fontWeight: FontWeight.w700, fontSize: 24,
fontSize: 24, color: Color(0xFF2B353E),
color: Color(0xFF2B353E), ),
), SizedBox(
SizedBox( height: 16,
height: 16, ),
), Column(
Expanded( mainAxisSize: MainAxisSize.min,
child: Column( mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min, children: [
mainAxisAlignment: MainAxisAlignment.center, ListView.separated(
children: [ shrinkWrap: true,
Expanded( itemCount: interventionList.length,
child: ListView.separated( physics: BouncingScrollPhysics(),
shrinkWrap: true, itemBuilder: (context, index) => Material(
controller: controller, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
itemCount: interventionList.length, color: Colors.white,
itemBuilder: (context, index) => child: InterventionHistoryItem(
Material( remarksController: interventionList[index].remarksController,
shape: RoundedRectangleBorder( interventionHistory: interventionList[index],
borderRadius: BorderRadius.circular(10)), onAcceptClick: (intervention, remarks) {
color: Colors.white, model.updateInterventionDiseaseStatus(
child: InterventionHistoryItem( remarks: remarks,
interventionHistory: interventionList[index], isAccepted: true,
onAcceptClick: (intervention, remarks) { interventionID: interventionList[index].interventionId.toString(),
model.updateInterventionDiseaseStatus( successMessage: TranslationBase.of(context).interventionAcceptedSuccessfully,
remarks: remarks, errorMessage: TranslationBase.of(context).unableToPerformTheAction);
isAccepted: true, Navigator.pop(context);
interventionID: interventionList[index].interventionId.toString(), },
successMessage: TranslationBase.of(context).interventionAcceptedSuccessfully, onRejectClick: (intervention, remarks) {
errorMessage: TranslationBase.of(context).unableToPerformTheAction model.updateInterventionDiseaseStatus(
); remarks: remarks,
Navigator.pop(context); interventionID: interventionList[index].interventionId.toString(),
}, successMessage: TranslationBase.of(context).interventionRejectedSuccessfully,
onRejectClick: (intervention, remarks) { errorMessage: TranslationBase.of(context).unableToPerformTheAction);
model.updateInterventionDiseaseStatus( Navigator.pop(context);
remarks: remarks, },
interventionID: interventionList[index].interventionId.toString(),
successMessage: TranslationBase.of(context).interventionRejectedSuccessfully,
errorMessage: TranslationBase.of(context).unableToPerformTheAction
);
Navigator.pop(context);
},
),
), ),
separatorBuilder: (_, __) => Divider(), ),
)) separatorBuilder: (_, __) => Divider(),
], )
), ],
) )
], ],
),
),
), ),
), ),
); );

@ -12,7 +12,7 @@ class InterventionHistoryItem extends StatelessWidget {
final Function(InterventionHistory, String) onAcceptClick; final Function(InterventionHistory, String) onAcceptClick;
final Function(InterventionHistory, String) onRejectClick; final Function(InterventionHistory, String) onRejectClick;
final TextEditingController remarksController = TextEditingController(); final TextEditingController remarksController;
InterventionHistoryItem({ InterventionHistoryItem({
@ -20,6 +20,7 @@ class InterventionHistoryItem extends StatelessWidget {
required this.interventionHistory, required this.interventionHistory,
required this.onAcceptClick, required this.onAcceptClick,
required this.onRejectClick, required this.onRejectClick,
required this.remarksController,
}); });

@ -339,8 +339,9 @@ getIcdCodeData() async{
}); });
}), }),
SizedBox(height: spaceBetweenTextFields), SizedBox(height: spaceBetweenTextFields),
widget.prescriptionViewModel.icd10DeseaseItems.isNotEmpty ? widget.prescriptionViewModel.icd10DeseaseItems.isNotEmpty
// PrescriptionTextFiled( ?
// PrescriptionTextFiled(
// hintText: TranslationBase.of(context).nameOrICD, // hintText: TranslationBase.of(context).nameOrICD,
// elementError: icdCodeError, // elementError: icdCodeError,
// element: icdCode, // element: icdCode,
@ -595,7 +596,6 @@ getIcdCodeData() async{
} }
addMedicationButton(MedicineViewModel model) async { addMedicationButton(MedicineViewModel model) async {
print("Add");
await locator<AnalyticsService>().logEvent( await locator<AnalyticsService>().logEvent(
eventCategory: "Add Prescription Form", eventCategory: "Add Prescription Form",
eventAction: "Add Prescription", eventAction: "Add Prescription",

@ -112,6 +112,8 @@ class _QrReaderScreenState extends State<QrReaderScreen> {
Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: { Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: {
"patient": model.inPatientList[0], "patient": model.inPatientList[0],
"isInpatient": true, "isInpatient": true,
"patientType": "1",
"arrivalType": "1",
}); });
} else { } else {
DrAppToastMsg.showErrorToast(model.error); DrAppToastMsg.showErrorToast(model.error);

@ -141,8 +141,16 @@ class Utils {
} }
static Future<bool> checkConnection() async { static Future<bool> checkConnection() async {
List<ConnectivityResult> result = await (Connectivity().checkConnectivity()); List<ConnectivityResult> connectivityResult = await (Connectivity().checkConnectivity());
return true; if (connectivityResult.contains(ConnectivityResult.mobile) ||
connectivityResult.contains(ConnectivityResult.wifi) ||
connectivityResult.contains(ConnectivityResult.ethernet) ||
connectivityResult.contains(ConnectivityResult.bluetooth) ||
connectivityResult.contains(ConnectivityResult.vpn)) {
return true;
} else {
return false;
}
// return result.contains(ConnectivityResult.wifi)||result.contains(ConnectivityResult.mobile); // return result.contains(ConnectivityResult.wifi)||result.contains(ConnectivityResult.mobile);
} }

Loading…
Cancel
Save