Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into patient_app_services

merge-requests/547/head
Mohammad Aljammal 5 years ago
commit 414ccdde49

@ -293,14 +293,13 @@ class PatientService extends BaseService {
); );
} }
Future updatePatientProgressNote(UpdateNoteReqModel req) async { Future updatePatientProgressNote(UpdateNoteReqModel req) async {
hasError = false; hasError = false;
await baseAppClient.post( await baseAppClient.post(
UPDATE_PROGRESS_NOTE_FOR_INPATIENT, UPDATE_PROGRESS_NOTE_FOR_INPATIENT,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
print("ok"); print("ok");
}, },
onFailure: (String error, int statusCode) { onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -316,7 +315,7 @@ class PatientService extends BaseService {
await baseAppClient.post( await baseAppClient.post(
CREATE_PROGRESS_NOTE_FOR_INPATIENT, CREATE_PROGRESS_NOTE_FOR_INPATIENT,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
print("ok"); print("ok");
}, },
onFailure: (String error, int statusCode) { onFailure: (String error, int statusCode) {
hasError = true; hasError = true;

@ -499,7 +499,8 @@ class _HomeScreenState extends State<HomeScreen> {
"patientSearchForm": "patientSearchForm":
_patientSearchFormValues, _patientSearchFormValues,
"selectedType": "1", "selectedType": "1",
"arrivalType": "1" "arrivalType": "1",
"isInpatient": true
}); });
}, },
), ),
@ -538,7 +539,7 @@ class _HomeScreenState extends State<HomeScreen> {
.pushNamed(PATIENTS, arguments: { .pushNamed(PATIENTS, arguments: {
"patientSearchForm": "patientSearchForm":
_patientSearchFormValues, _patientSearchFormValues,
"selectedType": "7", "selectedType": "0",
"arrivalType": "1" "arrivalType": "1"
}); });
}, },

@ -93,7 +93,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
}); });
Navigator.of(context).pushNamed(PATIENTS, arguments: { Navigator.of(context).pushNamed(PATIENTS, arguments: {
"patientSearchForm": _patientSearchFormValues, "patientSearchForm": _patientSearchFormValues,
"selectedType": isView == false ? '0' : _selectedType, "selectedType": _selectedType,
"isSearch": true, "isSearch": true,
"isView": isView "isView": isView
}); });

@ -68,7 +68,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
List<String> _locations = []; //['All', 'Today', 'Tomorrow', 'Next Week']; List<String> _locations = []; //['All', 'Today', 'Tomorrow', 'Next Week'];
int _activeLocation = 0; int _activeLocation = 0;
bool isInpatient = false;
bool _isInit = true; bool _isInit = true;
String patientType; String patientType;
bool isSearch = false; bool isSearch = false;
@ -274,6 +274,9 @@ class _PatientsScreenState extends State<PatientsScreen> {
if (routeArgs != null && routeArgs.containsKey('activeFilter')) { if (routeArgs != null && routeArgs.containsKey('activeFilter')) {
_activeLocation = routeArgs['activeFilter']; _activeLocation = routeArgs['activeFilter'];
} }
if (routeArgs != null && routeArgs.containsKey('isInpatient')) {
isInpatient = routeArgs['isInpatient'];
}
if (!projectsProvider.isArabic) if (!projectsProvider.isArabic)
patientTypeTitle = SERVICES_PATIANT_HEADER[int.parse(patientType)]; patientTypeTitle = SERVICES_PATIANT_HEADER[int.parse(patientType)];
@ -623,6 +626,8 @@ class _PatientsScreenState extends State<PatientsScreen> {
patientType, patientType,
arrivalType: arrivalType:
arrivalType, arrivalType,
isInpatient:
isInpatient,
onTap: () { onTap: () {
Navigator.of(context) Navigator.of(context)
.pushNamed( .pushNamed(

@ -17,12 +17,14 @@ class PatientCard extends StatelessWidget {
final Function onTap; final Function onTap;
final String patientType; final String patientType;
final String arrivalType; final String arrivalType;
final bool isInpatient;
const PatientCard( const PatientCard(
{Key key, {Key key,
this.patientInfo, this.patientInfo,
this.onTap, this.onTap,
this.patientType, this.patientType,
this.arrivalType}) this.arrivalType,
this.isInpatient})
: super(key: key); : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -239,8 +241,7 @@ class PatientCard extends StatelessWidget {
), ),
), ),
), ),
if (SERVICES_PATIANT2[int.parse(patientType)] == if (isInpatient == true)
"List_MyInPatient")
Container( Container(
child: RichText( child: RichText(
text: new TextSpan( text: new TextSpan(
@ -375,8 +376,7 @@ class PatientCard extends StatelessWidget {
width: 35, width: 35,
)), )),
]) ])
: (SERVICES_PATIANT2[int.parse(patientType)] == : (isInpatient == true)
"List_MyInPatient")
? Row( ? Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: [ children: [

Loading…
Cancel
Save