Merge branch 'sultan' into 'development'

bug fixes

See merge request Cloud_Solution/doctor_app_flutter!375
merge-requests/376/merge
Mohammad Aljammal 4 years ago
commit 906a3e8546

@ -10,7 +10,6 @@ import 'package:flutter/cupertino.dart';
import 'package:http/http.dart' as http;
import 'dart:io' show Platform;
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
Helpers helpers = new Helpers();
//ProjectProvider projectsProvider = new ProjectProvider();
@ -86,7 +85,7 @@ class BaseAppClient {
print("URL : $url");
print("Body : ${json.encode(body)}");
String asd= json.encode(body);
if (await Helpers.checkConnection()) {
final response = await http.post(url,
body: json.encode(body),
@ -172,7 +171,6 @@ class BaseAppClient {
body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2;
body['PatientType'] = body.containsKey('PatientType')
? body['PatientType'] != null
? body['PatientType']
@ -197,7 +195,6 @@ class BaseAppClient {
body['PatientOutSA'] = 0; //user['OutSA']; //TODO change it
body['SessionID'] = SESSION_ID; //getSe
print("URL : $url");
print("Body : ${json.encode(body)}");

@ -843,7 +843,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
MainAxisAlignment.start,
children: <Widget>[
AppText(
model.dashboardItemsList[5]
model.dashboardItemsList[6]
.kPIName,
fontSize:
SizeConfig.textMultiplier *
@ -869,11 +869,11 @@ class _DashboardScreenState extends State<DashboardScreen> {
Axis.horizontal,
children: new List.generate(
model
.dashboardItemsList[5]
.dashboardItemsList[6]
.summaryoptions
.length, (int index) {
return getActivityButton(model
.dashboardItemsList[5]
.dashboardItemsList[6]
.summaryoptions[index]);
})))
],

@ -478,34 +478,31 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
SizedBox(
height: 10,
),
// Container(
// decoration: BoxDecoration(
// borderRadius: BorderRadius.all(
// Radius.circular(6.0)),
// border: Border.all(
// width: 1.0,
// color: HexColor("#CCCCCC"))),
// padding: EdgeInsets.all(10),
// child: AppTextFormField(
// labelText: TranslationBase.of(context)
// .patientFile,
// borderColor: Colors.white,
// textInputType: TextInputType.number,
// focusNode: _nodeText3,
// inputFormatter: ONLY_NUMBERS,
// onSaved: (value) {},
// ),
// ),
// (!(_selectedType == '2' ||
// _selectedType == '4'))
// ? DynamicElements(
// _patientSearchFormValues,
// isFormSubmitted)
// : SizedBox(
// height: 0,
// ),
SizedBox(
height: 10,
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(10),
child: AppTextFormField(
labelText: TranslationBase.of(context)
.patientFile,
borderColor: Colors.white,
textInputType: TextInputType.number,
focusNode: _nodeText3,
inputFormatter: ONLY_NUMBERS,
onSaved: (value) {},
),
),
(!(_selectedType == '2' ||
_selectedType == '4'))
? DynamicElements(
_patientSearchFormValues,
isFormSubmitted)
: SizedBox(
height: 0,
),
SizedBox(
height: 10,

@ -304,6 +304,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
//if (val2 == 7) {
responseModelList.sort((a, b) {
if (b.startTime != null && b.startTime != null) {
try {
DateTime now = DateTime.now();
DateFormat dateFormat = DateFormat("yyyy-MM-dd HH:mm");
String formattedDate =
@ -315,6 +316,12 @@ class _PatientsScreenState extends State<PatientsScreen> {
var adate = dateTimeA; //a.startTime;
var bdate = dateTimeB;
return adate.compareTo(bdate);
} on Exception catch (_) {
print('never reached');
var adate = a.startTime; //a.startTime;
var bdate = b.startTime;
return adate.compareTo(bdate);
}
} else {
var adate = convertDateFormat(a.appointmentDate);
var bdate = convertDateFormat(b.appointmentDate);
@ -549,8 +556,10 @@ class _PatientsScreenState extends State<PatientsScreen> {
.getFrom,
"to":
patient.getTo,
"isSearch": isSearch,
"arrivalType" :arrivalType,
"isSearch":
isSearch,
"arrivalType":
arrivalType,
});
},
);

@ -405,7 +405,9 @@ class PatientProfileScreen extends StatelessWidget {
if (patient.episodeNo == 0)
BorderedButton(
"${TranslationBase.of(context).createNew}\n${TranslationBase.of(context).episode}",
backgroundColor: Colors.red.shade700,
backgroundColor: patient.patientStatusType == 43
? Colors.red.shade700
: Colors.grey.shade700,
textColor: Colors.white,
vPadding: 8,
radius: 30,
@ -419,17 +421,21 @@ class PatientProfileScreen extends StatelessWidget {
height: 30,
),
handler: () async {
if (patient.patientStatusType == 43) {
PostEpisodeReqModel postEpisodeReqModel =
PostEpisodeReqModel(
appointmentNo: patient.appointmentNo,
appointmentNo:
patient.appointmentNo,
patientMRN: patient.patientMRN);
GifLoaderDialogUtils.showMyDialog(context);
await model.postEpisode(postEpisodeReqModel);
await model
.postEpisode(postEpisodeReqModel);
GifLoaderDialogUtils.hideDialog(context);
patient.episodeNo = model.episodeID;
Navigator.of(context).pushNamed(
CREATE_EPISODE,
arguments: {'patient': patient});
}
},
),
if (patient.episodeNo != 0)

@ -122,8 +122,9 @@ class PatientCard extends StatelessWidget {
Row(
children: [
AppText(
patientInfo.nationalityName ??
patientInfo.nationality,
patientInfo.nationalityName != null
? patientInfo.nationalityName
: patientInfo.nationality,
fontWeight: FontWeight.bold,
fontSize: 14,
),
@ -253,15 +254,19 @@ class PatientCard extends StatelessWidget {
width: 3.5,
),
Container(
child: AppText(
DateUtils.convertDateFromServerFormat(
patientInfo.appointmentDate
child: patientInfo.appointmentDate != null
? AppText(
DateUtils
.convertDateFromServerFormat(
patientInfo
.appointmentDate
.toString(),
'yyyy-MM-dd'),
fontSize:
1.5 * SizeConfig.textMultiplier,
fontSize: 1.5 *
SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
)
: SizedBox(),
),
SizedBox(
height: 0.5,

Loading…
Cancel
Save