Add insurance approval services

merge-requests/365/head
Mohammad Aljammal 5 years ago
parent e515265f11
commit 7dae41513f

@ -103,6 +103,8 @@ PODS:
- PromisesObjC (1.2.11)
- Protobuf (3.13.0)
- Reachability (3.2)
- screen (0.0.1):
- Flutter
- shared_preferences (0.0.1):
- Flutter
- shared_preferences_linux (0.0.1):
@ -128,6 +130,14 @@ PODS:
- Flutter
- url_launcher_windows (0.0.1):
- Flutter
- video_player (0.0.1):
- Flutter
- video_player_web (0.0.1):
- Flutter
- wakelock (0.0.1):
- Flutter
- webview_flutter (0.0.1):
- Flutter
DEPENDENCIES:
- Alamofire
@ -150,6 +160,7 @@ DEPENDENCIES:
- path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`)
- path_provider_windows (from `.symlinks/plugins/path_provider_windows/ios`)
- permission_handler (from `.symlinks/plugins/permission_handler/ios`)
- screen (from `.symlinks/plugins/screen/ios`)
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
- shared_preferences_linux (from `.symlinks/plugins/shared_preferences_linux/ios`)
- shared_preferences_macos (from `.symlinks/plugins/shared_preferences_macos/ios`)
@ -161,6 +172,10 @@ DEPENDENCIES:
- url_launcher_macos (from `.symlinks/plugins/url_launcher_macos/ios`)
- url_launcher_web (from `.symlinks/plugins/url_launcher_web/ios`)
- url_launcher_windows (from `.symlinks/plugins/url_launcher_windows/ios`)
- video_player (from `.symlinks/plugins/video_player/ios`)
- video_player_web (from `.symlinks/plugins/video_player_web/ios`)
- wakelock (from `.symlinks/plugins/wakelock/ios`)
- webview_flutter (from `.symlinks/plugins/webview_flutter/ios`)
SPEC REPOS:
trunk:
@ -219,6 +234,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/path_provider_windows/ios"
permission_handler:
:path: ".symlinks/plugins/permission_handler/ios"
screen:
:path: ".symlinks/plugins/screen/ios"
shared_preferences:
:path: ".symlinks/plugins/shared_preferences/ios"
shared_preferences_linux:
@ -241,6 +258,14 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/url_launcher_web/ios"
url_launcher_windows:
:path: ".symlinks/plugins/url_launcher_windows/ios"
video_player:
:path: ".symlinks/plugins/video_player/ios"
video_player_web:
:path: ".symlinks/plugins/video_player_web/ios"
wakelock:
:path: ".symlinks/plugins/wakelock/ios"
webview_flutter:
:path: ".symlinks/plugins/webview_flutter/ios"
SPEC CHECKSUMS:
Alamofire: 85e8a02c69d6020a0d734f6054870d7ecb75cf18
@ -276,6 +301,7 @@ SPEC CHECKSUMS:
PromisesObjC: 8c196f5a328c2cba3e74624585467a557dcb482f
Protobuf: 3dac39b34a08151c6d949560efe3f86134a3f748
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
screen: abd91ca7bf3426e1cc3646d27e9b2358d6bf07b0
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
shared_preferences_linux: afefbfe8d921e207f01ede8b60373d9e3b566b78
shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087
@ -289,6 +315,10 @@ SPEC CHECKSUMS:
url_launcher_macos: fd7894421cd39320dce5f292fc99ea9270b2a313
url_launcher_web: e5527357f037c87560776e36436bf2b0288b965c
url_launcher_windows: 683d7c283894db8d1914d3ab2223b20cc1ad95d5
video_player: 9cc823b1d9da7e8427ee591e8438bfbcde500e6e
video_player_web: da8cadb8274ed4f8dbee8d7171b420dedd437ce7
wakelock: 0d4a70faf8950410735e3f61fb15d517c8a6efc4
webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96
PODFILE CHECKSUM: 649616dc336b3659ac6b2b25159d8e488e042b69

@ -139,7 +139,7 @@ class BaseAppClient {
String token = await sharedPref.getString(TOKEN);
var languageID =
await sharedPref.getStringWithDefaultValue(APP_Language, 'ar');
await sharedPref.getStringWithDefaultValue(APP_Language, 'en');
if (body.containsKey('SetupID')) {
body['SetupID'] = body.containsKey('SetupID')
? body['SetupID'] != null

@ -226,6 +226,8 @@ const GET_BOX_QUANTITY =
///GET ECG
const GET_ECG = "Services/Patients.svc/REST/HIS_GetPatientMuseResults";
const GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus";
var selectedPatientType = 1;
//*********change value to decode json from Dropdown ************

@ -773,4 +773,14 @@ const Map<String, Map<String, String>> localizedValues = {
},
'reschedule': {'en': 'Reschedule', 'ar': 'إعادة الجدولة'},
'leaves': {'en': 'Leaves', 'ar': 'يغادر'},
"totalApproval": {
"en": "Total approval unused",
"ar": "اجمالي الموافقات الغير مستخدمة"
},
"procedureStatus": {"en": "Procedure Status: ", "ar": "حالة الاجراء"},
"unusedCount": {"en": "Unused Count: ", "ar": "غير مستخدم: "},
"companyName": {"en": "Company Name ", "ar": "اسم الشركة: "},
"procedureName": {"en": "Procedure Name", "ar": "اسم الاجراء"},
"usageStatus": {"en": "Usage Status", "ar": "جالة الاستخدام"},
};

@ -0,0 +1,140 @@
class InsuranceApprovalDetails {
String procedureName;
String status;
String isInvoicedDesc;
InsuranceApprovalDetails({
this.procedureName,
this.status,
this.isInvoicedDesc,
});
InsuranceApprovalDetails.fromJson(Map<String, dynamic> json) {
try {
isInvoicedDesc = json['IsInvoicedDesc'];
status = json['Status'];
procedureName = json['ProcedureName'];
} catch (e) {
print(e);
}
}
}
class InsuranceApprovalModel {
InsuranceApprovalDetails approvalDetails;
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
int patientID;
String tokenID;
int patientTypeID;
int patientType;
int eXuldAPPNO;
int projectID;
String doctorName;
String clinicName;
String patientDescription;
int approvalNo;
String approvalStatusDescption;
int unUsedCount;
//String companyName;
String expiryDate;
String rceiptOn;
int appointmentNo;
InsuranceApprovalModel(
{this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType,
this.eXuldAPPNO,
this.projectID,
this.doctorName,
this.clinicName,
this.patientDescription,
this.approvalNo,
this.approvalStatusDescption,
this.unUsedCount,
//this.companyName,
this.expiryDate,
this.rceiptOn,
this.approvalDetails,
this.appointmentNo});
InsuranceApprovalDetails x = InsuranceApprovalDetails();
InsuranceApprovalModel.fromJson(Map<String, dynamic> json) {
try {
rceiptOn = json['ReceiptOn'];
expiryDate = json['ExpiryDate'];
//companyName = json['CompanyName'];
unUsedCount = json['TotaUnUsedCount'];
approvalStatusDescption = json['ApprovalStatusDescption'];
approvalNo = json['ApprovalNo'];
patientDescription = json['IsInOutPatientDescription'];
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
patientID = json['PatientID'];
tokenID = json['TokenID'];
patientTypeID = json['PatientTypeID'];
patientType = json['PatientType'];
eXuldAPPNO = json['EXuldAPPNO'];
projectID = json['ProjectID'];
doctorName = json['DoctorName'];
clinicName = json['ClinicName'];
approvalDetails =
InsuranceApprovalDetails.fromJson(json['ApporvalDetails'][0]);
appointmentNo = json['AppointmentNo'];
} catch (e) {
print(e);
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['PatientID'] = this.patientID;
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType;
if (appointmentNo == null) {
data['EXuldAPPNO'] = this.eXuldAPPNO;
data['ProjectID'] = this.projectID;
}
if (appointmentNo != null) {
data['AppointmentNo'] = this.appointmentNo;
}
return data;
}
}

@ -0,0 +1,45 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/insurance_approval.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
class InsuranceCardService extends BaseService {
InsuranceApprovalModel _insuranceApprovalModel = InsuranceApprovalModel(
isDentalAllowedBackend: false,
patientTypeID: 1,
patientType: 1,
eXuldAPPNO: 0,
projectID: 0);
List<InsuranceApprovalModel> _insuranceApproval = List();
List<InsuranceApprovalModel> get insuranceApproval => _insuranceApproval;
Future getInsuranceApproval(PatiantInformtion patient,{int appointmentNo}) async {
hasError = false;
// _cardList.clear();
if (appointmentNo != null) {
_insuranceApprovalModel.appointmentNo = appointmentNo;
_insuranceApprovalModel.eXuldAPPNO = null;
_insuranceApprovalModel.projectID = null;
} else {
_insuranceApprovalModel.appointmentNo = null;
_insuranceApprovalModel.eXuldAPPNO = 0;
_insuranceApprovalModel.projectID = 0;
}
await baseAppClient.postPatient(GET_PAtIENTS_INSURANCE_APPROVALS,
patient: patient,
onSuccess: (dynamic response, int statusCode) {
print(response['HIS_Approval_List'].length);
_insuranceApproval.clear();
_insuranceApproval.length = 0;
response['HIS_Approval_List'].forEach((item) {
_insuranceApproval.add(InsuranceApprovalModel.fromJson(item));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _insuranceApprovalModel.toJson());
}
}

@ -0,0 +1,31 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/insurance_approval.dart';
import 'package:doctor_app_flutter/core/service/InsuranceCardService.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import '../../locator.dart';
class InsuranceViewModel extends BaseViewModel{
InsuranceCardService _insuranceCardService = locator<InsuranceCardService>();
List<InsuranceApprovalModel> get insuranceApproval =>
_insuranceCardService.insuranceApproval;
Future getInsuranceApproval(PatiantInformtion patient,{int appointmentNo}) async {
error = "";
setState(ViewState.Busy);
if (appointmentNo != null)
await _insuranceCardService.getInsuranceApproval(patient,
appointmentNo: appointmentNo);
else
await _insuranceCardService.getInsuranceApproval(patient);
if (_insuranceCardService.hasError) {
error = _insuranceCardService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
}

@ -15,8 +15,10 @@ import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart';
import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart';
import 'package:get_it/get_it.dart';
import 'core/service/InsuranceCardService.dart';
import 'core/service/PatientMuseService.dart';
import 'core/service/SOAP_service.dart';
import 'core/service/labs_service.dart';
import 'core/service/patient-admission-request-service.dart';
import 'core/service/doctor_reply_service.dart';
import 'core/service/medicine_service.dart';
@ -26,9 +28,11 @@ import 'core/service/patient-doctor-referral-service.dart';
import 'core/service/referral_patient_service.dart';
import 'core/service/referred_patient_service.dart';
import 'core/service/schedule_service.dart';
import 'core/viewModel/InsuranceViewModel.dart';
import 'core/viewModel/PatientMuseViewModel.dart';
import 'core/viewModel/SOAP_view_model.dart';
import 'core/viewModel/doctor_replay_view_model.dart';
import 'core/viewModel/labs_view_model.dart';
import 'core/viewModel/medicine_view_model.dart';
import 'core/viewModel/patient-admission-request-viewmodel.dart';
import 'core/viewModel/patient-ucaf-viewmodel.dart';
@ -61,6 +65,8 @@ void setupLocator() {
locator.registerLazySingleton(() => UcafService());
locator.registerLazySingleton(() => AuthService());
locator.registerLazySingleton(() => PatientMuseService());
locator.registerLazySingleton(() => LabsService());
locator.registerLazySingleton(() => InsuranceCardService());
/// View Model
locator.registerFactory(() => DoctorReplayViewModel());
@ -81,4 +87,6 @@ void setupLocator() {
locator.registerFactory(() => UcafViewModel());
locator.registerFactory(() => MedicalFileViewModel());
locator.registerFactory(() => PatientMuseViewModel());
locator.registerFactory(() => LabsViewModel());
locator.registerFactory(() => InsuranceViewModel());
}

@ -2,9 +2,11 @@ import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/root_page.dart';
import 'package:doctor_app_flutter/screens/medical-file/medical_file_page.dart';
import 'package:doctor_app_flutter/screens/patients/ECGPage.dart';
import 'package:doctor_app_flutter/screens/patients/insurance_approval_screen_patient.dart';
import 'package:doctor_app_flutter/screens/patients/profile/UCAF/UCAF-detail-screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/UCAF/UCAF-input-screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/insurance_approvals_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/lab_result/labs_home_page.dart';
import 'package:doctor_app_flutter/screens/patients/profile/patient_orders_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/progress_note_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/refer_patient_screen.dart';
@ -79,6 +81,7 @@ const String SERVICES = 'services';
const String SETTINGS = 'settings';
const String VITAL_SIGN = 'patients/vital-sign';
const String LAB_ORDERS = 'patients/lab_orders';
const String LAB_RESULT = 'patients/lab_result';
const String PRESCRIPTIONS = 'patients/prescription';
const String MEDICAL_FILE = 'patients/radiology';
const String PROGRESS_NOTE = 'patients/progress-note';
@ -86,8 +89,8 @@ const String REFER_PATIENT = 'patients/refer-patient';
const String MY_REFERRAL_DETAIL = 'my_referral_detail';
const String REFER_PATIENT_TO_DOCTOR = 'patients/refer-to-doctor';
const String PATIENT_ORDERS = 'patients/patient_orders';
const String PATIENT_INSURANCE_APPROVALS =
'patients/patient_insurance_approvals';
const String PATIENT_INSURANCE_APPROVALS = 'patients/patient_insurance_approvals';
const String PATIENT_INSURANCE_APPROVALS_NEW = 'patients/patient_insurance_approvals_new';
const String VITAL_SIGN_DETAILS = 'patients/vital-sign-details';
const String PATIENT_VITAL_SIGN = 'patients/vital-sign-data';
const String CREATE_EPISODE = 'patients/create-episode';
@ -136,6 +139,7 @@ var routes = {
MESSAGES: (_) => MessagesScreen(),
SERVICES: (_) => ServicesScreen(),
LAB_ORDERS: (_) => LabOrdersScreen(),
LAB_RESULT: (_) => LabsHomePage(),
PRESCRIPTIONS: (_) => PrescriptionScreen(),
MEDICAL_FILE: (_) => MedicalFilePage(),
PROGRESS_NOTE: (_) => ProgressNoteScreen(),
@ -143,6 +147,7 @@ var routes = {
REFER_PATIENT_TO_DOCTOR: (_) => PatientMakeReferralScreen(),
PATIENT_ORDERS: (_) => PatientsOrdersScreen(),
PATIENT_INSURANCE_APPROVALS: (_) => InsuranceApprovalsScreen(),
PATIENT_INSURANCE_APPROVALS_NEW: (_) => InsuranceApprovalScreenNew(),
VITAL_SIGN_DETAILS: (_) => VitalSignDetailsScreen(),
PATIENT_VITAL_SIGN: (_) => PatientVitalSignScreen(),
RADIOLOGY: (_) => RadiologyScreen(),

@ -0,0 +1,428 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/InsuranceViewModel.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../base/base_view.dart';
class InsuranceApprovalScreenNew extends StatefulWidget {
final int appointmentNo;
InsuranceApprovalScreenNew({this.appointmentNo});
@override
_InsuranceApprovalScreenNewState createState() => _InsuranceApprovalScreenNewState();
}
class _InsuranceApprovalScreenNewState extends State<InsuranceApprovalScreenNew> {
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
return BaseView<InsuranceViewModel>(
onModelReady: widget.appointmentNo != null
? (model) =>
model.getInsuranceApproval(patient,appointmentNo: widget.appointmentNo)
: (model) => model.getInsuranceApproval(patient),
builder: (BuildContext context, InsuranceViewModel model, Widget child) =>
AppScaffold(
isShowAppBar: true,
baseViewModel: model,
appBarTitle: TranslationBase.of(context).approvals,
body: SingleChildScrollView(
child: Container(
margin: EdgeInsets.only(
left: SizeConfig.screenWidth * 0.004,
right: SizeConfig.screenWidth * 0.004,
top: SizeConfig.screenWidth * 0.04,
),
child: Column(
children: <Widget>[
Container(
width: double.infinity,
height: SizeConfig.screenHeight * 0.09,
color: Color(0xffEEEEEE),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
Texts(
TranslationBase.of(context).totalApproval,
color: Color(0xff60688B),
fontSize: 19.0,
fontWeight: FontWeight.w600,
),
if (model.insuranceApproval.length > 0)
Container(
width: 60,
height: 40,
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.circular(19.0)),
child: Center(
child: Texts(
model.insuranceApproval[0].unUsedCount
.toString(),
color: Colors.white, fontSize: 17.0,
),
))
],
)),
...List.generate(
model.insuranceApproval.length,
(index) => RoundedContainer(
backgroundColor: Colors.white,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
ExpansionTile(
title: Container(
//height: 120.0,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
model.insuranceApproval[index].patientDescription == "In Patient"
? Container(
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius:
BorderRadius.circular(
16.0)),
width: 115.0,
padding:
EdgeInsets.only(left: 11.5),
child: Center(
child: Texts(
TranslationBase.of(context).inPatient,
color: Colors.white,
),
),
)
: Container(
decoration: BoxDecoration(
color: Color(0xff505A5D),
borderRadius:
BorderRadius.circular(
16.0)),
width: 115.0,
padding:
EdgeInsets.only(left: 11.5),
child: Center(
child: Texts(
TranslationBase.of(context).outpatient,
color: Colors.white,
),
),
),
Padding(
padding: EdgeInsets.symmetric(
vertical: 10.0),
child: Texts(
model.insuranceApproval[index]
.clinicName,
fontSize: 20.0,
color: Color(0xff60686B),
fontWeight: FontWeight.w600,
),
),
Texts(
model.insuranceApproval[index]
.doctorName,
fontSize: 17.0,
),
],
),
),
children: <Widget>[
Padding(
padding: EdgeInsets.symmetric(
vertical: 12.0, horizontal: 12.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Row(
children: [
Texts(
TranslationBase.of(context).approvalNo,
fontSize: 18.0,
),
Texts(model.insuranceApproval[index].approvalNo.toString(),
fontSize: 18.0,
fontWeight: FontWeight.w600,),
],
),
Divider(
color: Colors.black,
height: 25.0,
thickness: 1.0,
),
Row(
children: [
Texts(
TranslationBase.of(context).procedureStatus ,
fontSize: 17.5,
),
SizedBox(width: 12,),
Expanded(
child: Texts(
model.insuranceApproval[index].approvalStatusDescption,
fontWeight: FontWeight.w600,
fontSize: 17.5,
),
),
],
),
Divider(
color: Colors.black,
height: 25.0,
thickness: 1.0,
),
Row(
children: [
Texts(
TranslationBase.of(context).unusedCount,
fontSize: 17.5,
),
Texts(
model.insuranceApproval[index].unUsedCount.toString(),
fontSize: 17.5,
fontWeight: FontWeight.w600,
),
],
),
Divider(
color: Colors.black,
height: 25.0,
thickness: 1.0,
),
// Text(
// 'Company Name: ' +
// model.insuranceApproval[index]
// .companyName ==
// null
// ? '000'
// : model
// .insuranceApproval[index].companyName,
// style: TextStyle(
// fontSize: 17.5,
// fontWeight: FontWeight.w600),
// ),
Texts(
TranslationBase.of(context).companyName,
fontWeight: FontWeight.w600,
fontSize: 17.5,
),
Divider(
color: Colors.black,
height: 25.0,
thickness: 1.0,
),
Row(
children: [
Texts(
TranslationBase.of(context).receiptOn ,
fontSize: 17.5,
fontWeight: FontWeight.w600,
),
Texts(
convertDateFormat(model.insuranceApproval[index].rceiptOn),
fontSize: 17.5,
fontWeight: FontWeight.w600,
),
],
),
Divider(
color: Colors.black,
height: 25.0,
thickness: 1.0,
),
Row(
children: [
Texts(
TranslationBase.of(context).expiryDate,
fontSize: 17.5,
fontWeight: FontWeight.w600,
),
Texts(
convertDateFormat(model.insuranceApproval[index].expiryDate),
fontSize: 17.5,
fontWeight: FontWeight.w600,
),
],
),
Divider(
color: Colors.black,
height: 55.0,
thickness: 1.2,
),
IntrinsicHeight(
child: Row(
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
Expanded(
flex: 1,
child: Column(
children: <Widget>[
Text(TranslationBase.of(
context)
.procedureName),
Padding(
padding: EdgeInsets.only(
top: SizeConfig
.heightMultiplier *
3.0),
child: Text(
model
.insuranceApproval[
index]
.approvalDetails ==
null
? ''
: model
.insuranceApproval[
index]
.approvalDetails
.procedureName,
style: TextStyle(
fontWeight:
FontWeight.w600,
fontSize: 15.5),
),
),
],
),
),
VerticalDivider(
width: 10.0,
thickness: 1.2,
color: Colors.black,
),
Expanded(
flex: 1,
child: Column(
children: <Widget>[
Text(TranslationBase.of(
context)
.procedureStatus),
Padding(
padding: EdgeInsets.only(
top: SizeConfig
.heightMultiplier *
3.0),
child: Text(
model
.insuranceApproval[
index]
.approvalDetails ==
null
? ''
: model
.insuranceApproval[
index]
.approvalDetails
.status,
style: TextStyle(
fontSize: 17.5,
fontWeight:
FontWeight
.w600),
),
),
],
),
),
VerticalDivider(
width: 2.3,
thickness: 1.2,
color: Colors.black,
),
Expanded(
flex: 1,
child: Column(
children: <Widget>[
Text(TranslationBase.of(
context)
.usageStatus),
Padding(
padding: EdgeInsets.only(
top: SizeConfig
.heightMultiplier *
3.0),
child: Text(
model
.insuranceApproval[
index]
.approvalDetails ==
null
? ''
: model
.insuranceApproval[
index]
.approvalDetails
.isInvoicedDesc,
style: TextStyle(
fontWeight:
FontWeight.w600,
fontSize: 17.5),
),
),
],
),
),
],
),
),
Divider(
color: Colors.black,
height: 25.0,
thickness: 1.0,
),
],
),
),
],
),
],
),
)),
],
),
),
),
),
);
}
convertDateFormat(String Date) {
const start = "/Date(";
const end = "+0300)";
final startIndex = Date.indexOf(start);
final endIndex = Date.indexOf(end, startIndex + start.length);
var date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(Date.substring(startIndex + start.length, endIndex)));
String newDate = date.year.toString() +
"-" +
date.month.toString().padLeft(2, '0') +
"-" +
date.day.toString().padLeft(2, '0');
return newDate.toString();
}
}

@ -1154,6 +1154,13 @@ class TranslationBase {
String get leaves => localizedValues['leaves'][locale.languageCode];
String get openRad => localizedValues['open-rad'][locale.languageCode];
String get totalApproval => localizedValues['totalApproval'][locale.languageCode];
String get procedureStatus => localizedValues['procedureStatus'][locale.languageCode];
String get unusedCount => localizedValues['unusedCount'][locale.languageCode];
String get companyName => localizedValues['companyName'][locale.languageCode];
String get procedureName => localizedValues['procedureName'][locale.languageCode];
String get usageStatus => localizedValues['usageStatus'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -36,7 +36,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
route: PATIENT_INSURANCE_APPROVALS,
route: PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).service,
icon: 'lab.png'),
@ -44,7 +44,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
route: LAB_ORDERS,
route: LAB_RESULT,
nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result,
icon: 'lab.png'),

@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
class Texts extends StatefulWidget {
final String text;
final String variant;
final Color color;
@ -16,13 +15,26 @@ class Texts extends StatefulWidget {
final bool readMore;
final String style;
final bool allowExpand;
final TextDecoration textDecoration;
final double fontSize;
final FontWeight fontWeight;
final TextDecoration textDecoration;
Texts(this.text, {Key key, this.variant, this.color,
this.bold, this.regular, this.medium, this.allowExpand = true,
this.italic:false, this.textAlign, this.maxLength=60,
this.maxLines, this.readMore=false, this.style, this.textDecoration
}) : super(key: key);
Texts(this.text,
{Key key,
this.variant,
this.color,
this.bold,
this.regular,
this.medium,
this.allowExpand = true,
this.italic: false,
this.textAlign,
this.maxLength = 60,
this.maxLines,
this.readMore = false,
this.style,
this.textDecoration, this.fontSize, this.fontWeight})
: super(key: key);
@override
_TextsState createState() => _TextsState();
@ -35,7 +47,7 @@ class _TextsState extends State<Texts> {
@override
void didUpdateWidget(Texts oldWidget) {
setState(() {
if (widget.style=="overline")
if (widget.style == "overline")
text = widget.text.toUpperCase();
else {
text = widget.text;
@ -47,7 +59,7 @@ class _TextsState extends State<Texts> {
@override
void initState() {
hidden = widget.readMore;
if (widget.style=="overline")
if (widget.style == "overline")
text = widget.text.toUpperCase();
else {
text = widget.text;
@ -55,7 +67,7 @@ class _TextsState extends State<Texts> {
super.initState();
}
double _getFontSize () {
double _getFontSize() {
switch (widget.variant) {
case "heading0":
return 40.0;
@ -92,16 +104,15 @@ class _TextsState extends State<Texts> {
}
}
FontWeight _getFontWeight () {
FontWeight _getFontWeight() {
if (widget.bold ?? false) {
return FontWeight.w900;
} else if (widget.regular ?? false) {
return FontWeight.w500;
} else if (widget.medium ?? false) {
return FontWeight.w800;
}
else {
if (widget.style==null) {
} else {
if (widget.style == null) {
switch (widget.variant) {
case "heading":
return FontWeight.w900;
@ -137,14 +148,12 @@ class _TextsState extends State<Texts> {
} else {
return null;
}
}
}
@override
Widget build(BuildContext context) {
TextStyle _getFontStyle () {
TextStyle _getFontStyle() {
switch (widget.style) {
case "headline2":
return Theme.of(context).textTheme.headline2;
@ -168,7 +177,7 @@ class _TextsState extends State<Texts> {
return Theme.of(context).textTheme.overline;
case "button":
return Theme.of(context).textTheme.button;
default :
default:
return TextStyle();
}
}
@ -179,61 +188,71 @@ class _TextsState extends State<Texts> {
children: <Widget>[
Stack(
children: <Widget>[
Text(!hidden ? text : (text.substring(0, text.length > widget.maxLength ? widget.maxLength : text.length)),
textAlign: widget.textAlign,
overflow: widget.maxLines!=null ? ((widget.maxLines > 1) ? TextOverflow.fade : TextOverflow.ellipsis) : null,
maxLines: widget.maxLines ?? null,
style: widget.style != null ? _getFontStyle().copyWith(
fontStyle: widget.italic ? FontStyle.italic : null,
color: widget.color!=null ? widget.color : null,
fontWeight: _getFontWeight(),
) : TextStyle(
fontStyle: widget.italic ? FontStyle.italic : null,
color: widget.color!=null ? widget.color : Colors.black,
fontSize: _getFontSize(),
letterSpacing: widget.variant=="overline" ? 1.5 : null,
fontWeight: _getFontWeight(),
decoration: widget.textDecoration//TextDecoration.lineThrough
)
),
Text(
!hidden
? text
: (text.substring(
0,
text.length > widget.maxLength
? widget.maxLength
: text.length)),
textAlign: widget.textAlign,
overflow: widget.maxLines != null
? ((widget.maxLines > 1)
? TextOverflow.fade
: TextOverflow.ellipsis)
: null,
maxLines: widget.maxLines ?? null,
style: widget.style != null
? _getFontStyle().copyWith(
fontStyle: widget.italic ? FontStyle.italic : null,
color: widget.color != null ? widget.color : null,
fontWeight: widget.fontWeight ?? _getFontWeight(),
)
: TextStyle(
fontStyle: widget.italic ? FontStyle.italic : null,
color:
widget.color != null ? widget.color : Colors.black,
fontSize:widget.fontSize?? _getFontSize(),
letterSpacing:
widget.variant == "overline" ? 1.5 : null,
fontWeight: _getFontWeight(),
decoration:
widget.textDecoration //TextDecoration.lineThrough
)),
if (widget.readMore && text.length > widget.maxLength && hidden)
Positioned(
bottom: 0,
left: 0,
right: 0,
child: Container(
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
Theme.of(context).backgroundColor,
Theme.of(context).backgroundColor.withOpacity(0),
],
begin: Alignment.bottomCenter,
end: Alignment.topCenter
)
Positioned(
bottom: 0,
left: 0,
right: 0,
child: Container(
decoration: BoxDecoration(
gradient: LinearGradient(colors: [
Theme.of(context).backgroundColor,
Theme.of(context).backgroundColor.withOpacity(0),
], begin: Alignment.bottomCenter, end: Alignment.topCenter)),
height: 30,
),
height: 30,
),
)
)
],
),
if (widget.allowExpand && widget.readMore && text.length > widget.maxLength)
if (widget.allowExpand &&
widget.readMore &&
text.length > widget.maxLength)
Padding(
padding: EdgeInsets.only(top: 8.0, right: 8.0, bottom: 8.0),
child: InkWell(
onTap: () {
setState(() {
hidden=!hidden;
hidden = !hidden;
});
},
child: Text(hidden ? "Read More" : "Read less",
style: _getFontStyle().copyWith(
color: HexColor('#FF0000'),
fontWeight: FontWeight.w800,
fontFamily: "WorkSans",
)
),
style: _getFontStyle().copyWith(
color: HexColor('#FF0000'),
fontWeight: FontWeight.w800,
fontFamily: "WorkSans",
)),
),
),
],

@ -172,10 +172,10 @@ class DoctorCard extends StatelessWidget {
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Image.asset(
'assets/images/Icon-awesome-calendar.png',
width: 30,
height: 30,
Icon(
Icons.calendar_today_outlined,
size: 30,
color: Colors.red,
),
Expanded(
child: Texts(

@ -608,7 +608,7 @@ packages:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.4"
version: "1.3.0-nullsafety.3"
mime:
dependency: transitive
description:
@ -900,7 +900,7 @@ packages:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.2"
version: "1.10.0-nullsafety.1"
stream_channel:
dependency: transitive
description:
@ -1084,5 +1084,5 @@ packages:
source: hosted
version: "2.2.1"
sdks:
dart: ">=2.10.0 <=2.11.0-213.1.beta"
dart: ">=2.10.0 <2.11.0"
flutter: ">=1.22.0 <2.0.0"

Loading…
Cancel
Save