fix DA-149

merge-requests/298/head
Elham Rababah 4 years ago
parent 98609b464b
commit a5a7425a09

@ -592,6 +592,7 @@ const Map<String, Map<String, String>> localizedValues = {
'allergicTO': {'en': "ALLERGIC TO ", 'ar': " حساس من"}, 'allergicTO': {'en': "ALLERGIC TO ", 'ar': " حساس من"},
'normal': {'en': "Normal", 'ar': "عادي"}, 'normal': {'en': "Normal", 'ar': "عادي"},
'abnormal': {'en': "Abnormal", 'ar': " غير عادي"}, 'abnormal': {'en': "Abnormal", 'ar': " غير عادي"},
'notExamined': {'en': "Not Examined", 'ar': "لم يتم الفحص"},
"systolic-lng": {"en": "Systolic", "ar": "الإنقباض"}, "systolic-lng": {"en": "Systolic", "ar": "الإنقباض"},
"diastolic-lng": {"en": "Diastolic", "ar": "الإنبساط"}, "diastolic-lng": {"en": "Diastolic", "ar": "الإنبساط"},
"mass": {"en": "Mass", "ar": "كتلة"}, "mass": {"en": "Mass", "ar": "كتلة"},

@ -1,13 +1,19 @@
class GetPhysicalExamResModel { class GetPhysicalExamResModel {
int appointmentNo; int appointmentNo;
int createdBy; int createdBy;
String createdByName;
String createdOn; String createdOn;
int editedBy; Null editedBy;
String editedByName;
String editedOn; String editedOn;
int episodeId; int episodeId;
int examId; int examId;
String examName;
int examType; int examType;
int examinationType;
String examinationTypeName;
bool isAbnormal; bool isAbnormal;
bool isNew;
bool isNormal; bool isNormal;
bool notExamined; bool notExamined;
int patientMRN; int patientMRN;
@ -16,13 +22,19 @@ class GetPhysicalExamResModel {
GetPhysicalExamResModel( GetPhysicalExamResModel(
{this.appointmentNo, {this.appointmentNo,
this.createdBy, this.createdBy,
this.createdByName,
this.createdOn, this.createdOn,
this.editedBy, this.editedBy,
this.editedByName,
this.editedOn, this.editedOn,
this.episodeId, this.episodeId,
this.examId, this.examId,
this.examName,
this.examType, this.examType,
this.examinationType,
this.examinationTypeName,
this.isAbnormal, this.isAbnormal,
this.isNew,
this.isNormal, this.isNormal,
this.notExamined, this.notExamined,
this.patientMRN, this.patientMRN,
@ -31,13 +43,19 @@ class GetPhysicalExamResModel {
GetPhysicalExamResModel.fromJson(Map<String, dynamic> json) { GetPhysicalExamResModel.fromJson(Map<String, dynamic> json) {
appointmentNo = json['appointmentNo']; appointmentNo = json['appointmentNo'];
createdBy = json['createdBy']; createdBy = json['createdBy'];
createdByName = json['createdByName'];
createdOn = json['createdOn']; createdOn = json['createdOn'];
editedBy = json['editedBy']; editedBy = json['editedBy'];
editedByName = json['editedByName'];
editedOn = json['editedOn']; editedOn = json['editedOn'];
episodeId = json['episodeId']; episodeId = json['episodeId'];
examId = json['examId']; examId = json['examId'];
examName = json['examName'];
examType = json['examType']; examType = json['examType'];
examinationType = json['examinationType'];
examinationTypeName = json['examinationTypeName'];
isAbnormal = json['isAbnormal']; isAbnormal = json['isAbnormal'];
isNew = json['isNew'];
isNormal = json['isNormal']; isNormal = json['isNormal'];
notExamined = json['notExamined']; notExamined = json['notExamined'];
patientMRN = json['patientMRN']; patientMRN = json['patientMRN'];
@ -48,13 +66,19 @@ class GetPhysicalExamResModel {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
data['appointmentNo'] = this.appointmentNo; data['appointmentNo'] = this.appointmentNo;
data['createdBy'] = this.createdBy; data['createdBy'] = this.createdBy;
data['createdByName'] = this.createdByName;
data['createdOn'] = this.createdOn; data['createdOn'] = this.createdOn;
data['editedBy'] = this.editedBy; data['editedBy'] = this.editedBy;
data['editedByName'] = this.editedByName;
data['editedOn'] = this.editedOn; data['editedOn'] = this.editedOn;
data['episodeId'] = this.episodeId; data['episodeId'] = this.episodeId;
data['examId'] = this.examId; data['examId'] = this.examId;
data['examName'] = this.examName;
data['examType'] = this.examType; data['examType'] = this.examType;
data['examinationType'] = this.examinationType;
data['examinationTypeName'] = this.examinationTypeName;
data['isAbnormal'] = this.isAbnormal; data['isAbnormal'] = this.isAbnormal;
data['isNew'] = this.isNew;
data['isNormal'] = this.isNormal; data['isNormal'] = this.isNormal;
data['notExamined'] = this.notExamined; data['notExamined'] = this.notExamined;
data['patientMRN'] = this.patientMRN; data['patientMRN'] = this.patientMRN;

@ -5,6 +5,8 @@ class MySelectedExamination {
String remark; String remark;
bool isNormal; bool isNormal;
bool isAbnormal; bool isAbnormal;
bool notExamined;
bool isNew;
int createdBy; int createdBy;
MySelectedExamination( MySelectedExamination(
@ -12,6 +14,8 @@ class MySelectedExamination {
this.remark, this.remark,
this.isNormal = true, this.isNormal = true,
this.isAbnormal = false, this.isAbnormal = false,
this.notExamined = false,
this.isNew = true,
this.createdBy}); this.createdBy});
MySelectedExamination.fromJson(Map<String, dynamic> json) { MySelectedExamination.fromJson(Map<String, dynamic> json) {
@ -19,8 +23,10 @@ class MySelectedExamination {
? new MasterKeyModel.fromJson(json['selectedExamination']) ? new MasterKeyModel.fromJson(json['selectedExamination'])
: null; : null;
remark = json['remark']; remark = json['remark'];
remark = json['isNormal']; isNormal = json['isNormal'];
remark = json['isAbnormal']; isAbnormal = json['isAbnormal'];
notExamined = json['notExamined'];
isNew = json['isNew'];
createdBy = json['createdBy']; createdBy = json['createdBy'];
} }
@ -33,6 +39,8 @@ class MySelectedExamination {
data['remark'] = this.remark; data['remark'] = this.remark;
data['isNormal'] = this.isNormal; data['isNormal'] = this.isNormal;
data['isAbnormal'] = this.isAbnormal; data['isAbnormal'] = this.isAbnormal;
data['notExamined'] = this.notExamined;
data['isNew'] = this.isNew;
data['createdBy'] = this.createdBy; data['createdBy'] = this.createdBy;
return data; return data;
} }

@ -33,13 +33,18 @@ class ListHisProgNotePhysicalExaminationVM {
int patientMRN; int patientMRN;
bool isNormal; bool isNormal;
bool isAbnormal; bool isAbnormal;
bool notExamined;
String examName;
String examinationTypeName;
int examinationType;
String remarks; String remarks;
bool isNew;
int createdBy; int createdBy;
String createdOn; String createdOn;
String createdByName;
int editedBy; int editedBy;
String editedOn; String editedOn;
bool notExamined; String editedByName;
MasterKeyModel masterDescription;
ListHisProgNotePhysicalExaminationVM( ListHisProgNotePhysicalExaminationVM(
{this.episodeId, {this.episodeId,
@ -49,13 +54,18 @@ class ListHisProgNotePhysicalExaminationVM {
this.patientMRN, this.patientMRN,
this.isNormal, this.isNormal,
this.isAbnormal, this.isAbnormal,
this.notExamined,
this.examName,
this.examinationTypeName,
this.examinationType,
this.remarks, this.remarks,
this.isNew,
this.createdBy, this.createdBy,
this.createdOn, this.createdOn,
this.createdByName,
this.editedBy, this.editedBy,
this.editedOn, this.editedOn,
this.notExamined, this.editedByName});
this.masterDescription});
ListHisProgNotePhysicalExaminationVM.fromJson(Map<String, dynamic> json) { ListHisProgNotePhysicalExaminationVM.fromJson(Map<String, dynamic> json) {
episodeId = json['episodeId']; episodeId = json['episodeId'];
@ -65,15 +75,18 @@ class ListHisProgNotePhysicalExaminationVM {
patientMRN = json['patientMRN']; patientMRN = json['patientMRN'];
isNormal = json['isNormal']; isNormal = json['isNormal'];
isAbnormal = json['isAbnormal']; isAbnormal = json['isAbnormal'];
notExamined = json['notExamined'];
examName = json['examName'];
examinationTypeName = json['examinationTypeName'];
examinationType = json['examinationType'];
remarks = json['remarks']; remarks = json['remarks'];
isNew = json['isNew'];
createdBy = json['createdBy']; createdBy = json['createdBy'];
createdOn = json['createdOn']; createdOn = json['createdOn'];
createdByName = json['createdByName'];
editedBy = json['editedBy']; editedBy = json['editedBy'];
editedOn = json['editedOn']; editedOn = json['editedOn'];
notExamined = json['notExamined']; editedByName = json['editedByName'];
masterDescription = json['masterDescription'] != null
? new MasterKeyModel.fromJson(json['masterDescription'])
: null;
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -85,15 +98,18 @@ class ListHisProgNotePhysicalExaminationVM {
data['patientMRN'] = this.patientMRN; data['patientMRN'] = this.patientMRN;
data['isNormal'] = this.isNormal; data['isNormal'] = this.isNormal;
data['isAbnormal'] = this.isAbnormal; data['isAbnormal'] = this.isAbnormal;
data['notExamined'] = this.notExamined;
data['examName'] = this.examName;
data['examinationTypeName'] = this.examinationTypeName;
data['examinationType'] = this.examinationType;
data['remarks'] = this.remarks; data['remarks'] = this.remarks;
data['isNew'] = this.isNew;
data['createdBy'] = this.createdBy; data['createdBy'] = this.createdBy;
data['createdOn'] = this.createdOn; data['createdOn'] = this.createdOn;
data['createdByName'] = this.createdByName;
data['editedBy'] = this.editedBy; data['editedBy'] = this.editedBy;
data['editedOn'] = this.editedOn; data['editedOn'] = this.editedOn;
data['notExamined'] = this.notExamined; data['editedByName'] = this.editedByName;
if (this.masterDescription != null) {
data['masterDescription'] = this.masterDescription.toJson();
}
return data; return data;
} }
} }

@ -940,6 +940,7 @@ class TranslationBase {
String get allergicTO => localizedValues['allergicTO'][locale.languageCode]; String get allergicTO => localizedValues['allergicTO'][locale.languageCode];
String get normal => localizedValues['normal'][locale.languageCode]; String get normal => localizedValues['normal'][locale.languageCode];
String get notExamined => localizedValues['notExamined'][locale.languageCode];
String get abnormal => localizedValues['abnormal'][locale.languageCode]; String get abnormal => localizedValues['abnormal'][locale.languageCode];

@ -85,6 +85,8 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
remark: element.remarks, remark: element.remarks,
isNormal: element.isNormal, isNormal: element.isNormal,
createdBy: element.createdBy, createdBy: element.createdBy,
notExamined: element.notExamined,
isNew: element.isNew,
isAbnormal: element.isAbnormal); isAbnormal: element.isAbnormal);
widget.mySelectedExamination.add(tempEam); widget.mySelectedExamination.add(tempEam);
}); });
@ -243,9 +245,10 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
onTap: () { onTap: () {
setState(() { setState(() {
examination.isAbnormal = examination.isAbnormal =
!examination.isAbnormal; false;
examination.isNormal = examination.isNormal =
!examination.isNormal; true;
examination.notExamined = false;
}); });
}), }),
SizedBox( SizedBox(
@ -290,12 +293,63 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
), ),
)), )),
), ),
onTap: () {
setState(() {
examination.isNormal =
false;
examination.isAbnormal =
true;
examination.notExamined = false;
});
}),SizedBox(
width: 12,
),
InkWell(
child: Center(
child: Container(
height:
screenSize.height *
0.070,
decoration:
containerBorderDecoration(
examination
.notExamined
? Color(
0xFF515A5D)
: Colors
.white,
Colors.black),
child: Center(
child: Padding(
padding:
const EdgeInsets
.all(8.0),
child: Text(
"Not Examined",
style: TextStyle(
fontSize: 12,
color:
examination
.notExamined
? Colors.white
: Colors
.black,
//Colors.black,
fontWeight:
FontWeight
.bold,
),
),
),
)),
),
onTap: () { onTap: () {
setState(() { setState(() {
examination.isAbnormal = examination.isAbnormal =
!examination.isAbnormal; false;
examination.isNormal = examination.isNormal =
!examination.isNormal; false;
examination.notExamined = true;
}); });
}), }),
], ],
@ -394,13 +448,17 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
examType: exam.selectedExamination.typeId, examType: exam.selectedExamination.typeId,
isAbnormal: exam.isAbnormal, isAbnormal: exam.isAbnormal,
isNormal: exam.isNormal, isNormal: exam.isNormal,
masterDescription: exam.selectedExamination, // masterDescription: exam.selectedExamination,
notExamined: false 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) { if(model.patientPhysicalExamList.isEmpty) {
await model.postPhysicalExam(postPhysicalExamRequestModel); await model.postPhysicalExam(postPhysicalExamRequestModel);
} else { } else {
await model.patchPhysicalExam(postPhysicalExamRequestModel); await model.patchPhysicalExam(postPhysicalExamRequestModel);

Loading…
Cancel
Save