7 step from fix screen

merge-requests/898/head
Elham Rababh 4 years ago
parent 359b337b27
commit bd64603e82

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

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

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

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

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

@ -204,7 +204,7 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex> with TickerProviderSt
Expanded(
child: AppButton(
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,
color: Colors.red[700],
height: SizeConfig.heightMultiplier *
@ -307,6 +307,11 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex> with TickerProviderSt
);
}
break;
default: {
return Container(height: 0,);
}
break;
}
}
}

Loading…
Cancel
Save