|
|
|
|
@ -19,20 +19,19 @@ class AddChiefComplaint extends StatefulWidget {
|
|
|
|
|
final String? thirdField;
|
|
|
|
|
final PatiantInformtion patientInfo;
|
|
|
|
|
|
|
|
|
|
const AddChiefComplaint({super.key,
|
|
|
|
|
const AddChiefComplaint(
|
|
|
|
|
{super.key,
|
|
|
|
|
required this.complaints,
|
|
|
|
|
required this.selectedType,
|
|
|
|
|
this.firstField,
|
|
|
|
|
this.secondField,
|
|
|
|
|
this.thirdField,
|
|
|
|
|
required this.patientInfo
|
|
|
|
|
});
|
|
|
|
|
required this.patientInfo});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
State<AddChiefComplaint> createState() => _AddChiefComplaintState();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class _AddChiefComplaintState extends State<AddChiefComplaint> {
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
@ -42,10 +41,8 @@ class _AddChiefComplaintState extends State<AddChiefComplaint> {
|
|
|
|
|
},
|
|
|
|
|
builder: (_, model, w) => AppScaffold(
|
|
|
|
|
isShowAppBar: true,
|
|
|
|
|
|
|
|
|
|
appBar: PatientSearchHeader(
|
|
|
|
|
title: TranslationBase.of(context).addChiefComplaint
|
|
|
|
|
),
|
|
|
|
|
title: TranslationBase.of(context).addChiefComplaint),
|
|
|
|
|
body: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(20.0),
|
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
|
@ -70,7 +67,9 @@ class _AddChiefComplaintState extends State<AddChiefComplaint> {
|
|
|
|
|
updateChiefComplaint(model, chiefComplaint, context);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 16,),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 16,
|
|
|
|
|
),
|
|
|
|
|
PreviousChiefComplaints(
|
|
|
|
|
model.episodeByChiefComplaintListVidaPlus,
|
|
|
|
|
(chiefComplains, String) {
|
|
|
|
|
@ -85,34 +84,39 @@ class _AddChiefComplaintState extends State<AddChiefComplaint> {
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
addChiefComplaint(SOAPViewModel model, String CC, BuildContext context) async{
|
|
|
|
|
|
|
|
|
|
addChiefComplaint(
|
|
|
|
|
SOAPViewModel model, String CC, BuildContext context) async {
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
await model.saveChiefComplaint(widget.patientInfo, CC);
|
|
|
|
|
await model.getChiefComplaint(widget.patientInfo);
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
searchChiefComplaint(SOAPViewModel model, String CC) async {
|
|
|
|
|
await model.searchChiefComplaint(widget.patientInfo, CC);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
updateChiefComplaint(SOAPViewModel model, GetChiefComplaintVidaPlus cc, BuildContext context) async{
|
|
|
|
|
|
|
|
|
|
updateChiefComplaint(SOAPViewModel model, GetChiefComplaintVidaPlus cc,
|
|
|
|
|
BuildContext context) async {
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
await model.updateChiefComplaint(widget.patientInfo, cc);
|
|
|
|
|
await model.getChiefComplaint(widget.patientInfo);
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
setState(() {
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
setState(() {});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
episodeByChiefComplaint(SOAPViewModel model) async {
|
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
|
|
|
|
await model.episodeByChiefComplaint(widget.patientInfo);});
|
|
|
|
|
|
|
|
|
|
await model.episodeByChiefComplaint(widget.patientInfo);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
createCCByEpisode(model, List<PatientPomrs> chiefComplaint) async {
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
var result =
|
|
|
|
|
await model.createCCByEpisode(widget.patientInfo, chiefComplaint);
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
if (result) Navigator.of(context).pop();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|