add improvement on create episode

pull/216/head
Elham Rababah 4 years ago
parent 423bd49aee
commit e65740761a

Binary file not shown.

After

Width:  |  Height:  |  Size: 651 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 987 B

@ -82,12 +82,11 @@ class BaseAppClient {
onFailure('Error While Fetching data', statusCode);
} else {
var parsed = json.decode(response.body.toString());
// if (!parsed['IsAuthenticated']) {
// // TODO: return it back when IsAuthenticated work fine in all service
// // await helpers.logout();
//
// helpers.showErrorToast('Your session expired Please login agian');
// } else
if (!parsed['IsAuthenticated']) {
// TODO: return it back when IsAuthenticated work fine in all service
await helpers.logout();
helpers.showErrorToast('Your session expired Please login agian');
} else
if (parsed['MessageStatus'] == 1) {
if (!parsed['IsAuthenticated'])
onFailure(getError(parsed), statusCode);

@ -274,34 +274,35 @@ class _PatientsScreenState extends State<PatientsScreen> {
.then((res) {
setState(() {
_isLoading = false;
// if (res['MessageStatus'] == 1) {
if (val2 == 7) {
print("Assad");
if (res[SERVICES_PATIANT2[val2]] == null) {
_isError = true;
_isLoading = false;
this.error = error.toString();
if (res['MessageStatus'] == 1) {
if (val2 == 7) {
if (res[SERVICES_PATIANT2[val2]] == null) {
_isError = true;
_isLoading = false;
this.error = error.toString();
} else {
var localList = [];
res["patientArrivalList"]["entityList"].forEach((v) {
Map<String, dynamic> mergedPatient = {
...v,
...v["patientDetails"]
};
localList.add(mergedPatient);
});
print(localList.toString());
lItems = localList;
}
} else {
var localList=[];
res["patientArrivalList"]["entityList"].forEach((v) {
Map<String,dynamic> mergedPatient= {...v,...v["patientDetails"]};
localList.add(mergedPatient);
});
print(localList.toString());
lItems = localList;//res[SERVICES_PATIANT2[val2]]["entityList"];
lItems = res[SERVICES_PATIANT2[val2]];
}
parsed = lItems;
responseModelList = new ModelResponse.fromJson(parsed).list;
responseModelList2 = responseModelList;
_isError = false;
} else {
lItems = res[SERVICES_PATIANT2[val2]];
_isError = true;
error = res['ErrorEndUserMessage'] ?? res['ErrorMessage'];
}
parsed = lItems;
responseModelList = new ModelResponse.fromJson(parsed).list;
responseModelList2 = responseModelList;
_isError = false;
// } else {
// _isError = true;
// error = res['ErrorEndUserMessage'] ?? res['ErrorMessage'];
// }
});
}).catchError((error) {
setState(() {
@ -679,7 +680,8 @@ class _PatientsScreenState extends State<PatientsScreen> {
.pushNamed(
PATIENTS_PROFILE,
arguments: {
"patient": item
"patient": item,
"patientType":patientType
});
},
),

@ -22,6 +22,7 @@ class PatientProfileWidget extends StatelessWidget {
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
patient = routeArgs['patient'];
String patientType = routeArgs['patientType'];
return Container(
color: Color(0XFFF2F2F2),
@ -437,7 +438,7 @@ class PatientProfileWidget extends StatelessWidget {
SliverPadding(
padding: const EdgeInsets.all(16.0),
sliver: ProfileMedicalInfoWidget(
patient: patient,
patient: patient, patientType:patientType
))
]),
);

@ -18,8 +18,9 @@ import 'PatientProfileButton.dart';
*@desc: Profile Medical Info Widget
*/
class ProfileMedicalInfoWidget extends StatelessWidget {
ProfileMedicalInfoWidget({Key key, this.patient}) : super(key: key);
ProfileMedicalInfoWidget({Key key, this.patient, this.patientType});
PatiantInformtion patient;
String patientType;
@override
Widget build(BuildContext context) {
return SliverGrid.count(
@ -28,20 +29,22 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
crossAxisCount: 2,
childAspectRatio: 1.5,
children: [
if(int.parse(patientType) ==7)
PatientProfileButton(
key: key,
patient: patient,
nameLine1: "Create New",
nameLine2: "Episode",
route: CREATE_EPISODE,
icon: 'heartbeat.png'),
icon: 'create-episod.png'),
if(int.parse(patientType) ==7)
PatientProfileButton(
key: key,
patient: patient,
nameLine1: "Update",
nameLine2: "Episode",
route: UPDATE_EPISODE,
icon: 'heartbeat.png'),
icon: 'modilfy-episode.png'),
PatientProfileButton(
key: key,
patient: patient,

@ -70,13 +70,21 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
children: widget.myAllergiesList.map((selectedAllergy) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(selectedAllergy.selectedAllergy.nameEn.toUpperCase(),
variant: "bodyText", bold: true, color: Colors.black),
Container(
child: Expanded(
child: Texts(selectedAllergy.selectedAllergy.nameEn.toUpperCase(),
variant: "bodyText", bold: true, color: Colors.black),
),
width: MediaQuery.of(context).size.width * 0.5,
),
Texts(
selectedAllergy.selectedAllergySeverity.nameEn
.toUpperCase(),

@ -81,8 +81,13 @@ class _UpdateHistoryWidgetState extends State<UpdateHistoryWidget>
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(myHistory.nameEn,
variant: "bodyText", bold: true, color: Colors.black),
Container(
child: Expanded(
child: Texts(myHistory.nameEn,
variant: "bodyText", bold: true, color: Colors.black),
),
width: MediaQuery.of(context).size.width * 0.7,
),
InkWell(
child: Icon(
FontAwesomeIcons.trash,

@ -414,7 +414,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM
.add(ListHisProgNotePatientAllergyDiseaseVM(
allergyDiseaseId: allergy.selectedAllergy.id,
allergyDiseaseType: allergy.selectedAllergy.id,
allergyDiseaseType: allergy.selectedAllergy.typeId,
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,

@ -277,10 +277,13 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
SizedBox(
height: 6,
),
AppText(
widget.mySelectedAssessment.remark??"",
fontSize: 10,
color: Colors.grey,
Container(
width: MediaQuery.of(context).size.width * 0.5,
child: AppText(
widget.mySelectedAssessment.remark??"",
fontSize: 10,
color: Colors.grey,
),
),
],
),
@ -298,10 +301,12 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
widget.mySelectedAssessment.selectedICD.code.toUpperCase()??"",
fontSize: 10,
color: Colors.grey,
Container(
child: AppText(
widget.mySelectedAssessment.selectedICD.code.trim().toUpperCase()??"",
fontSize: 10,
color: Colors.grey,
),
),
],
)

@ -304,14 +304,14 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
),
Container(
margin: EdgeInsets.only(
left: 10, right: 10, top: 15),
left: 0, right: 0, top: 15),
child: TextFields(
hintText: "Remarks",
fontSize: 13.5,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 25,
minLines: 13,
minLines: 4,
controller: remarksController,
validator: (value) {
if (value == null)

Loading…
Cancel
Save