add improvement on create episode

pull/216/head
Elham Rababah 5 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); onFailure('Error While Fetching data', statusCode);
} else { } else {
var parsed = json.decode(response.body.toString()); var parsed = json.decode(response.body.toString());
// if (!parsed['IsAuthenticated']) { if (!parsed['IsAuthenticated']) {
// // TODO: return it back when IsAuthenticated work fine in all service // TODO: return it back when IsAuthenticated work fine in all service
// // await helpers.logout(); await helpers.logout();
// helpers.showErrorToast('Your session expired Please login agian');
// helpers.showErrorToast('Your session expired Please login agian'); } else
// } else
if (parsed['MessageStatus'] == 1) { if (parsed['MessageStatus'] == 1) {
if (!parsed['IsAuthenticated']) if (!parsed['IsAuthenticated'])
onFailure(getError(parsed), statusCode); onFailure(getError(parsed), statusCode);

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

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

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

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

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

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

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

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

Loading…
Cancel
Save