Merge branch 'flutter_vervion_2_by_elham' into 'flutter_2_developemt'

7 step from fix screen

See merge request Cloud_Solution/doctor_app_flutter!898
merge-requests/899/merge
Elham Ali 4 years ago
commit 1e77cdb085

@ -804,8 +804,8 @@ class SOAPViewModel extends BaseViewModel {
episodeId: patientInfo.episodeNo, episodeId: patientInfo.episodeNo,
appointmentNo: patientInfo.appointmentNo, appointmentNo: patientInfo.appointmentNo,
remarks: "", remarks: "",
historyId: history.selectedHistory.id, historyId: history.selectedHistory!.id,
historyType: history.selectedHistory.typeId, historyType: history.selectedHistory!.typeId,
isChecked: history.isChecked, isChecked: history.isChecked,
)); ));
}); });

@ -74,7 +74,7 @@ class _DischargedPatientState extends State<DischargedPatient> {
DoctorApp.filter_1, DoctorApp.filter_1,
color: Colors.black, color: Colors.black,
), ),
iconSize: 20, onPressed: () { }, iconSize: 20,
), ),
), ),
SizedBox( SizedBox(

@ -33,10 +33,10 @@ class UcafDetailScreen extends StatefulWidget {
} }
class _UcafDetailScreenState extends State<UcafDetailScreen> { class _UcafDetailScreenState extends State<UcafDetailScreen> {
final PatiantInformtion patient; PatiantInformtion patient;
final UcafViewModel model; UcafViewModel model;
UcafViewModel ucafModel; late UcafViewModel ucafModel;
int _activeTap = 0; int _activeTap = 0;

@ -16,7 +16,7 @@ class PageStepperWidget extends StatelessWidget {
final int stepsCount; final int stepsCount;
final int currentStepIndex; final int currentStepIndex;
final Size screenSize; final Size screenSize;
final List<String>? stepsTitles; final List<String> stepsTitles;
PageStepperWidget( PageStepperWidget(
{required this.stepsCount, {required this.stepsCount,

@ -20,7 +20,7 @@ class SoapUtils {
isChecked = false, isChecked = false,
remark, remark,
isLocal = true, isLocal = true,
int createdBy, int ?createdBy,
bool isExpanded = false}) { bool isExpanded = false}) {
MySelectedAllergy mySelectedAllergy = MySelectedAllergy( MySelectedAllergy mySelectedAllergy = MySelectedAllergy(
selectedAllergy: allergy, selectedAllergy: allergy,

@ -44,7 +44,8 @@ class _AddMedicationState extends State<AddMedication> {
TextEditingController frequencyController = TextEditingController(); TextEditingController frequencyController = TextEditingController();
GetMedicationResponseModel? _selectedMedication; GetMedicationResponseModel? _selectedMedication;
GlobalKey key = new GlobalKey<AutoCompleteTextFieldState<GetMedicationResponseModel>>(); GlobalKey<AutoCompleteTextFieldState<GetMedicationResponseModel>> key = new GlobalKey<AutoCompleteTextFieldState<GetMedicationResponseModel>>();
bool isFormSubmitted = false; bool isFormSubmitted = false;
@override @override
@ -59,7 +60,7 @@ class _AddMedicationState extends State<AddMedication> {
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
appBar: BottomSheetTitle( appBar: BottomSheetTitle(
title: TranslationBase.of(context).addMedication, title: TranslationBase.of(context).addMedication!,
), ),
body: Center( body: Center(
child: Container( child: Container(
@ -103,8 +104,8 @@ class _AddMedicationState extends State<AddMedication> {
.textFieldSelectorDecoration( .textFieldSelectorDecoration(
TranslationBase.of( TranslationBase.of(
context) context)
.searchMedicineNameHere, .searchMedicineNameHere!,
null, '',
true, true,
suffixIcon: suffixIcon:
Icons.search), Icons.search),
@ -119,22 +120,22 @@ class _AddMedicationState extends State<AddMedication> {
suggestion) => suggestion) =>
new Padding( new Padding(
child: AppText(suggestion child: AppText(suggestion
.description + .description! +
'/' + '/' +
suggestion suggestion!
.genericName), .genericName!),
padding: EdgeInsets.all( padding: EdgeInsets.all(
8.0)), 8.0)),
itemSorter: (a, b) => 1, itemSorter: (a, b) => 1,
itemFilter: (suggestion, itemFilter: (suggestion,
input) => input) =>
suggestion.genericName.toLowerCase().startsWith( suggestion.genericName!.toLowerCase().startsWith(
input.toLowerCase()) || input.toLowerCase()) ||
suggestion.description suggestion.description!
.toLowerCase() .toLowerCase()
.startsWith(input .startsWith(input
.toLowerCase()) || .toLowerCase()) ||
suggestion.keywords suggestion.keywords!
.toLowerCase() .toLowerCase()
.startsWith(input .startsWith(input
.toLowerCase()), .toLowerCase()),
@ -145,9 +146,9 @@ class _AddMedicationState extends State<AddMedication> {
Helpers.getTextFieldHeight(), Helpers.getTextFieldHeight(),
hintText: _selectedMedication != hintText: _selectedMedication !=
null null
? _selectedMedication ? _selectedMedication!
.description + .description! +
(' (${_selectedMedication.genericName} )') (' (${_selectedMedication!.genericName!} )')
: TranslationBase.of(context) : TranslationBase.of(context)
.searchMedicineNameHere, .searchMedicineNameHere,
minLines: 1, minLines: 1,
@ -157,7 +158,7 @@ class _AddMedicationState extends State<AddMedication> {
icon: Icon( icon: Icon(
Icons.search, Icons.search,
color: Colors.grey.shade600, color: Colors.grey.shade600,
)), ), onPressed: () { },),
enabled: false, enabled: false,
), ),
), ),
@ -174,8 +175,8 @@ class _AddMedicationState extends State<AddMedication> {
.width * .width *
0.7, 0.7,
child: AppText( child: AppText(
_selectedMedication.description + _selectedMedication!.description! +
(' (${_selectedMedication.genericName} )'), (' (${_selectedMedication!.genericName!} )'),
color: Color(0xFF575757), color: Color(0xFF575757),
fontSize: 10, fontSize: 10,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
@ -386,7 +387,7 @@ class _AddMedicationState extends State<AddMedication> {
_selectedMedicationFrequency != null) { _selectedMedicationFrequency != null) {
widget.medicationController.text = widget widget.medicationController.text = widget
.medicationController.text + .medicationController.text +
'${_selectedMedication.description} (${TranslationBase.of(context).doseTime} ) ${doseController.text} (${TranslationBase.of(context).strength}) ${strengthController.text} (${TranslationBase.of(context).route}) ${routeController.text} (${TranslationBase.of(context).frequency}) ${frequencyController.text} \n \n'; '${_selectedMedication!.description!} (${TranslationBase.of(context).doseTime} ) ${doseController.text} (${TranslationBase.of(context).strength}) ${strengthController.text} (${TranslationBase.of(context).route}) ${routeController.text} (${TranslationBase.of(context).frequency}) ${frequencyController.text} \n \n';
Navigator.of(context).pop(); Navigator.of(context).pop();
} }
}, },

@ -1,3 +1,5 @@
import 'package:flutter/cupertino.dart';
abstract class SubjectiveCallBack{ abstract class SubjectiveCallBack{
Function nextFunction(model); VoidCallback? nextFunction(model);
} }

@ -139,7 +139,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage>
SoapUtils.generateMySelectedAllergy( SoapUtils.generateMySelectedAllergy(
allergy: selectedAllergy, allergy: selectedAllergy,
isChecked: element.isChecked, isChecked: element.isChecked,
createdBy: element.createdBy, createdBy: element!.createdBy!,
remark: element.remarks, remark: element.remarks,
isLocal: false, isLocal: false,
allergySeverity: selectedAllergySeverity); allergySeverity: selectedAllergySeverity);
@ -265,13 +265,13 @@ if (widget.patientInfo.admissionNo == null) ExpandableSOAPWidge
} }
addSubjectiveInfo( addSubjectiveInfo(
{SOAPViewModel model, {required SOAPViewModel model,
List<MySelectedAllergy> myAllergiesList, required List<MySelectedAllergy> myAllergiesList,
List<MySelectedHistory> myHistoryList}) async { required List<MySelectedHistory> myHistoryList}) async {
if (FocusScope.of(context).hasFocus) FocusScope.of(context).unfocus(); if (FocusScope.of(context).hasFocus) FocusScope.of(context).unfocus();
widget.changeLoadingState(true); widget.changeLoadingState(true);
formKey.currentState.save(); formKey.currentState!.save();
formKey.currentState.validate(); formKey.currentState!.validate();
model.complaintsControllerError = ''; model.complaintsControllerError = '';
model.medicationControllerError = ''; model.medicationControllerError = '';
@ -315,8 +315,8 @@ if (widget.patientInfo.admissionNo == null) ExpandableSOAPWidge
} }
@override @override
Function nextFunction(model) { VoidCallback? nextFunction(model) {
addSubjectiveInfo( addSubjectiveInfo(
model: model, model: model,
myAllergiesList: myAllergiesList, myAllergiesList: myAllergiesList,
myHistoryList: myHistoryList); myHistoryList: myHistoryList);

@ -204,7 +204,7 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex> with TickerProviderSt
Expanded( Expanded(
child: AppButton( child: AppButton(
title: patient.admissionNo != null && title: patient.admissionNo != null &&
patient.admissionNo.isNotEmpty && !model.isAddExamInProgress?TranslationBase.of(context).finish: TranslationBase.of(context).next, patient.admissionNo!.isNotEmpty && !model.isAddExamInProgress?TranslationBase.of(context).finish: TranslationBase.of(context).next,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Colors.red[700], color: Colors.red[700],
height: SizeConfig.heightMultiplier * height: SizeConfig.heightMultiplier *
@ -307,6 +307,11 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex> with TickerProviderSt
); );
} }
break; break;
default: {
return Container(height: 0,);
}
break;
} }
} }
} }

@ -10,7 +10,7 @@ class CustomEditableText extends StatefulWidget {
required this.controller, required this.controller,
this.hint, this.hint,
this.isEditable = false, this.isEditable = false,
this.isSubmitted, required this.isSubmitted,
}) : super(key: key); }) : super(key: key);
final TextEditingController controller; final TextEditingController controller;

@ -44,10 +44,7 @@ class RegisterConfirmationPatientPage extends StatefulWidget {
final PatientRegistrationViewModel model; final PatientRegistrationViewModel model;
const RegisterConfirmationPatientPage( const RegisterConfirmationPatientPage(
{Key? key, {Key? key, this.operationReportViewModel, this.patient, required this.model})
this.operationReportViewModel,
this.patient,
required this.model})
: super(key: key); : super(key: key);
@override @override
@ -58,7 +55,7 @@ class RegisterConfirmationPatientPage extends StatefulWidget {
class _RegisterConfirmationPatientPageState class _RegisterConfirmationPatientPageState
extends State<RegisterConfirmationPatientPage> { extends State<RegisterConfirmationPatientPage> {
bool isSubmitted = false; bool isSubmitted = false;
ProjectViewModel? projectViewModel; late ProjectViewModel? projectViewModel;
late TextEditingController firstNameN; late TextEditingController firstNameN;
late TextEditingController middleNameN; late TextEditingController middleNameN;
late TextEditingController lastNameN; late TextEditingController lastNameN;
@ -66,7 +63,7 @@ class _RegisterConfirmationPatientPageState
late TextEditingController middleNameAr; late TextEditingController middleNameAr;
late TextEditingController lastNameAr; late TextEditingController lastNameAr;
late TextEditingController emailAddressController; late TextEditingController emailAddressController;
TextEditingController langController = TextEditingController(text: "English"); late TextEditingController langController = TextEditingController(text: "English");
int selectedLang = 1; int selectedLang = 1;
@override @override

@ -39,7 +39,7 @@ class RegisterSearchPatientPage extends StatefulWidget {
} }
class _RegisterSearchPatientPageState extends State<RegisterSearchPatientPage> { class _RegisterSearchPatientPageState extends State<RegisterSearchPatientPage> {
late String countryError; var countryError;
dynamic _selectedCountry; dynamic _selectedCountry;
late List<dynamic> countryList; late List<dynamic> countryList;
@ -203,7 +203,7 @@ class _RegisterSearchPatientPageState extends State<RegisterSearchPatientPage> {
title: AppText("Hijri"), title: AppText("Hijri"),
value: CalenderType.Hijri, value: CalenderType.Hijri,
groupValue: calenderType, groupValue: calenderType,
onChanged: (CalenderType? value) { onChanged: (CalenderType ? value) {
setState(() { setState(() {
calenderType = value!; calenderType = value!;
}); });

Loading…
Cancel
Save