some changes in patientArrivalList And make action when click on vitalSign widget inside pendingReferral

merge-requests/242/head
mosazaid 5 years ago
parent ff906338bf
commit fd2a86dca4

@ -536,4 +536,8 @@ const Map<String, Map<String, String>> localizedValues = {
'en': "There is no Chief Complaint",
'ar': "ليس هناك شكوى رئيس"
},
'patientNoDetailErrMsg': {
'en': "There is no detail for this patient",
'ar': "لا توجد تفاصيل لهذا المريض"
},
};

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
@ -12,7 +13,7 @@ class BaseService {
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
DoctorProfileModel doctorProfile;
List<PatientArrivalEntity> patientArrivalList = [];
List<PatiantInformtion> patientArrivalList = [];
//TODO add the user login model when we need it
Future<DoctorProfileModel> getDoctorProfile() async {
@ -50,7 +51,7 @@ class BaseService {
patientArrivalList.clear();
response['patientArrivalList']['entityList'].forEach((v) {
PatientArrivalEntity item = PatientArrivalEntity.fromJson(v);
PatiantInformtion item = PatiantInformtion.fromJson(v);
patientArrivalList.add(item);
});
},

@ -27,7 +27,7 @@ class PatientReferralViewModel extends BaseViewModel {
List<PendingReferral> get pendingReferral =>
_referralPatientService.pendingReferralList;
List<PatientArrivalEntity> get patientArrivalList =>
List<PatiantInformtion> get patientArrivalList =>
_referralPatientService.patientArrivalList;
Future getMasterLookup(MasterKeysService masterKeys) async {

@ -11,9 +11,6 @@ import '../../locator.dart';
class VitalSignsViewModel extends BaseViewModel {
VitalSignsService _vitalSignService = locator<VitalSignsService>();
List<PatientArrivalEntity> get patientArrivalList =>
_vitalSignService.patientArrivalList;
VitalSignData get patientVitalSigns => _vitalSignService.patientVitalSigns;
Future getPatientVitalSign(PatiantInformtion patient) async {

@ -12,6 +12,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/borderedButton.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../../../../routes.dart';
@ -39,7 +40,7 @@ class MyReferralDetailScreen extends StatelessWidget {
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).referPatient,
body: Column(
body: model.patientArrivalList != null ? Column(
children: [
Expanded(
child: SingleChildScrollView(
@ -110,7 +111,7 @@ class MyReferralDetailScreen extends StatelessWidget {
icon: 'lab.png'),
PatientProfileButton(
key: key,
// patient: patient,
patient: model.patientArrivalList[0],
route: PATIENT_VITAL_SIGN,
nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs,
@ -160,6 +161,15 @@ class MyReferralDetailScreen extends StatelessWidget {
),
),
],
) : Container(
child: Center(
child: AppText(
TranslationBase.of(context).patientNoDetailErrMsg,
color: HexColor("#B8382B"),
fontWeight: FontWeight.bold,
fontSize: 16,
),
),
),
),
);

@ -553,6 +553,7 @@ class TranslationBase {
String get approvalRequired => localizedValues['approvalRequired'][locale.languageCode];
String get uncoveredByDoctor => localizedValues['uncoveredByDoctor'][locale.languageCode];
String get chiefComplaintEmptyMsg => localizedValues['chiefComplaintEmptyMsg'][locale.languageCode];
String get patientNoDetailErrMsg => localizedValues['patientNoDetailErrMsg'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

Loading…
Cancel
Save