first step from fixing Soap

merge-requests/752/head
Elham Rababah 5 years ago
parent 550d54c034
commit 9a2ce62216

@ -72,7 +72,7 @@ class ProcedureService extends BaseService {
templateList.clear();
response['DAPP_TemplateGetList'].forEach((template) {
ProcedureTempleteDetailsModel templateElement = ProcedureTempleteDetailsModel.fromJson(template);
if (categoryID != null) {
if (categoryID != null ) {
if (categoryID == templateElement.categoryID) {
templateList.add(templateElement);
}
@ -80,9 +80,6 @@ class ProcedureService extends BaseService {
templateList.add(templateElement);
}
});
// response['HIS_ProcedureTemplateList'].forEach((template) {
// _templateList.add(ProcedureTempleteModel.fromJson(template));
// });
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;

@ -48,7 +48,7 @@ class PatientMedicalReportViewModel extends BaseViewModel {
}
Future insertMedicalReport(PatiantInformtion patient, String htmlText) async {
setState(ViewState.Busy);
setState(ViewState.BusyLocal);
await _service.insertMedicalReport(patient, htmlText);
if (_service.hasError) {
error = _service.error!;

@ -3,14 +3,14 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
class SOAPOpenItems extends StatelessWidget {
final Function onTap;
final VoidCallback onTap;
final String label;
const SOAPOpenItems({Key? key, required this.onTap, required this.label}) : super(key: key);
@override
Widget build(BuildContext context) {
return InkWell(
onTap: onTap(),
onTap: onTap,
child: Container(
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 8.0),
margin: EdgeInsets.symmetric(vertical: 8),

@ -8,7 +8,7 @@ import 'package:hexcolor/hexcolor.dart';
class ExpandableSOAPWidget extends StatelessWidget {
final bool isExpanded;
final Widget child;
final Function onTap;
final VoidCallback onTap;
final headerTitle;
final bool isRequired;
@ -16,7 +16,7 @@ class ExpandableSOAPWidget extends StatelessWidget {
{Key? key,
required this.isExpanded,
required this.child,
required this.onTap,
required this.onTap,
this.headerTitle,
this.isRequired = true})
: super(key: key);
@ -34,12 +34,12 @@ class ExpandableSOAPWidget extends StatelessWidget {
),
child: HeaderBodyExpandableNotifier(
headerWidget: InkWell(
onTap: onTap(),
onTap: onTap,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
InkWell(
onTap: onTap(),
onTap: onTap,
child: Row(
children: [
AppText(headerTitle, variant: isExpanded ? "bodyText" : '', fontSize: 15, color: Colors.black),
@ -52,7 +52,7 @@ class ExpandableSOAPWidget extends StatelessWidget {
),
),
InkWell(
onTap: onTap(),
onTap: onTap,
child: Icon(isExpanded ? EvaIcons.arrowIosUpwardOutline : EvaIcons.arrowIosDownwardOutline),
)
],

@ -41,7 +41,7 @@ class _AddMedicationState extends State<AddMedication> {
TextEditingController strengthController = TextEditingController();
TextEditingController routeController = TextEditingController();
TextEditingController frequencyController = TextEditingController();
late GetMedicationResponseModel _selectedMedication;
GetMedicationResponseModel? _selectedMedication;
GlobalKey key = new GlobalKey<AutoCompleteTextFieldState<GetMedicationResponseModel>>();
bool isFormSubmitted = false;
@ -127,8 +127,8 @@ class _AddMedicationState extends State<AddMedication> {
)
: AppTextFieldCustom(
hintText: _selectedMedication != null
? _selectedMedication.description! +
(' (${_selectedMedication.genericName} )')
? _selectedMedication!.description! +
(' (${_selectedMedication!.genericName} )')
: TranslationBase.of(context).searchMedicineNameHere,
minLines: 2,
maxLines: 2,
@ -346,7 +346,7 @@ class _AddMedicationState extends State<AddMedication> {
_selectedMedicationRoute != null &&
_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();
}
},

@ -58,10 +58,10 @@ extension procedureType on ProcedureType {
}
}
String getCategoryId() {
String ? getCategoryId() {
switch (this) {
case ProcedureType.PROCEDURE:
return '';
return null;
case ProcedureType.LAB_RESULT:
return "02";
case ProcedureType.RADIOLOGY:
@ -69,7 +69,7 @@ extension procedureType on ProcedureType {
case ProcedureType.PRESCRIPTION:
return "55";
default:
return '';
return null;
}
}

@ -47,7 +47,7 @@ class MasterKeyCheckboxSearchAllergiesWidget extends StatefulWidget {
class _MasterKeyCheckboxSearchAllergiesWidgetState extends State<MasterKeyCheckboxSearchAllergiesWidget> {
List<MasterKeyModel> items = [];
late MasterKeyModel _selectedAllergySeverity;
MasterKeyModel? _selectedAllergySeverity;
bool isSubmitted = false;
@override

Loading…
Cancel
Save