|
|
|
|
@ -11,9 +11,11 @@ import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/balance/new_text_Field.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
@ -135,6 +137,8 @@ class _SearchForReferralsPageState extends State<SearchForReferralsPage> {
|
|
|
|
|
),
|
|
|
|
|
allReferrals.length != 0
|
|
|
|
|
? Container(
|
|
|
|
|
transform:
|
|
|
|
|
Matrix4.translationValues(0.0, -40.0, 0.0),
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
|
@ -155,61 +159,68 @@ class _SearchForReferralsPageState extends State<SearchForReferralsPage> {
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.circular(10),
|
|
|
|
|
),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.all(5.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
allReferrals[index]
|
|
|
|
|
.status,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 16.0))),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.all(5.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
allReferrals[index]
|
|
|
|
|
.patientName,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 16.0,
|
|
|
|
|
color: Colors
|
|
|
|
|
.grey[600]))),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.all(5.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
allReferrals[index]
|
|
|
|
|
.preferredBranchName,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 16.0,
|
|
|
|
|
color: Colors
|
|
|
|
|
.grey[600]))),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.all(5.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
DateUtil.getMonthDayYearDateFormatted(
|
|
|
|
|
DateUtil.convertStringToDateNoTimeZone(
|
|
|
|
|
allReferrals[
|
|
|
|
|
index]
|
|
|
|
|
.referralDate)),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 16.0,
|
|
|
|
|
color: Colors
|
|
|
|
|
.grey[600]))),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
right: 20.0, left: 20.0),
|
|
|
|
|
child: Icon(Icons.arrow_forward,
|
|
|
|
|
size: 20.0,
|
|
|
|
|
color: Colors.grey[700]),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
left: 10.0, right: 10.0),
|
|
|
|
|
padding: EdgeInsets.all(5.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
margin:
|
|
|
|
|
EdgeInsets.all(5.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
allReferrals[index]
|
|
|
|
|
.status,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 16.0))),
|
|
|
|
|
Container(
|
|
|
|
|
margin:
|
|
|
|
|
EdgeInsets.all(5.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
allReferrals[index]
|
|
|
|
|
.patientName,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 16.0,
|
|
|
|
|
color: Colors
|
|
|
|
|
.grey[600]))),
|
|
|
|
|
Container(
|
|
|
|
|
margin:
|
|
|
|
|
EdgeInsets.all(5.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
allReferrals[index]
|
|
|
|
|
.preferredBranchName,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 16.0,
|
|
|
|
|
color: Colors
|
|
|
|
|
.grey[600]))),
|
|
|
|
|
Container(
|
|
|
|
|
margin:
|
|
|
|
|
EdgeInsets.all(5.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
DateUtil.getMonthDayYearDateFormatted(
|
|
|
|
|
DateUtil.convertStringToDateNoTimeZone(
|
|
|
|
|
allReferrals[
|
|
|
|
|
index]
|
|
|
|
|
.referralDate)),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 16.0,
|
|
|
|
|
color: Colors
|
|
|
|
|
.grey[600]))),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
child: Icon(Icons.arrow_forward,
|
|
|
|
|
size: 20.0,
|
|
|
|
|
color: Colors.grey[700]),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
@ -234,6 +245,7 @@ class _SearchForReferralsPageState extends State<SearchForReferralsPage> {
|
|
|
|
|
textColor: Colors.white,
|
|
|
|
|
label: "Search",
|
|
|
|
|
onTap: () async {
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
SearchEReferralRequestModel searchEReferralRequestModel =
|
|
|
|
|
new SearchEReferralRequestModel(
|
|
|
|
|
patientMobileNumber: _selectedCountry['code']
|
|
|
|
|
@ -253,11 +265,13 @@ class _SearchForReferralsPageState extends State<SearchForReferralsPage> {
|
|
|
|
|
await model
|
|
|
|
|
.getEReferrals(searchEReferralRequestModel)
|
|
|
|
|
.then((response) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
print(response['List_EReferrals']);
|
|
|
|
|
allReferrals.clear();
|
|
|
|
|
setState(() {
|
|
|
|
|
response['List_EReferrals'].forEach((data) {
|
|
|
|
|
allReferrals.add(GetEReferralResponseModel.fromJson(data));
|
|
|
|
|
allReferrals
|
|
|
|
|
.add(GetEReferralResponseModel.fromJson(data));
|
|
|
|
|
_isSubmitted = true;
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
@ -331,8 +345,8 @@ class _SearchForReferralsPageState extends State<SearchForReferralsPage> {
|
|
|
|
|
GetEReferralResponseModel getEReferralResponseModel) {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) => ReferralDetails(
|
|
|
|
|
FadePage(
|
|
|
|
|
page: ReferralDetails(
|
|
|
|
|
getEReferralResponseModel: getEReferralResponseModel)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|