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