|
|
|
@ -31,11 +31,7 @@ class UpdateObjectivePage extends StatefulWidget {
|
|
|
|
final PatiantInformtion patientInfo;
|
|
|
|
final PatiantInformtion patientInfo;
|
|
|
|
|
|
|
|
|
|
|
|
UpdateObjectivePage(
|
|
|
|
UpdateObjectivePage(
|
|
|
|
{Key key,
|
|
|
|
{Key key, this.changePageViewIndex, this.patientInfo, this.changeLoadingState, this.currentIndex});
|
|
|
|
this.changePageViewIndex,
|
|
|
|
|
|
|
|
this.patientInfo,
|
|
|
|
|
|
|
|
this.changeLoadingState,
|
|
|
|
|
|
|
|
this.currentIndex});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
_UpdateObjectivePageState createState() => _UpdateObjectivePageState();
|
|
|
|
_UpdateObjectivePageState createState() => _UpdateObjectivePageState();
|
|
|
|
@ -45,8 +41,7 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
|
|
|
|
bool isSysExaminationExpand = false;
|
|
|
|
bool isSysExaminationExpand = false;
|
|
|
|
List<MySelectedExamination> mySelectedExamination = List();
|
|
|
|
List<MySelectedExamination> mySelectedExamination = List();
|
|
|
|
|
|
|
|
|
|
|
|
BoxDecoration containerBorderDecoration(
|
|
|
|
BoxDecoration containerBorderDecoration(Color containerColor, Color borderColor) {
|
|
|
|
Color containerColor, Color borderColor) {
|
|
|
|
|
|
|
|
return BoxDecoration(
|
|
|
|
return BoxDecoration(
|
|
|
|
color: containerColor,
|
|
|
|
color: containerColor,
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
@ -63,12 +58,10 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
|
|
|
|
return BaseView<SOAPViewModel>(
|
|
|
|
return BaseView<SOAPViewModel>(
|
|
|
|
onModelReady: (model) async {
|
|
|
|
onModelReady: (model) async {
|
|
|
|
mySelectedExamination.clear();
|
|
|
|
mySelectedExamination.clear();
|
|
|
|
GetPhysicalExamReqModel getPhysicalExamReqModel =
|
|
|
|
GetPhysicalExamReqModel getPhysicalExamReqModel = GetPhysicalExamReqModel(
|
|
|
|
GetPhysicalExamReqModel(
|
|
|
|
|
|
|
|
patientMRN: widget.patientInfo.patientMRN,
|
|
|
|
patientMRN: widget.patientInfo.patientMRN,
|
|
|
|
episodeID: widget.patientInfo.episodeNo.toString(),
|
|
|
|
episodeID: widget.patientInfo.episodeNo.toString(),
|
|
|
|
appointmentNo:
|
|
|
|
appointmentNo: int.parse(widget.patientInfo.appointmentNo.toString()));
|
|
|
|
int.parse(widget.patientInfo.appointmentNo.toString()));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await model.getPatientPhysicalExam(getPhysicalExamReqModel);
|
|
|
|
await model.getPatientPhysicalExam(getPhysicalExamReqModel);
|
|
|
|
if (model.patientPhysicalExamList.isNotEmpty) {
|
|
|
|
if (model.patientPhysicalExamList.isNotEmpty) {
|
|
|
|
@ -108,12 +101,9 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
SOAPStepHeader(
|
|
|
|
SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex: widget.changePageViewIndex),
|
|
|
|
currentIndex: widget.currentIndex,
|
|
|
|
|
|
|
|
changePageViewIndex: widget.changePageViewIndex),
|
|
|
|
|
|
|
|
ExpandableSOAPWidget(
|
|
|
|
ExpandableSOAPWidget(
|
|
|
|
headerTitle:
|
|
|
|
headerTitle: TranslationBase.of(context).physicalSystemExamination,
|
|
|
|
TranslationBase.of(context).physicalSystemExamination,
|
|
|
|
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
setState(() {
|
|
|
|
setState(() {
|
|
|
|
isSysExaminationExpand = !isSysExaminationExpand;
|
|
|
|
isSysExaminationExpand = !isSysExaminationExpand;
|
|
|
|
@ -122,8 +112,7 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
SOAPOpenItems(
|
|
|
|
SOAPOpenItems(
|
|
|
|
label:
|
|
|
|
label: "${TranslationBase.of(context).addExamination}",
|
|
|
|
"${TranslationBase.of(context).addExamination}",
|
|
|
|
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
openExaminationList(context);
|
|
|
|
openExaminationList(context);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -131,8 +120,7 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
|
|
|
|
Column(
|
|
|
|
Column(
|
|
|
|
children: mySelectedExamination.map((examination) {
|
|
|
|
children: mySelectedExamination.map((examination) {
|
|
|
|
return ExaminationItemCard(examination, () {
|
|
|
|
return ExaminationItemCard(examination, () {
|
|
|
|
removeExamination(
|
|
|
|
removeExamination(examination.selectedExamination);
|
|
|
|
examination.selectedExamination);
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}).toList(),
|
|
|
|
}).toList(),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
@ -214,16 +202,12 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
|
|
|
|
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
|
|
|
|
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
|
|
|
|
|
|
|
|
|
|
|
|
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
|
|
|
|
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
|
|
|
|
PostPhysicalExamRequestModel postPhysicalExamRequestModel =
|
|
|
|
PostPhysicalExamRequestModel postPhysicalExamRequestModel = new PostPhysicalExamRequestModel();
|
|
|
|
new PostPhysicalExamRequestModel();
|
|
|
|
|
|
|
|
mySelectedExamination.forEach((exam) {
|
|
|
|
mySelectedExamination.forEach((exam) {
|
|
|
|
if (postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM ==
|
|
|
|
if (postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM == null)
|
|
|
|
null)
|
|
|
|
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM = [];
|
|
|
|
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM =
|
|
|
|
|
|
|
|
[];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM
|
|
|
|
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM.add(ListHisProgNotePhysicalExaminationVM(
|
|
|
|
.add(ListHisProgNotePhysicalExaminationVM(
|
|
|
|
|
|
|
|
patientMRN: widget.patientInfo.patientMRN,
|
|
|
|
patientMRN: widget.patientInfo.patientMRN,
|
|
|
|
episodeId: widget.patientInfo.episodeNo,
|
|
|
|
episodeId: widget.patientInfo.episodeNo,
|
|
|
|
appointmentNo: widget.patientInfo.appointmentNo,
|
|
|
|
appointmentNo: widget.patientInfo.appointmentNo,
|
|
|
|
@ -269,10 +253,8 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
removeExamination(MasterKeyModel masterKey) {
|
|
|
|
removeExamination(MasterKeyModel masterKey) {
|
|
|
|
Iterable<MySelectedExamination> history = mySelectedExamination.where(
|
|
|
|
Iterable<MySelectedExamination> history = mySelectedExamination.where((element) =>
|
|
|
|
(element) =>
|
|
|
|
masterKey.id == element.selectedExamination.id && masterKey.typeId == element.selectedExamination.typeId);
|
|
|
|
masterKey.id == element.selectedExamination.id &&
|
|
|
|
|
|
|
|
masterKey.typeId == element.selectedExamination.typeId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (history.length > 0)
|
|
|
|
if (history.length > 0)
|
|
|
|
setState(() {
|
|
|
|
setState(() {
|
|
|
|
@ -302,11 +284,7 @@ class AddExaminationDailog extends StatefulWidget {
|
|
|
|
final Function addSelectedExamination;
|
|
|
|
final Function addSelectedExamination;
|
|
|
|
final Function(MasterKeyModel) removeExamination;
|
|
|
|
final Function(MasterKeyModel) removeExamination;
|
|
|
|
|
|
|
|
|
|
|
|
const AddExaminationDailog(
|
|
|
|
const AddExaminationDailog({Key key, this.mySelectedExamination, this.addSelectedExamination, this.removeExamination})
|
|
|
|
{Key key,
|
|
|
|
|
|
|
|
this.mySelectedExamination,
|
|
|
|
|
|
|
|
this.addSelectedExamination,
|
|
|
|
|
|
|
|
this.removeExamination})
|
|
|
|
|
|
|
|
: super(key: key);
|
|
|
|
: super(key: key);
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
@ -321,8 +299,7 @@ class _AddExaminationDailogState extends State<AddExaminationDailog> {
|
|
|
|
child: BaseView<SOAPViewModel>(
|
|
|
|
child: BaseView<SOAPViewModel>(
|
|
|
|
onModelReady: (model) async {
|
|
|
|
onModelReady: (model) async {
|
|
|
|
if (model.physicalExaminationList.length == 0) {
|
|
|
|
if (model.physicalExaminationList.length == 0) {
|
|
|
|
await model
|
|
|
|
await model.getMasterLookup(MasterKeysService.PhysicalExamination);
|
|
|
|
.getMasterLookup(MasterKeysService.PhysicalExamination);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
builder: (_, model, w) => AppScaffold(
|
|
|
|
builder: (_, model, w) => AppScaffold(
|
|
|
|
@ -332,9 +309,7 @@ class _AddExaminationDailogState extends State<AddExaminationDailog> {
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
child: FractionallySizedBox(
|
|
|
|
child: FractionallySizedBox(
|
|
|
|
widthFactor: 0.9,
|
|
|
|
widthFactor: 0.9,
|
|
|
|
child: Column(
|
|
|
|
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
height: 16,
|
|
|
|
height: 16,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|