Merge branch 'pharmacy-bugs' into 'development'

jira bugs

See merge request Cloud_Solution/diplomatic-quarter!291
merge-requests/292/merge
Mohammad Aljammal 4 years ago
commit 3468f847d3

@ -95,9 +95,12 @@ const GET_NEAREST_HOSPITAL =
'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime'; 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime';
///ED Online ///ED Online
const ER_GET_VISUAL_TRIAGE_QUESTIONS = "services/Doctors.svc/REST/ER_GetVisualTriageQuestions"; const ER_GET_VISUAL_TRIAGE_QUESTIONS =
const ER_SAVE_TRIAGE_INFORMATION = "services/Doctors.svc/REST/ER_SaveTriageInformation"; "services/Doctors.svc/REST/ER_GetVisualTriageQuestions";
const ER_GetPatientPaymentInformationForERClinic = "services/Doctors.svc/REST/ER_GetPatientPaymentInformationForERClinic"; const ER_SAVE_TRIAGE_INFORMATION =
"services/Doctors.svc/REST/ER_SaveTriageInformation";
const ER_GetPatientPaymentInformationForERClinic =
"services/Doctors.svc/REST/ER_GetPatientPaymentInformationForERClinic";
///Er Nearest ///Er Nearest
const GET_AMBULANCE_REQUEST = const GET_AMBULANCE_REQUEST =
@ -312,7 +315,7 @@ var DEVICE_TOKEN = "";
var IS_VOICE_COMMAND_CLOSED = false; var IS_VOICE_COMMAND_CLOSED = false;
var IS_TEXT_COMPLETED = false; var IS_TEXT_COMPLETED = false;
var DeviceTypeID = Platform.isIOS ? 1 : 2; var DeviceTypeID = Platform.isIOS ? 1 : 2;
const LANGUAGE_ID = 1; const LANGUAGE_ID = 2;
const GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region"; const GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region";
const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList"; const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList";
const GET_PAtIENTS_INSURANCE = const GET_PAtIENTS_INSURANCE =
@ -534,12 +537,9 @@ const GET_SPECIFICATION = "productspecification/";
const GET_BRAND_ITEMS = "products"; const GET_BRAND_ITEMS = "products";
// External API // External API
const ADD_ADDRESS_INFO = const ADD_ADDRESS_INFO = "addcustomeraddress";
"addcustomeraddress"; const GET_CUSTOMER_ADDRESSES = "Customers/";
const GET_CUSTOMER_ADDRESSES = const GET_CUSTOMER_INFO = "VerifyCustomer";
"Customers/";
const GET_CUSTOMER_INFO =
"VerifyCustomer";
//Pharmacy //Pharmacy

@ -220,7 +220,6 @@ class BaseAppClient {
Function(String error, int statusCode) onFailure, Function(String error, int statusCode) onFailure,
bool isAllowAny = false, bool isAllowAny = false,
bool isExternal = false}) async { bool isExternal = false}) async {
var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN); var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN);
var user = await sharedPref.getObject(USER_PROFILE); var user = await sharedPref.getObject(USER_PROFILE);
String url; String url;
@ -587,7 +586,6 @@ class BaseAppClient {
return params; return params;
} }
pharmacyPost(String endPoint, pharmacyPost(String endPoint,
{Map<String, dynamic> body, {Map<String, dynamic> body,
Function(dynamic response, int statusCode) onSuccess, Function(dynamic response, int statusCode) onSuccess,

@ -31,24 +31,20 @@ class InsurancePage extends StatelessWidget {
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
padding: EdgeInsets.all(10.0), padding: EdgeInsets.all(10.0),
child: Row( child: Row(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
if (model.user != null) if (model.user != null)
Expanded( Expanded(
flex: 3, flex: 3,
child: Container( child: Container(
margin: EdgeInsets.only( margin:
top: 2.0, EdgeInsets.only(top: 2.0, left: 10.0, right: 20.0),
left: 10.0,
right: 20.0),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Texts( Texts(
model.user.firstName ?? '' + " " + model.user.lastName ?? '', model.user.firstName + " " + model.user.lastName,
fontSize: 14, fontSize: 14,
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
@ -57,11 +53,9 @@ class InsurancePage extends StatelessWidget {
height: 8, height: 8,
), ),
Texts( Texts(
TranslationBase.of(context) TranslationBase.of(context).fileno +
.fileno +
": " + ": " +
model.user.patientID model.user.patientID.toString(),
.toString(),
fontSize: 14, fontSize: 14,
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
@ -78,9 +72,7 @@ class InsurancePage extends StatelessWidget {
children: <Widget>[ children: <Widget>[
Container( Container(
child: SecondaryButton( child: SecondaryButton(
label: TranslationBase.of( label: TranslationBase.of(context).fetchData,
context)
.fetchData,
small: true, small: true,
textColor: Colors.white, textColor: Colors.white,
onTap: () { onTap: () {
@ -88,15 +80,12 @@ class InsurancePage extends StatelessWidget {
setupID: '010266', setupID: '010266',
projectID: 15, projectID: 15,
patientIdentificationID: patientIdentificationID:
model.user model.user.patientIdentificationNo,
.patientIdentificationNo, patientID: model.user.patientID,
patientID: model name: model.user.firstName +
.user.patientID,
name: model.user
.firstName +
" " + " " +
model model.user.lastName,
.user.lastName,context: context); context: context);
}, },
), ),
), ),
@ -107,38 +96,39 @@ class InsurancePage extends StatelessWidget {
], ],
), ),
), ),
if(model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList != null ?? false) if (model.getAllSharedRecordsByStatusResponse
...List.generate(model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.length, (index) => .getAllSharedRecordsByStatusList !=
model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList[index].status == 3 null ??
false)
...List.generate(
model.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList.length,
(index) => model.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[index].status ==
3
? Container( ? Container(
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Card( child: Card(
margin: EdgeInsets.fromLTRB( margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
8.0, 16.0, 8.0, 8.0),
color: Colors.white, color: Colors.white,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: borderRadius: BorderRadius.circular(10),
BorderRadius.circular(10),
), ),
child: Container( child: Container(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
padding: EdgeInsets.all(10.0), padding: EdgeInsets.all(10.0),
child: Row( child: Row(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
flex: 3, flex: 3,
child: Container( child: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: 2.0, top: 2.0, left: 10.0, right: 20.0),
left: 10.0,
right: 20.0),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment CrossAxisAlignment.start,
.start,
children: <Widget>[ children: <Widget>[
Texts( Texts(
model model
@ -148,16 +138,13 @@ class InsurancePage extends StatelessWidget {
.patientName, .patientName,
fontSize: 14, fontSize: 14,
color: Colors.black, color: Colors.black,
fontWeight: fontWeight: FontWeight.w500,
FontWeight.w500,
), ),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
Texts( Texts(
TranslationBase.of( TranslationBase.of(context).fileno +
context)
.fileno +
": " + ": " +
model model
.getAllSharedRecordsByStatusResponse .getAllSharedRecordsByStatusResponse
@ -167,8 +154,7 @@ class InsurancePage extends StatelessWidget {
.toString(), .toString(),
fontSize: 14, fontSize: 14,
color: Colors.black, color: Colors.black,
fontWeight: fontWeight: FontWeight.w500,
FontWeight.w500,
) )
], ],
), ),
@ -177,18 +163,15 @@ class InsurancePage extends StatelessWidget {
Expanded( Expanded(
flex: 2, flex: 2,
child: Container( child: Container(
margin: margin: EdgeInsets.only(top: 2.0),
EdgeInsets.only(top: 2.0),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Container( Container(
child: SecondaryButton( child: SecondaryButton(
label: TranslationBase label: TranslationBase.of(context)
.of(context)
.fetchData, .fetchData,
small: true, small: true,
textColor: textColor: Colors.white,
Colors.white,
onTap: () { onTap: () {
getDetails( getDetails(
projectID: 15, projectID: 15,
@ -197,8 +180,7 @@ class InsurancePage extends StatelessWidget {
.getAllSharedRecordsByStatusList[ .getAllSharedRecordsByStatusList[
index] index]
.patientIdenficationNumber, .patientIdenficationNumber,
setupID: setupID: '010266',
'010266',
patientID: model patientID: model
.getAllSharedRecordsByStatusResponse .getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[ .getAllSharedRecordsByStatusList[
@ -207,7 +189,9 @@ class InsurancePage extends StatelessWidget {
name: model name: model
.getAllSharedRecordsByStatusResponse .getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[ .getAllSharedRecordsByStatusList[
index].patientName,context: context); index]
.patientName,
context: context);
}, },
), ),
), ),
@ -220,9 +204,7 @@ class InsurancePage extends StatelessWidget {
), ),
), ),
) )
: Container() : Container()),
),
], ],
), ),
); );
@ -233,7 +215,8 @@ class InsurancePage extends StatelessWidget {
int projectID, int projectID,
String patientIdentificationID, String patientIdentificationID,
int patientID, int patientID,
String name,BuildContext context}) { String name,
BuildContext context}) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
_insuranceCardService _insuranceCardService
.getPatientInsuranceDetails( .getPatientInsuranceDetails(
@ -243,12 +226,14 @@ class InsurancePage extends StatelessWidget {
patientIdentificationID: patientIdentificationID) patientIdentificationID: patientIdentificationID)
.then((value) { .then((value) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (!_insuranceCardService.hasError && _insuranceCardService.isHaveInsuranceCard) { if (!_insuranceCardService.hasError &&
_insuranceCardService.isHaveInsuranceCard) {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
page: InsuranceCardUpdateDetails( page: InsuranceCardUpdateDetails(
insuranceCardDetailsModel: _insuranceCardService.insuranceCardDetailsList, insuranceCardDetailsModel:
_insuranceCardService.insuranceCardDetailsList,
patientID: patientID, patientID: patientID,
patientIdentificationID: patientIdentificationID, patientIdentificationID: patientIdentificationID,
name: name, name: name,

@ -32,7 +32,11 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
super.initState(); super.initState();
_tabController = TabController(length: 2, vsync: this); _tabController = TabController(length: 2, vsync: this);
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/insurance-card/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/insurance-card/ar/0.png')); imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/insurance-card/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/insurance-card/ar/0.png'));
} }
void dispose() { void dispose() {
@ -227,6 +231,4 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
), ),
); );
} }
} }

@ -169,10 +169,11 @@ class _MyVaccinesState extends State<MyVaccines> {
width: double.infinity, width: double.infinity,
// height: 80.0, // height: 80.0,
child: Button( child: Button(
disabled: true,
label: TranslationBase.of(context).checkVaccineAvailability, label: TranslationBase.of(context).checkVaccineAvailability,
backgroundColor: Color(0xff9EA3A4), backgroundColor: Color(0xff9EA3A4),
onTap: () => onTap: () => Navigator.push(
Navigator.push(context, FadePage(page: MyVaccinesItemPage())), context, FadePage(page: MyVaccinesItemPage())),
), ),
), ),
if (projectViewModel.havePrivilege(27)) if (projectViewModel.havePrivilege(27))
@ -187,8 +188,8 @@ class _MyVaccinesState extends State<MyVaccines> {
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
onTap: () async { onTap: () async {
model.sendEmail( model.sendEmail(
message: message: TranslationBase.of(context)
TranslationBase.of(context).emailSentSuccessfully); .emailSentSuccessfully);
}, },
), ),
), ),

Loading…
Cancel
Save