working on vitalSigns feature
commit
aafcd89222
@ -0,0 +1,42 @@
|
|||||||
|
enum MasterKeysService {
|
||||||
|
Allergies,
|
||||||
|
HistoryFamily,
|
||||||
|
HistoryMedical,
|
||||||
|
HistorySocial,
|
||||||
|
HistorySports,
|
||||||
|
HistorySurgical,
|
||||||
|
PhysicalExamination,
|
||||||
|
AllergySeverity
|
||||||
|
}
|
||||||
|
|
||||||
|
extension SelectedMasterKeysService on MasterKeysService {
|
||||||
|
// ignore: missing_return
|
||||||
|
int getMasterKeyService() {
|
||||||
|
switch (this) {
|
||||||
|
case MasterKeysService.Allergies:
|
||||||
|
return 11;
|
||||||
|
break;
|
||||||
|
case MasterKeysService.HistoryFamily:
|
||||||
|
return 36;
|
||||||
|
break;
|
||||||
|
case MasterKeysService.HistoryMedical:
|
||||||
|
return 37;
|
||||||
|
break;
|
||||||
|
case MasterKeysService.HistorySocial:
|
||||||
|
return 38;
|
||||||
|
break;
|
||||||
|
case MasterKeysService.HistorySports:
|
||||||
|
return 39;
|
||||||
|
break;
|
||||||
|
case MasterKeysService.HistorySurgical:
|
||||||
|
return 66;
|
||||||
|
break;
|
||||||
|
case MasterKeysService.PhysicalExamination:
|
||||||
|
return 59;
|
||||||
|
break;
|
||||||
|
case MasterKeysService.AllergySeverity:
|
||||||
|
return 55;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/get_Allergies_request_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/post_allergy_request_model.dart';
|
||||||
|
|
||||||
|
import 'base/lookup-service.dart';
|
||||||
|
|
||||||
|
class SOAPService extends LookupService {
|
||||||
|
|
||||||
|
Future getAllergies(GetAllergiesRequestModel getAllergiesRequestModel) async {
|
||||||
|
await baseAppClient.post(
|
||||||
|
GET_ALLERGIES,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
listOfAllergies.clear();
|
||||||
|
response['List_Allergies']['entityList'].forEach((v) {
|
||||||
|
listOfAllergies.add(MasterKeyModel.fromJson(v));
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
},
|
||||||
|
body: getAllergiesRequestModel.toJson(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future postAllergy(PostAllergyRequestModel postAllergyRequestModel) async {
|
||||||
|
|
||||||
|
await baseAppClient.post(POST_ALLERGY,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
print("Success");
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
}, body: postAllergyRequestModel.toJson());
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,98 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
||||||
|
|
||||||
|
import 'base_service.dart';
|
||||||
|
|
||||||
|
class LookupService extends BaseService {
|
||||||
|
|
||||||
|
List<MasterKeyModel> listOfAllergies = [];
|
||||||
|
|
||||||
|
List<MasterKeyModel> get allergySeverityList => _allergySeverityList;
|
||||||
|
List<MasterKeyModel> _allergySeverityList = [];
|
||||||
|
|
||||||
|
List<MasterKeyModel> get historyFamilyList => _historyFamilyList;
|
||||||
|
List<MasterKeyModel> _historyFamilyList = [];
|
||||||
|
|
||||||
|
List<MasterKeyModel> get historyMedicalList => _historyMedicalList;
|
||||||
|
List<MasterKeyModel> _historyMedicalList = [];
|
||||||
|
|
||||||
|
List<MasterKeyModel> get historySportList => _historySportList;
|
||||||
|
List<MasterKeyModel> _historySportList = [];
|
||||||
|
|
||||||
|
List<MasterKeyModel> get historySocialList => _historySocialList;
|
||||||
|
List<MasterKeyModel> _historySocialList = [];
|
||||||
|
|
||||||
|
List<MasterKeyModel> get historySurgicalList => _historySurgicalList;
|
||||||
|
List<MasterKeyModel> _historySurgicalList = [];
|
||||||
|
|
||||||
|
Future getMasterLookup(MasterKeysService masterKeys) async {
|
||||||
|
Map<String, dynamic> body = {
|
||||||
|
"MasterInput": masterKeys.getMasterKeyService()
|
||||||
|
};
|
||||||
|
await baseAppClient.post(GET_MASTER_LOOKUP_LIST,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
setMasterLookupInCorrectArray(
|
||||||
|
response['MasterLookUpList']['entityList'], masterKeys);
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
}, body: body);
|
||||||
|
}
|
||||||
|
|
||||||
|
setMasterLookupInCorrectArray(entryList, MasterKeysService masterKeys) {
|
||||||
|
switch (masterKeys) {
|
||||||
|
case MasterKeysService.Allergies:
|
||||||
|
listOfAllergies.clear();
|
||||||
|
entryList.forEach((v) {
|
||||||
|
listOfAllergies
|
||||||
|
.add(MasterKeyModel.fromJson(v));
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case MasterKeysService.HistoryFamily:
|
||||||
|
_historyFamilyList.clear();
|
||||||
|
entryList.forEach((v) {
|
||||||
|
_historyFamilyList
|
||||||
|
.add(MasterKeyModel.fromJson(v));
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case MasterKeysService.HistoryMedical:
|
||||||
|
_historyMedicalList.clear();
|
||||||
|
entryList.forEach((v) {
|
||||||
|
_historyMedicalList
|
||||||
|
.add(MasterKeyModel.fromJson(v));
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case MasterKeysService.HistorySocial:
|
||||||
|
historySocialList.clear();
|
||||||
|
entryList.forEach((v) {
|
||||||
|
historySocialList
|
||||||
|
.add(MasterKeyModel.fromJson(v));
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case MasterKeysService.HistorySports:
|
||||||
|
_historySportList.clear();
|
||||||
|
entryList.forEach((v) {
|
||||||
|
_historySportList
|
||||||
|
.add(MasterKeyModel.fromJson(v));
|
||||||
|
}); break;
|
||||||
|
case MasterKeysService.HistorySurgical:
|
||||||
|
_historySurgicalList.clear();
|
||||||
|
entryList.forEach((v) {
|
||||||
|
_historySurgicalList
|
||||||
|
.add(MasterKeyModel.fromJson(v));
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case MasterKeysService.PhysicalExamination:
|
||||||
|
return 59;
|
||||||
|
break;
|
||||||
|
case MasterKeysService.AllergySeverity:
|
||||||
|
_allergySeverityList.clear();
|
||||||
|
entryList.forEach((v) {
|
||||||
|
_allergySeverityList
|
||||||
|
.add(MasterKeyModel.fromJson(v));
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,64 @@
|
|||||||
|
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/SOAP_service.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/Allergy_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/get_Allergies_request_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/post_allergy_request_model.dart';
|
||||||
|
|
||||||
|
import '../../locator.dart';
|
||||||
|
import 'base_view_model.dart';
|
||||||
|
|
||||||
|
class SOAPViewModel extends BaseViewModel {
|
||||||
|
SOAPService _SOAPService = locator<SOAPService>();
|
||||||
|
|
||||||
|
List<MasterKeyModel> get listOfAllergies => _SOAPService.listOfAllergies;
|
||||||
|
|
||||||
|
List<MasterKeyModel> get allergySeverityList =>
|
||||||
|
_SOAPService.allergySeverityList;
|
||||||
|
|
||||||
|
|
||||||
|
List<MasterKeyModel> get historyFamilyList => _SOAPService.historyFamilyList;
|
||||||
|
|
||||||
|
List<MasterKeyModel> get historyMedicalList => _SOAPService.historyMedicalList;
|
||||||
|
|
||||||
|
List<MasterKeyModel> get historySportList => _SOAPService.historySportList;
|
||||||
|
|
||||||
|
List<MasterKeyModel> get historySocialList => _SOAPService.historySocialList;
|
||||||
|
List<MasterKeyModel> get historySurgicalList => _SOAPService.historySurgicalList;
|
||||||
|
List<MasterKeyModel> get mergeHistorySurgicalWithHistorySportList => [...historySurgicalList,...historySportList];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Future getAllergies(GetAllergiesRequestModel getAllergiesRequestModel) async {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _SOAPService.getAllergies(getAllergiesRequestModel);
|
||||||
|
if (_SOAPService.hasError) {
|
||||||
|
error = _SOAPService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getMasterLookup(MasterKeysService masterKeys) async {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _SOAPService.getMasterLookup(masterKeys);
|
||||||
|
if (_SOAPService.hasError) {
|
||||||
|
error = _SOAPService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future postAllergy(PostAllergyRequestModel postAllergyRequestModel) async {
|
||||||
|
setState(ViewState.BusyLocal);
|
||||||
|
await _SOAPService.postAllergy(postAllergyRequestModel);
|
||||||
|
if (_SOAPService.hasError) {
|
||||||
|
error = _SOAPService.error;
|
||||||
|
setState(ViewState.ErrorLocal);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,60 @@
|
|||||||
|
class AllergyModel {
|
||||||
|
int allergyDiseaseId;
|
||||||
|
String allergyDiseaseName;
|
||||||
|
int allergyDiseaseType;
|
||||||
|
int appointmentNo;
|
||||||
|
int createdBy;
|
||||||
|
String createdByName;
|
||||||
|
String createdOn;
|
||||||
|
int episodeID;
|
||||||
|
bool isChecked;
|
||||||
|
bool isUpdatedByNurse;
|
||||||
|
int severity;
|
||||||
|
String severityName;
|
||||||
|
|
||||||
|
AllergyModel(
|
||||||
|
{this.allergyDiseaseId,
|
||||||
|
this.allergyDiseaseName,
|
||||||
|
this.allergyDiseaseType,
|
||||||
|
this.appointmentNo,
|
||||||
|
this.createdBy,
|
||||||
|
this.createdByName,
|
||||||
|
this.createdOn,
|
||||||
|
this.episodeID,
|
||||||
|
this.isChecked,
|
||||||
|
this.isUpdatedByNurse,
|
||||||
|
this.severity,
|
||||||
|
this.severityName});
|
||||||
|
|
||||||
|
AllergyModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
allergyDiseaseId = json['allergyDiseaseId'];
|
||||||
|
allergyDiseaseName = json['allergyDiseaseName'];
|
||||||
|
allergyDiseaseType = json['allergyDiseaseType'];
|
||||||
|
appointmentNo = json['appointmentNo'];
|
||||||
|
createdBy = json['createdBy'];
|
||||||
|
createdByName = json['createdByName'];
|
||||||
|
createdOn = json['createdOn'];
|
||||||
|
episodeID = json['episodeID'];
|
||||||
|
isChecked = json['isChecked'];
|
||||||
|
isUpdatedByNurse = json['isUpdatedByNurse'];
|
||||||
|
severity = json['severity'];
|
||||||
|
severityName = json['severityName'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['allergyDiseaseId'] = this.allergyDiseaseId;
|
||||||
|
data['allergyDiseaseName'] = this.allergyDiseaseName;
|
||||||
|
data['allergyDiseaseType'] = this.allergyDiseaseType;
|
||||||
|
data['appointmentNo'] = this.appointmentNo;
|
||||||
|
data['createdBy'] = this.createdBy;
|
||||||
|
data['createdByName'] = this.createdByName;
|
||||||
|
data['createdOn'] = this.createdOn;
|
||||||
|
data['episodeID'] = this.episodeID;
|
||||||
|
data['isChecked'] = this.isChecked;
|
||||||
|
data['isUpdatedByNurse'] = this.isUpdatedByNurse;
|
||||||
|
data['severity'] = this.severity;
|
||||||
|
data['severityName'] = this.severityName;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
class GetAllergiesRequestModel {
|
||||||
|
String vidaAuthTokenID;
|
||||||
|
int patientMRN;
|
||||||
|
int appointmentNo;
|
||||||
|
int episodeId;
|
||||||
|
String doctorID;
|
||||||
|
|
||||||
|
GetAllergiesRequestModel(
|
||||||
|
{this.vidaAuthTokenID,
|
||||||
|
this.patientMRN,
|
||||||
|
this.appointmentNo,
|
||||||
|
this.episodeId,
|
||||||
|
this.doctorID});
|
||||||
|
|
||||||
|
GetAllergiesRequestModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
vidaAuthTokenID = json['VidaAuthTokenID'];
|
||||||
|
patientMRN = json['PatientMRN'];
|
||||||
|
appointmentNo = json['AppointmentNo'];
|
||||||
|
episodeId = json['EpisodeId'];
|
||||||
|
doctorID = json['DoctorID'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
|
||||||
|
data['PatientMRN'] = this.patientMRN;
|
||||||
|
data['AppointmentNo'] = this.appointmentNo;
|
||||||
|
data['EpisodeId'] = this.episodeId;
|
||||||
|
data['DoctorID'] = this.doctorID;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,76 @@
|
|||||||
|
class MasterKeyModel {
|
||||||
|
String alias;
|
||||||
|
String aliasN;
|
||||||
|
int code;
|
||||||
|
Null description;
|
||||||
|
Null detail1;
|
||||||
|
Null detail2;
|
||||||
|
Null detail3;
|
||||||
|
Null detail4;
|
||||||
|
Null detail5;
|
||||||
|
int groupID;
|
||||||
|
int id;
|
||||||
|
String nameAr;
|
||||||
|
String nameEn;
|
||||||
|
Null remarks;
|
||||||
|
int typeId;
|
||||||
|
String valueList;
|
||||||
|
|
||||||
|
MasterKeyModel(
|
||||||
|
{this.alias,
|
||||||
|
this.aliasN,
|
||||||
|
this.code,
|
||||||
|
this.description,
|
||||||
|
this.detail1,
|
||||||
|
this.detail2,
|
||||||
|
this.detail3,
|
||||||
|
this.detail4,
|
||||||
|
this.detail5,
|
||||||
|
this.groupID,
|
||||||
|
this.id,
|
||||||
|
this.nameAr,
|
||||||
|
this.nameEn,
|
||||||
|
this.remarks,
|
||||||
|
this.typeId,
|
||||||
|
this.valueList});
|
||||||
|
|
||||||
|
MasterKeyModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
alias = json['alias'];
|
||||||
|
aliasN = json['aliasN'];
|
||||||
|
code = json['code'];
|
||||||
|
description = json['description'];
|
||||||
|
detail1 = json['detail1'];
|
||||||
|
detail2 = json['detail2'];
|
||||||
|
detail3 = json['detail3'];
|
||||||
|
detail4 = json['detail4'];
|
||||||
|
detail5 = json['detail5'];
|
||||||
|
groupID = json['groupID'];
|
||||||
|
id = json['id'];
|
||||||
|
nameAr = json['nameAr'];
|
||||||
|
nameEn = json['nameEn'];
|
||||||
|
remarks = json['remarks'];
|
||||||
|
typeId = json['typeId'];
|
||||||
|
valueList = json['valueList'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['alias'] = this.alias;
|
||||||
|
data['aliasN'] = this.aliasN;
|
||||||
|
data['code'] = this.code;
|
||||||
|
data['description'] = this.description;
|
||||||
|
data['detail1'] = this.detail1;
|
||||||
|
data['detail2'] = this.detail2;
|
||||||
|
data['detail3'] = this.detail3;
|
||||||
|
data['detail4'] = this.detail4;
|
||||||
|
data['detail5'] = this.detail5;
|
||||||
|
data['groupID'] = this.groupID;
|
||||||
|
data['id'] = this.id;
|
||||||
|
data['nameAr'] = this.nameAr;
|
||||||
|
data['nameEn'] = this.nameEn;
|
||||||
|
data['remarks'] = this.remarks;
|
||||||
|
data['typeId'] = this.typeId;
|
||||||
|
data['valueList'] = this.valueList;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
||||||
|
|
||||||
|
class MySelectedAllergy {
|
||||||
|
MasterKeyModel selectedAllergySeverity;
|
||||||
|
MasterKeyModel selectedAllergy;
|
||||||
|
String remark;
|
||||||
|
|
||||||
|
MySelectedAllergy(
|
||||||
|
{this.selectedAllergySeverity, this.selectedAllergy, this.remark});
|
||||||
|
|
||||||
|
MySelectedAllergy.fromJson(Map<String, dynamic> json) {
|
||||||
|
selectedAllergySeverity = json['selectedAllergySeverity'] != null
|
||||||
|
? new MasterKeyModel.fromJson(json['selectedAllergySeverity'])
|
||||||
|
: null;
|
||||||
|
selectedAllergy = json['selectedAllergy'] != null
|
||||||
|
? new MasterKeyModel.fromJson(json['selectedAllergy'])
|
||||||
|
: null;
|
||||||
|
remark = json['remark'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
if (this.selectedAllergySeverity != null) {
|
||||||
|
data['selectedAllergySeverity'] = this.selectedAllergySeverity.toJson();
|
||||||
|
}
|
||||||
|
if (this.selectedAllergy != null) {
|
||||||
|
data['selectedAllergy'] = this.selectedAllergy.toJson();
|
||||||
|
}
|
||||||
|
data['remark'] = this.remark;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,93 @@
|
|||||||
|
class PostAllergyRequestModel {
|
||||||
|
List<ListHisProgNotePatientAllergyDiseaseVM>
|
||||||
|
listHisProgNotePatientAllergyDiseaseVM;
|
||||||
|
|
||||||
|
PostAllergyRequestModel({this.listHisProgNotePatientAllergyDiseaseVM});
|
||||||
|
|
||||||
|
PostAllergyRequestModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
if (json['listHisProgNotePatientAllergyDiseaseVM'] != null) {
|
||||||
|
listHisProgNotePatientAllergyDiseaseVM =
|
||||||
|
new List<ListHisProgNotePatientAllergyDiseaseVM>();
|
||||||
|
json['listHisProgNotePatientAllergyDiseaseVM'].forEach((v) {
|
||||||
|
listHisProgNotePatientAllergyDiseaseVM
|
||||||
|
.add(new ListHisProgNotePatientAllergyDiseaseVM.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
if (this.listHisProgNotePatientAllergyDiseaseVM != null) {
|
||||||
|
data['listHisProgNotePatientAllergyDiseaseVM'] = this
|
||||||
|
.listHisProgNotePatientAllergyDiseaseVM
|
||||||
|
.map((v) => v.toJson())
|
||||||
|
.toList();
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ListHisProgNotePatientAllergyDiseaseVM {
|
||||||
|
int patientMRN;
|
||||||
|
int allergyDiseaseType;
|
||||||
|
int allergyDiseaseId;
|
||||||
|
int episodeId;
|
||||||
|
int appointmentNo;
|
||||||
|
int severity;
|
||||||
|
bool isChecked;
|
||||||
|
bool isUpdatedByNurse;
|
||||||
|
String remarks;
|
||||||
|
int createdBy;
|
||||||
|
String createdOn;
|
||||||
|
int editedBy;
|
||||||
|
String editedOn;
|
||||||
|
|
||||||
|
ListHisProgNotePatientAllergyDiseaseVM(
|
||||||
|
{this.patientMRN,
|
||||||
|
this.allergyDiseaseType,
|
||||||
|
this.allergyDiseaseId,
|
||||||
|
this.episodeId,
|
||||||
|
this.appointmentNo,
|
||||||
|
this.severity,
|
||||||
|
this.isChecked,
|
||||||
|
this.isUpdatedByNurse,
|
||||||
|
this.remarks,
|
||||||
|
this.createdBy,
|
||||||
|
this.createdOn,
|
||||||
|
this.editedBy,
|
||||||
|
this.editedOn});
|
||||||
|
|
||||||
|
ListHisProgNotePatientAllergyDiseaseVM.fromJson(Map<String, dynamic> json) {
|
||||||
|
patientMRN = json['patientMRN'];
|
||||||
|
allergyDiseaseType = json['allergyDiseaseType'];
|
||||||
|
allergyDiseaseId = json['allergyDiseaseId'];
|
||||||
|
episodeId = json['episodeId'];
|
||||||
|
appointmentNo = json['appointmentNo'];
|
||||||
|
severity = json['severity'];
|
||||||
|
isChecked = json['isChecked'];
|
||||||
|
isUpdatedByNurse = json['isUpdatedByNurse'];
|
||||||
|
remarks = json['remarks'];
|
||||||
|
createdBy = json['createdBy'];
|
||||||
|
createdOn = json['createdOn'];
|
||||||
|
editedBy = json['editedBy'];
|
||||||
|
editedOn = json['editedOn'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['patientMRN'] = this.patientMRN;
|
||||||
|
data['allergyDiseaseType'] = this.allergyDiseaseType;
|
||||||
|
data['allergyDiseaseId'] = this.allergyDiseaseId;
|
||||||
|
data['episodeId'] = this.episodeId;
|
||||||
|
data['appointmentNo'] = this.appointmentNo;
|
||||||
|
data['severity'] = this.severity;
|
||||||
|
data['isChecked'] = this.isChecked;
|
||||||
|
data['isUpdatedByNurse'] = this.isUpdatedByNurse;
|
||||||
|
data['remarks'] = this.remarks;
|
||||||
|
data['createdBy'] = this.createdBy;
|
||||||
|
data['createdOn'] = this.createdOn;
|
||||||
|
data['editedBy'] = this.editedBy;
|
||||||
|
data['editedOn'] = this.editedOn;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
class ActivationCodeModel {
|
||||||
|
String mobileNumber;
|
||||||
|
String zipCode;
|
||||||
|
int channel;
|
||||||
|
int languageID;
|
||||||
|
double versionID;
|
||||||
|
int memberID;
|
||||||
|
String password;
|
||||||
|
int facilityId;
|
||||||
|
String generalid;
|
||||||
|
|
||||||
|
ActivationCodeModel(
|
||||||
|
{this.mobileNumber,
|
||||||
|
this.zipCode,
|
||||||
|
this.channel,
|
||||||
|
this.languageID,
|
||||||
|
this.versionID,
|
||||||
|
this.memberID,
|
||||||
|
this.password,
|
||||||
|
this.facilityId,
|
||||||
|
this.generalid});
|
||||||
|
|
||||||
|
ActivationCodeModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
mobileNumber = json['MobileNumber'];
|
||||||
|
zipCode = json['ZipCode'];
|
||||||
|
channel = json['Channel'];
|
||||||
|
languageID = json['LanguageID'];
|
||||||
|
versionID = json['VersionID'];
|
||||||
|
memberID = json['MemberID'];
|
||||||
|
password = json['Password'];
|
||||||
|
facilityId = json['facilityId'];
|
||||||
|
generalid = json['generalid'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['MobileNumber'] = this.mobileNumber;
|
||||||
|
data['ZipCode'] = this.zipCode;
|
||||||
|
data['Channel'] = this.channel;
|
||||||
|
data['LanguageID'] = this.languageID;
|
||||||
|
data['VersionID'] = this.versionID;
|
||||||
|
data['MemberID'] = this.memberID;
|
||||||
|
data['Password'] = this.password;
|
||||||
|
data['facilityId'] = this.facilityId;
|
||||||
|
data['generalid'] = this.generalid;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,64 @@
|
|||||||
|
class CheckActivationCodeRequestModel {
|
||||||
|
String mobileNumber;
|
||||||
|
String zipCode;
|
||||||
|
int doctorID;
|
||||||
|
String iPAdress;
|
||||||
|
int channel;
|
||||||
|
int languageID;
|
||||||
|
int projectID;
|
||||||
|
double versionID;
|
||||||
|
String generalid;
|
||||||
|
String logInTokenID;
|
||||||
|
String activationCode;
|
||||||
|
String vidaAuthTokenID;
|
||||||
|
String vidaRefreshTokenID;
|
||||||
|
|
||||||
|
CheckActivationCodeRequestModel(
|
||||||
|
{this.mobileNumber,
|
||||||
|
this.zipCode,
|
||||||
|
this.doctorID,
|
||||||
|
this.iPAdress,
|
||||||
|
this.channel,
|
||||||
|
this.languageID,
|
||||||
|
this.projectID,
|
||||||
|
this.versionID,
|
||||||
|
this.generalid,
|
||||||
|
this.logInTokenID,
|
||||||
|
this.activationCode,
|
||||||
|
this.vidaAuthTokenID,
|
||||||
|
this.vidaRefreshTokenID});
|
||||||
|
|
||||||
|
CheckActivationCodeRequestModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
mobileNumber = json['MobileNumber'];
|
||||||
|
zipCode = json['ZipCode'];
|
||||||
|
doctorID = json['DoctorID'];
|
||||||
|
iPAdress = json['IPAdress'];
|
||||||
|
channel = json['Channel'];
|
||||||
|
languageID = json['LanguageID'];
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
versionID = json['VersionID'];
|
||||||
|
generalid = json['generalid'];
|
||||||
|
logInTokenID = json['LogInTokenID'];
|
||||||
|
activationCode = json['activationCode'];
|
||||||
|
vidaAuthTokenID = json['VidaAuthTokenID'];
|
||||||
|
vidaRefreshTokenID = json['VidaRefreshTokenID'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['MobileNumber'] = this.mobileNumber;
|
||||||
|
data['ZipCode'] = this.zipCode;
|
||||||
|
data['DoctorID'] = this.doctorID;
|
||||||
|
data['IPAdress'] = this.iPAdress;
|
||||||
|
data['Channel'] = this.channel;
|
||||||
|
data['LanguageID'] = this.languageID;
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
data['VersionID'] = this.versionID;
|
||||||
|
data['generalid'] = this.generalid;
|
||||||
|
data['LogInTokenID'] = this.logInTokenID;
|
||||||
|
data['activationCode'] = this.activationCode;
|
||||||
|
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
|
||||||
|
data['VidaRefreshTokenID'] = this.vidaRefreshTokenID;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,138 @@
|
|||||||
|
class VitalSignData {
|
||||||
|
|
||||||
|
int appointmentNo;
|
||||||
|
int bloodPressureCuffLocation;
|
||||||
|
int bloodPressureCuffSize;
|
||||||
|
int bloodPressureHigher;
|
||||||
|
int bloodPressureLower;
|
||||||
|
int bloodPressurePatientPosition;
|
||||||
|
double bodyMassIndex;
|
||||||
|
int fio2;
|
||||||
|
int headCircumCm;
|
||||||
|
int heightCm;
|
||||||
|
int idealBodyWeightLbs;
|
||||||
|
bool isPainManagementDone;
|
||||||
|
bool isVitalsRequired;
|
||||||
|
int leanBodyWeightLbs;
|
||||||
|
String painCharacter;
|
||||||
|
String painDuration;
|
||||||
|
String painFrequency;
|
||||||
|
String painLocation;
|
||||||
|
int painScore;
|
||||||
|
int patientMRN;
|
||||||
|
int patientType;
|
||||||
|
int pulseBeatPerMinute;
|
||||||
|
int pulseRhythm;
|
||||||
|
int respirationBeatPerMinute;
|
||||||
|
int respirationPattern;
|
||||||
|
int sao2;
|
||||||
|
int status;
|
||||||
|
int temperatureCelcius;
|
||||||
|
int temperatureCelciusMethod;
|
||||||
|
int waistSizeInch;
|
||||||
|
int weightKg;
|
||||||
|
|
||||||
|
VitalSignData(
|
||||||
|
this.appointmentNo,
|
||||||
|
this.bloodPressureCuffLocation,
|
||||||
|
this.bloodPressureCuffSize,
|
||||||
|
this.bloodPressureHigher,
|
||||||
|
this.bloodPressureLower,
|
||||||
|
this.bloodPressurePatientPosition,
|
||||||
|
this.bodyMassIndex,
|
||||||
|
this.fio2,
|
||||||
|
this.headCircumCm,
|
||||||
|
this.heightCm,
|
||||||
|
this.idealBodyWeightLbs,
|
||||||
|
this.isPainManagementDone,
|
||||||
|
this.isVitalsRequired,
|
||||||
|
this.leanBodyWeightLbs,
|
||||||
|
this.painCharacter,
|
||||||
|
this.painDuration,
|
||||||
|
this.painFrequency,
|
||||||
|
this.painLocation,
|
||||||
|
this.painScore,
|
||||||
|
this.patientMRN,
|
||||||
|
this.patientType,
|
||||||
|
this.pulseBeatPerMinute,
|
||||||
|
this.pulseRhythm,
|
||||||
|
this.respirationBeatPerMinute,
|
||||||
|
this.respirationPattern,
|
||||||
|
this.sao2,
|
||||||
|
this.status,
|
||||||
|
this.temperatureCelcius,
|
||||||
|
this.temperatureCelciusMethod,
|
||||||
|
this.waistSizeInch,
|
||||||
|
this.weightKg);
|
||||||
|
|
||||||
|
VitalSignData.fromJson(Map<String, dynamic> json) {
|
||||||
|
appointmentNo = json['appointmentNo'];
|
||||||
|
bloodPressureCuffLocation = json['bloodPressureCuffLocation'];
|
||||||
|
bloodPressureCuffSize = json['bloodPressureCuffSize'];
|
||||||
|
bloodPressureHigher = json['bloodPressureHigher'];
|
||||||
|
bloodPressureLower = json['bloodPressureLower'];
|
||||||
|
bloodPressurePatientPosition = json['bloodPressurePatientPosition'];
|
||||||
|
bodyMassIndex = json['bodyMassIndex'];
|
||||||
|
fio2 = json['fio2'];
|
||||||
|
headCircumCm = json['headCircumCm'];
|
||||||
|
heightCm = json['heightCm'];
|
||||||
|
idealBodyWeightLbs = json['idealBodyWeightLbs'];
|
||||||
|
isPainManagementDone = json['isPainManagementDone'];
|
||||||
|
isVitalsRequired = json['isVitalsRequired'];
|
||||||
|
leanBodyWeightLbs = json['leanBodyWeightLbs'];
|
||||||
|
painCharacter = json['painCharacter'];
|
||||||
|
painDuration = json['painDuration'];
|
||||||
|
painFrequency = json['painFrequency'];
|
||||||
|
painLocation = json['painLocation'];
|
||||||
|
painScore = json['painScore'];
|
||||||
|
patientMRN = json['patientMRN'];
|
||||||
|
patientType = json['patientType'];
|
||||||
|
pulseBeatPerMinute = json['pulseBeatPerMinute'];
|
||||||
|
pulseRhythm = json['pulseRhythm'];
|
||||||
|
respirationBeatPerMinute = json['respirationBeatPerMinute'];
|
||||||
|
respirationPattern = json['respirationPattern'];
|
||||||
|
sao2 = json['sao2'];
|
||||||
|
status = json['status'];
|
||||||
|
temperatureCelcius = json['temperatureCelcius'];
|
||||||
|
temperatureCelciusMethod = json['temperatureCelciusMethod'];
|
||||||
|
waistSizeInch = json['waistSizeInch'];
|
||||||
|
weightKg = json['weightKg'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['appointmentNo'] = this.appointmentNo;
|
||||||
|
data['bloodPressureCuffLocation'] = this.bloodPressureCuffLocation;
|
||||||
|
data['bloodPressureCuffSize'] = this.bloodPressureCuffSize;
|
||||||
|
data['bloodPressureHigher'] = this.bloodPressureHigher;
|
||||||
|
data['bloodPressureLower'] = this.bloodPressureLower;
|
||||||
|
data['bloodPressurePatientPosition'] = this.bloodPressurePatientPosition;
|
||||||
|
data['bodyMassIndex'] = this.bodyMassIndex;
|
||||||
|
data['fio2'] = this.fio2;
|
||||||
|
data['headCircumCm'] = this.headCircumCm;
|
||||||
|
data['heightCm'] = this.heightCm;
|
||||||
|
data['idealBodyWeightLbs'] = this.idealBodyWeightLbs;
|
||||||
|
data['isPainManagementDone'] = this.isPainManagementDone;
|
||||||
|
data['isVitalsRequired'] = this.isVitalsRequired;
|
||||||
|
data['leanBodyWeightLbs'] = this.leanBodyWeightLbs;
|
||||||
|
data['painCharacter'] = this.painCharacter;
|
||||||
|
data['painDuration'] = this.painDuration;
|
||||||
|
data['painFrequency'] = this.painFrequency;
|
||||||
|
data['painLocation'] = this.painLocation;
|
||||||
|
data['painScore'] = this.painScore;
|
||||||
|
data['patientMRN'] = this.patientMRN;
|
||||||
|
data['patientType'] = this.patientType;
|
||||||
|
data['pulseBeatPerMinute'] = this.pulseBeatPerMinute;
|
||||||
|
data['pulseRhythm'] = this.pulseRhythm;
|
||||||
|
data['respirationBeatPerMinute'] = this.respirationBeatPerMinute;
|
||||||
|
data['respirationPattern'] = this.respirationPattern;
|
||||||
|
data['sao2'] = this.sao2;
|
||||||
|
data['status'] = this.status;
|
||||||
|
data['temperatureCelcius'] = this.temperatureCelcius;
|
||||||
|
data['temperatureCelciusMethod'] = this.temperatureCelciusMethod;
|
||||||
|
data['waistSizeInch'] = this.waistSizeInch;
|
||||||
|
data['weightKg'] = this.weightKg;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class PatientVitalSignScreen extends StatelessWidget {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
|
return Container();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,113 @@
|
|||||||
|
import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/assessment_page.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/objective_page.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/plan_page.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/subjective/subjective_page.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../patient_profile_widget.dart';
|
||||||
|
import 'steps_widget.dart';
|
||||||
|
|
||||||
|
class AddSOAPIndex extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
_AddSOAPIndexState createState() => _AddSOAPIndexState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AddSOAPIndexState extends State<AddSOAPIndex>
|
||||||
|
with TickerProviderStateMixin {
|
||||||
|
PageController _controller;
|
||||||
|
int _currentIndex = 0;
|
||||||
|
List<MySelectedAllergy> myAllergiesList= List();
|
||||||
|
List<MasterKeyModel> myHistoryList = List();
|
||||||
|
changePageViewIndex(pageIndex) {
|
||||||
|
_controller.jumpToPage(pageIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
// TODO: implement initState
|
||||||
|
_controller = new PageController();
|
||||||
|
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
||||||
|
PatiantInformtion patient = routeArgs['patient'];
|
||||||
|
return BaseView<DoctorReplayViewModel>(
|
||||||
|
builder: (_, model, w) => AppScaffold(
|
||||||
|
baseViewModel: model,
|
||||||
|
appBarTitle: TranslationBase.of(context).healthRecordInformation,
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
decoration:
|
||||||
|
BoxDecoration(boxShadow: <BoxShadow>[], color: Colors.white),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
PatientPageHeaderWidget(patient),
|
||||||
|
FractionallySizedBox(
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.75,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
left:
|
||||||
|
MediaQuery.of(context).size.width * 0.05,
|
||||||
|
right:
|
||||||
|
MediaQuery.of(context).size.width * 0.05),
|
||||||
|
child: StepsWidget(
|
||||||
|
index: _currentIndex,
|
||||||
|
changeCurrentTab: changePageViewIndex,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: PageView(
|
||||||
|
physics: NeverScrollableScrollPhysics(),
|
||||||
|
controller: _controller,
|
||||||
|
onPageChanged: (index) {
|
||||||
|
setState(() {
|
||||||
|
_currentIndex = index;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
scrollDirection: Axis.horizontal,
|
||||||
|
children: <Widget>[
|
||||||
|
SubjectivePage(changePageViewIndex: changePageViewIndex,myAllergiesList: myAllergiesList,myHistoryList: myHistoryList,),
|
||||||
|
ObjectivePage(changePageViewIndex: changePageViewIndex,),
|
||||||
|
AssessmentPage(changePageViewIndex: changePageViewIndex,),
|
||||||
|
PlanPage(changePageViewIndex: changePageViewIndex,)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,494 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
|
||||||
|
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
|
|
||||||
|
class AssessmentPage extends StatefulWidget {
|
||||||
|
final Function changePageViewIndex;
|
||||||
|
|
||||||
|
AssessmentPage({Key key, this.changePageViewIndex});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_AssessmentPageState createState() => _AssessmentPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AssessmentPageState extends State<AssessmentPage> {
|
||||||
|
bool isAssessmentExpand = false;
|
||||||
|
|
||||||
|
List<dynamic> assessmentList;
|
||||||
|
dynamic _referTo;
|
||||||
|
|
||||||
|
TextEditingController remarksController = TextEditingController();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final screenSize = MediaQuery.of(context).size;
|
||||||
|
|
||||||
|
return AppScaffold(
|
||||||
|
isShowAppBar: false,
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
physics: ScrollPhysics(),
|
||||||
|
child: Center(
|
||||||
|
child: FractionallySizedBox(
|
||||||
|
widthFactor: 0.9,
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
HeaderBodyExpandableNotifier(
|
||||||
|
headerWidget: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Texts('ASSESSMENT',
|
||||||
|
variant: isAssessmentExpand ? "bodyText" : '',
|
||||||
|
bold: isAssessmentExpand ? true : false,
|
||||||
|
color: Colors.black),
|
||||||
|
Icon(
|
||||||
|
FontAwesomeIcons.asterisk,
|
||||||
|
color: AppGlobal.appPrimaryColor,
|
||||||
|
size: 12,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
isAssessmentExpand = !isAssessmentExpand;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Icon(isAssessmentExpand
|
||||||
|
? EvaIcons.minus
|
||||||
|
: EvaIcons.plus))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
bodyWidget: Column(children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(left: 5, right: 5, top: 15),
|
||||||
|
child: TextFields(
|
||||||
|
hintText: "Add ASSESSMENT",
|
||||||
|
fontSize: 13.5,
|
||||||
|
onTapTextFields: () {
|
||||||
|
openAssessmentDialog(context);
|
||||||
|
},
|
||||||
|
readOnly: true,
|
||||||
|
// hintColor: Colors.black,
|
||||||
|
suffixIcon: EvaIcons.plusCircleOutline,
|
||||||
|
suffixIconColor: AppGlobal.appPrimaryColor,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
// controller: messageController,
|
||||||
|
validator: (value) {
|
||||||
|
if (value == null)
|
||||||
|
return TranslationBase.of(context)
|
||||||
|
.emptyMessage;
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(left: 5, right: 5, top: 15),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"12".toUpperCase(),
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"DEC".toUpperCase(),
|
||||||
|
fontSize: 10,
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"Appointment #: ",
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"2019054946",
|
||||||
|
fontSize: 10,
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"Typhoid Fever",
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"Type : ",
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"Possible Diagnosis",
|
||||||
|
fontSize: 10,
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"Doc : ",
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"Anas Abdullah",
|
||||||
|
fontSize: 10,
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 6,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 6,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"Some short remark about the allergy",
|
||||||
|
fontSize: 10,
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"ICD: ".toUpperCase(),
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"R07.1".toUpperCase(),
|
||||||
|
fontSize: 10,
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
InkWell(
|
||||||
|
onTap: () {},
|
||||||
|
child: Icon(EvaIcons.edit2Outline),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
]),
|
||||||
|
isExpand: isAssessmentExpand,
|
||||||
|
),
|
||||||
|
DividerWithSpacesAround(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
AppButton(
|
||||||
|
title: TranslationBase.of(context).next,
|
||||||
|
onPressed: () {
|
||||||
|
widget.changePageViewIndex(3);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
openAssessmentDialog(BuildContext context) {
|
||||||
|
final screenSize = MediaQuery.of(context).size;
|
||||||
|
InputDecoration textFieldSelectorDecoration(
|
||||||
|
String hintText, String selectedText, bool isDropDown) {
|
||||||
|
//TODO: make one Input InputDecoration for all
|
||||||
|
return InputDecoration(
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
disabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
hintText: selectedText != null ? selectedText : hintText,
|
||||||
|
suffixIcon: isDropDown ? Icon(Icons.arrow_drop_down) : null,
|
||||||
|
hintStyle: TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
color: Colors.grey.shade600,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
showModalBottomSheet(
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
isScrollControlled: true,
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return FractionallySizedBox(
|
||||||
|
heightFactor: 0.75,
|
||||||
|
widthFactor: 0.9,
|
||||||
|
|
||||||
|
child: Container(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"Add Assessment Details".toUpperCase(),
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: screenSize.height * 0.070,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: assessmentList != null
|
||||||
|
? () {
|
||||||
|
ListSelectDialog dialog = ListSelectDialog(
|
||||||
|
list: assessmentList,
|
||||||
|
attributeName: 'name',
|
||||||
|
attributeValueId: 'id',
|
||||||
|
okText: TranslationBase.of(context).ok,
|
||||||
|
okFunction: (selectedValue) {
|
||||||
|
setState(() {
|
||||||
|
// model.getDoctorBranch().then((value) {
|
||||||
|
// _selectedBranch = value;
|
||||||
|
// if (_referTo['id'] == 1) {
|
||||||
|
// model.getClinics(
|
||||||
|
// _selectedBranch['ID']);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
showDialog(
|
||||||
|
barrierDismissible: false,
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return dialog;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
: null,
|
||||||
|
child: TextField(
|
||||||
|
decoration: textFieldSelectorDecoration(
|
||||||
|
"Appointment Number",
|
||||||
|
_referTo != null ? _referTo['name'] : null,
|
||||||
|
true),
|
||||||
|
enabled: false,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: screenSize.height * 0.070,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: assessmentList != null
|
||||||
|
? () {
|
||||||
|
ListSelectDialog dialog = ListSelectDialog(
|
||||||
|
list: assessmentList,
|
||||||
|
attributeName: 'name',
|
||||||
|
attributeValueId: 'id',
|
||||||
|
okText: TranslationBase.of(context).ok,
|
||||||
|
okFunction: (selectedValue) {
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
showDialog(
|
||||||
|
barrierDismissible: false,
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return dialog;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
: null,
|
||||||
|
child: TextField(
|
||||||
|
decoration: textFieldSelectorDecoration("Name or ICD",
|
||||||
|
_referTo != null ? _referTo['name'] : null, true),
|
||||||
|
enabled: false,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: screenSize.height * 0.070,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: assessmentList != null
|
||||||
|
? () {
|
||||||
|
ListSelectDialog dialog = ListSelectDialog(
|
||||||
|
list: assessmentList,
|
||||||
|
attributeName: 'name',
|
||||||
|
attributeValueId: 'id',
|
||||||
|
okText: TranslationBase.of(context).ok,
|
||||||
|
okFunction: (selectedValue) {
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
showDialog(
|
||||||
|
barrierDismissible: false,
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return dialog;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
: null,
|
||||||
|
child: TextField(
|
||||||
|
decoration: textFieldSelectorDecoration("Condition",
|
||||||
|
_referTo != null ? _referTo['name'] : null, true),
|
||||||
|
enabled: false,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: screenSize.height * 0.070,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: assessmentList != null
|
||||||
|
? () {
|
||||||
|
ListSelectDialog dialog = ListSelectDialog(
|
||||||
|
list: assessmentList,
|
||||||
|
attributeName: 'name',
|
||||||
|
attributeValueId: 'id',
|
||||||
|
okText: TranslationBase.of(context).ok,
|
||||||
|
okFunction: (selectedValue) {
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
showDialog(
|
||||||
|
barrierDismissible: false,
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return dialog;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
: null,
|
||||||
|
child: TextField(
|
||||||
|
decoration: textFieldSelectorDecoration("Type",
|
||||||
|
_referTo != null ? _referTo['name'] : null, true),
|
||||||
|
enabled: false,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(left: 0, right: 0, top: 15),
|
||||||
|
child: TextFields(
|
||||||
|
hintText: "Remarks",
|
||||||
|
fontSize: 13.5,
|
||||||
|
// hintColor: Colors.black,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
maxLines: 18,
|
||||||
|
minLines: 8,
|
||||||
|
controller: remarksController,
|
||||||
|
validator: (value) {
|
||||||
|
if (value == null)
|
||||||
|
return TranslationBase.of(context).emptyMessage;
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
AppButton(
|
||||||
|
title: "Add".toUpperCase(),
|
||||||
|
onPressed: () {},
|
||||||
|
),
|
||||||
|
])),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,502 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
|
||||||
|
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
|
import 'package:hexcolor/hexcolor.dart';
|
||||||
|
|
||||||
|
class ObjectivePage extends StatefulWidget {
|
||||||
|
final Function changePageViewIndex;
|
||||||
|
|
||||||
|
ObjectivePage({Key key, this.changePageViewIndex});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_ObjectivePageState createState() => _ObjectivePageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ObjectivePageState extends State<ObjectivePage> {
|
||||||
|
bool isSysExaminationExpand = false;
|
||||||
|
List<dynamic> examinationsList;
|
||||||
|
TextEditingController remarksController = TextEditingController();
|
||||||
|
|
||||||
|
BoxDecoration containerBorderDecoration(
|
||||||
|
Color containerColor, Color borderColor) {
|
||||||
|
return BoxDecoration(
|
||||||
|
color: containerColor,
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(6)),
|
||||||
|
border: Border.fromBorderSide(BorderSide(
|
||||||
|
color: borderColor,
|
||||||
|
width: 0.5,
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final screenSize = MediaQuery.of(context).size;
|
||||||
|
|
||||||
|
return AppScaffold(
|
||||||
|
isShowAppBar: false,
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
physics: ScrollPhysics(),
|
||||||
|
child: Center(
|
||||||
|
child: FractionallySizedBox(
|
||||||
|
widthFactor: 0.9,
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
HeaderBodyExpandableNotifier(
|
||||||
|
headerWidget: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Texts('Physical/System Examination',
|
||||||
|
variant:
|
||||||
|
isSysExaminationExpand ? "bodyText" : '',
|
||||||
|
bold: isSysExaminationExpand ? true : false,
|
||||||
|
color: Colors.black),
|
||||||
|
Icon(
|
||||||
|
FontAwesomeIcons.asterisk,
|
||||||
|
color: AppGlobal.appPrimaryColor,
|
||||||
|
size: 12,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
isSysExaminationExpand =
|
||||||
|
!isSysExaminationExpand;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Icon(isSysExaminationExpand
|
||||||
|
? EvaIcons.minus
|
||||||
|
: EvaIcons.plus))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
bodyWidget: Column(children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin:
|
||||||
|
EdgeInsets.only(left: 10, right: 10, top: 15),
|
||||||
|
child: TextFields(
|
||||||
|
hintText: "Add Examination",
|
||||||
|
fontSize: 13.5,
|
||||||
|
onTapTextFields: () {
|
||||||
|
openExaminationList(context);
|
||||||
|
},
|
||||||
|
readOnly: true,
|
||||||
|
// hintColor: Colors.black,
|
||||||
|
suffixIcon: EvaIcons.plusCircleOutline,
|
||||||
|
suffixIconColor: AppGlobal.appPrimaryColor,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
// controller: messageController,
|
||||||
|
validator: (value) {
|
||||||
|
if (value == null)
|
||||||
|
return TranslationBase.of(context)
|
||||||
|
.emptyMessage;
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin:
|
||||||
|
EdgeInsets.only(left: 15, right: 15, top: 15),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Texts('Abdomen'.toUpperCase(),
|
||||||
|
variant: "bodyText",
|
||||||
|
bold: true,
|
||||||
|
color: Colors.black)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 8,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
InkWell(
|
||||||
|
child: Center(
|
||||||
|
child: Container(
|
||||||
|
height: screenSize.height * 0.070,
|
||||||
|
decoration: containerBorderDecoration(
|
||||||
|
Colors.white,Colors.grey
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Text(
|
||||||
|
"Normal",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 12,
|
||||||
|
color:
|
||||||
|
Colors.black, //Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
|
||||||
|
}),
|
||||||
|
SizedBox(width: 12,),
|
||||||
|
InkWell(
|
||||||
|
child: Center(
|
||||||
|
child: Container(
|
||||||
|
height: screenSize.height * 0.070,
|
||||||
|
decoration: containerBorderDecoration(
|
||||||
|
Color(0xFF515A5D), Colors.black
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Text(
|
||||||
|
"Abnormal",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 12,
|
||||||
|
color:
|
||||||
|
Colors.white, //Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Icon(
|
||||||
|
FontAwesomeIcons.trash,
|
||||||
|
color: Colors.grey,
|
||||||
|
size: 20,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
|
||||||
|
child: TextFields(
|
||||||
|
hintText: "Remarks",
|
||||||
|
fontSize: 13.5,
|
||||||
|
// hintColor: Colors.black,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
maxLines: 25,
|
||||||
|
minLines: 13,
|
||||||
|
controller: remarksController,
|
||||||
|
validator: (value) {
|
||||||
|
if (value == null)
|
||||||
|
return TranslationBase.of(context).emptyMessage;
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
]),
|
||||||
|
isExpand: isSysExaminationExpand,
|
||||||
|
),
|
||||||
|
DividerWithSpacesAround(height: 30,),
|
||||||
|
AppButton(
|
||||||
|
title: TranslationBase.of(context).next,
|
||||||
|
onPressed: () {
|
||||||
|
widget.changePageViewIndex(2);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
openExaminationList(BuildContext context) {
|
||||||
|
final screenSize = MediaQuery.of(context).size;
|
||||||
|
InputDecoration textFieldSelectorDecoration(
|
||||||
|
String hintText, String selectedText, bool isDropDown) {
|
||||||
|
return InputDecoration(
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
disabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
hintText: selectedText != null ? selectedText : hintText,
|
||||||
|
suffixIcon: isDropDown ? Icon(Icons.arrow_drop_down) : null,
|
||||||
|
hintStyle: TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
color: Colors.grey.shade600,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
;
|
||||||
|
showModalBottomSheet(
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
isScrollControlled: true,
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return FractionallySizedBox(
|
||||||
|
heightFactor: 0.7,
|
||||||
|
child: Container(
|
||||||
|
child: FractionallySizedBox(
|
||||||
|
widthFactor: 0.9,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"Examinations",
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.5,
|
||||||
|
child: Center(
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(top: 15),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
color: Colors.white),
|
||||||
|
child: ListView(
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Checkbox(
|
||||||
|
value: true,
|
||||||
|
activeColor: Colors.red[800],
|
||||||
|
onChanged: (bool newValue) {
|
||||||
|
setState(() {});
|
||||||
|
}),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 10, vertical: 0),
|
||||||
|
child: Texts('Examinations',
|
||||||
|
variant: "bodyText",
|
||||||
|
bold: true,
|
||||||
|
color: Colors.black),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
DividerWithSpacesAround(),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Checkbox(
|
||||||
|
value: true,
|
||||||
|
activeColor: Colors.red[800],
|
||||||
|
onChanged: (bool newValue) {
|
||||||
|
setState(() {});
|
||||||
|
}),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 10, vertical: 0),
|
||||||
|
child: Texts('Examinations',
|
||||||
|
variant: "bodyText",
|
||||||
|
bold: true,
|
||||||
|
color: Colors.black),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
DividerWithSpacesAround(),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Checkbox(
|
||||||
|
value: true,
|
||||||
|
activeColor: Colors.red[800],
|
||||||
|
onChanged: (bool newValue) {
|
||||||
|
setState(() {});
|
||||||
|
}),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 10, vertical: 0),
|
||||||
|
child: Texts('Examinations',
|
||||||
|
variant: "bodyText",
|
||||||
|
bold: true,
|
||||||
|
color: Colors.black),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
DividerWithSpacesAround(),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Checkbox(
|
||||||
|
value: true,
|
||||||
|
activeColor: Colors.red[800],
|
||||||
|
onChanged: (bool newValue) {
|
||||||
|
setState(() {});
|
||||||
|
}),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 10, vertical: 0),
|
||||||
|
child: Texts('Examinations',
|
||||||
|
variant: "bodyText",
|
||||||
|
bold: true,
|
||||||
|
color: Colors.black),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
DividerWithSpacesAround(),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Checkbox(
|
||||||
|
value: true,
|
||||||
|
activeColor: Colors.red[800],
|
||||||
|
onChanged: (bool newValue) {
|
||||||
|
setState(() {});
|
||||||
|
}),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 10, vertical: 0),
|
||||||
|
child: Texts('Examinations',
|
||||||
|
variant: "bodyText",
|
||||||
|
bold: true,
|
||||||
|
color: Colors.black),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
DividerWithSpacesAround(),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Checkbox(
|
||||||
|
value: true,
|
||||||
|
activeColor: Colors.red[800],
|
||||||
|
onChanged: (bool newValue) {
|
||||||
|
setState(() {});
|
||||||
|
}),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 10, vertical: 0),
|
||||||
|
child: Texts('Examinations',
|
||||||
|
variant: "bodyText",
|
||||||
|
bold: true,
|
||||||
|
color: Colors.black),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
DividerWithSpacesAround(),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Checkbox(
|
||||||
|
value: true,
|
||||||
|
activeColor: Colors.red[800],
|
||||||
|
onChanged: (bool newValue) {
|
||||||
|
setState(() {});
|
||||||
|
}),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 10, vertical: 0),
|
||||||
|
child: Texts('Examinations',
|
||||||
|
variant: "bodyText",
|
||||||
|
bold: true,
|
||||||
|
color: Colors.black),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
DividerWithSpacesAround(),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Checkbox(
|
||||||
|
value: true,
|
||||||
|
activeColor: Colors.red[800],
|
||||||
|
onChanged: (bool newValue) {
|
||||||
|
setState(() {});
|
||||||
|
}),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 10, vertical: 0),
|
||||||
|
child: Texts('Examinations',
|
||||||
|
variant: "bodyText",
|
||||||
|
bold: true,
|
||||||
|
color: Colors.black),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
DividerWithSpacesAround(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
AppButton(
|
||||||
|
title: "Add SELECTED Examinations".toUpperCase(),
|
||||||
|
onPressed: () {},
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,320 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
|
||||||
|
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
|
|
||||||
|
class PlanPage extends StatefulWidget {
|
||||||
|
final Function changePageViewIndex;
|
||||||
|
|
||||||
|
PlanPage({Key key, this.changePageViewIndex});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_PlanPageState createState() => _PlanPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _PlanPageState extends State<PlanPage> {
|
||||||
|
bool isProgressNoteExpand = false;
|
||||||
|
|
||||||
|
List<dynamic> progressNoteList;
|
||||||
|
|
||||||
|
TextEditingController progressNoteController = TextEditingController();
|
||||||
|
BoxDecoration containerBorderDecoration(
|
||||||
|
Color containerColor, Color borderColor) {
|
||||||
|
return BoxDecoration(
|
||||||
|
color: containerColor,
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(6)),
|
||||||
|
border: Border.fromBorderSide(BorderSide(
|
||||||
|
color: borderColor,
|
||||||
|
width: 0.5,
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final screenSize = MediaQuery.of(context).size;
|
||||||
|
|
||||||
|
return AppScaffold(
|
||||||
|
isShowAppBar: false,
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
physics: ScrollPhysics(),
|
||||||
|
child: Center(
|
||||||
|
child: FractionallySizedBox(
|
||||||
|
widthFactor: 0.9,
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
HeaderBodyExpandableNotifier(
|
||||||
|
headerWidget: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Texts('Progress Note',
|
||||||
|
variant:
|
||||||
|
isProgressNoteExpand ? "bodyText" : '',
|
||||||
|
bold: isProgressNoteExpand ? true : false,
|
||||||
|
color: Colors.black),
|
||||||
|
Icon(
|
||||||
|
FontAwesomeIcons.asterisk,
|
||||||
|
color: AppGlobal.appPrimaryColor,
|
||||||
|
size: 12,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
isProgressNoteExpand =
|
||||||
|
!isProgressNoteExpand;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Icon(isProgressNoteExpand
|
||||||
|
? EvaIcons.minus
|
||||||
|
: EvaIcons.plus))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
bodyWidget: Column(children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin:
|
||||||
|
EdgeInsets.only(left: 10, right: 10, top: 15),
|
||||||
|
child: TextFields(
|
||||||
|
hintText: "Add Progress Note",
|
||||||
|
fontSize: 13.5,
|
||||||
|
onTapTextFields: () {
|
||||||
|
openExaminationList(context);
|
||||||
|
},
|
||||||
|
readOnly: true,
|
||||||
|
// hintColor: Colors.black,
|
||||||
|
suffixIcon: EvaIcons.plusCircleOutline,
|
||||||
|
suffixIconColor: AppGlobal.appPrimaryColor,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
// controller: messageController,
|
||||||
|
validator: (value) {
|
||||||
|
if (value == null)
|
||||||
|
return TranslationBase.of(context)
|
||||||
|
.emptyMessage;
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(left: 5, right: 5, top: 15),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"12".toUpperCase(),
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"DEC".toUpperCase(),
|
||||||
|
fontSize: 10,
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 6,
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(0.0),
|
||||||
|
child: AppText(
|
||||||
|
"Some progress note about",
|
||||||
|
fontSize: 10,
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),SizedBox(
|
||||||
|
height: 8,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"Created By : ",
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"Anas Abdullah on 12 De",
|
||||||
|
fontSize: 10,
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"Edited By : ",
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"Rahim on 13 Dec",
|
||||||
|
fontSize: 10,
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
InkWell(
|
||||||
|
onTap: () {},
|
||||||
|
child: Icon(EvaIcons.edit2Outline),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
]),
|
||||||
|
isExpand: isProgressNoteExpand,
|
||||||
|
),
|
||||||
|
DividerWithSpacesAround(height: 30,),
|
||||||
|
AppButton(
|
||||||
|
title: TranslationBase.of(context).next,
|
||||||
|
onPressed: () {
|
||||||
|
widget.changePageViewIndex(2);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
openExaminationList(BuildContext context) {
|
||||||
|
final screenSize = MediaQuery.of(context).size;
|
||||||
|
InputDecoration textFieldSelectorDecoration(
|
||||||
|
String hintText, String selectedText, bool isDropDown) {
|
||||||
|
return InputDecoration(
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
disabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
hintText: selectedText != null ? selectedText : hintText,
|
||||||
|
suffixIcon: isDropDown ? Icon(Icons.arrow_drop_down) : null,
|
||||||
|
hintStyle: TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
color: Colors.grey.shade600,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
;
|
||||||
|
showModalBottomSheet(
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
isScrollControlled: true,
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return FractionallySizedBox(
|
||||||
|
heightFactor: 0.5,
|
||||||
|
child: Container(
|
||||||
|
child: FractionallySizedBox(
|
||||||
|
widthFactor: 0.9,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"Add Progress Note",
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(left: 0, right: 0, top: 15),
|
||||||
|
child: TextFields(
|
||||||
|
hintText: "Remarks",
|
||||||
|
fontSize: 13.5,
|
||||||
|
// hintColor: Colors.black,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
maxLines: 16,
|
||||||
|
minLines: 8,
|
||||||
|
controller: progressNoteController,
|
||||||
|
validator: (value) {
|
||||||
|
if (value == null)
|
||||||
|
return TranslationBase.of(context).emptyMessage;
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
}),
|
||||||
|
),SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
AppButton(
|
||||||
|
title: "Add".toUpperCase(),
|
||||||
|
onPressed: () {
|
||||||
|
},
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,447 @@
|
|||||||
|
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
class StepsWidget extends StatelessWidget {
|
||||||
|
final int index;
|
||||||
|
final Function changeCurrentTab;
|
||||||
|
|
||||||
|
StepsWidget({Key key, this.index, this.changeCurrentTab});
|
||||||
|
|
||||||
|
// TODO : Add translation to name
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
ProjectViewModel projectViewModel = Provider.of(context);
|
||||||
|
return !projectViewModel.isArabic
|
||||||
|
? Stack(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
height: 120,
|
||||||
|
width: MediaQuery.of(context).size.width,
|
||||||
|
color: Colors.transparent,
|
||||||
|
child: Center(
|
||||||
|
child: Divider(
|
||||||
|
color: Colors.grey,
|
||||||
|
height: 0.75,
|
||||||
|
thickness: 0.75,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
top: index == 0 ? 15 : 30,
|
||||||
|
left: 0,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () => changeCurrentTab(0),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: index == 0 ? 70 : 50,
|
||||||
|
height: index == 0 ? 70 : 50,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: index == 0
|
||||||
|
? Border.all(color: Color(0xFFB9382C), width: 2)
|
||||||
|
: index > 0
|
||||||
|
? null
|
||||||
|
: Border.all(
|
||||||
|
color: Colors.black, width: 0.75),
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
color: index == 0
|
||||||
|
? Colors.white
|
||||||
|
: index > 0
|
||||||
|
? Color(0xFFB9382C)
|
||||||
|
: Color(0xFFCCCCCC),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
'1',
|
||||||
|
variant: index == 0 ? "heading2" : "",
|
||||||
|
bold: true,
|
||||||
|
color: index == 0
|
||||||
|
? Colors.black
|
||||||
|
: index > 0
|
||||||
|
? Colors.white
|
||||||
|
: Colors.grey,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: index == 0 ? 5 : 10,
|
||||||
|
),
|
||||||
|
Texts('SUBJECTIVE',
|
||||||
|
variant: "bodyText",
|
||||||
|
bold: true,
|
||||||
|
color: Colors.black),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
top: index == 1 ? 15 : 30,
|
||||||
|
left: MediaQuery.of(context).size.width * 0.28,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () => index >= 2 ? changeCurrentTab(1) : null,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: index == 1 ? 70 : 50,
|
||||||
|
height: index == 1 ? 70 : 50,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: index == 1
|
||||||
|
? Border.all(color: Color(0xFFB9382C), width: 2)
|
||||||
|
: index > 2
|
||||||
|
? null
|
||||||
|
: Border.all(
|
||||||
|
color: Color(0xFFCCCCCC), width: 0.75),
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
color: index == 1
|
||||||
|
? Colors.white
|
||||||
|
: index > 1
|
||||||
|
? Color(0xFFB9382C)
|
||||||
|
: Color(0xFFCCCCCC),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
'2',
|
||||||
|
variant: index == 1 ? "heading2" : '',
|
||||||
|
bold: true,
|
||||||
|
color: index == 1
|
||||||
|
? Colors.black
|
||||||
|
: index > 1
|
||||||
|
? Colors.white
|
||||||
|
: Colors.grey,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: index == 1 ? 5 : 10,
|
||||||
|
),
|
||||||
|
Texts('OBJECTIVE',
|
||||||
|
variant: "bodyText",
|
||||||
|
bold: true,
|
||||||
|
color: Colors.black),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
top: index == 2 ? 15 : 30,
|
||||||
|
left: MediaQuery.of(context).size.width * 0.52,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () => index >= 2 ? changeCurrentTab(3) : null,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: index == 2 ? 70 : 50,
|
||||||
|
height: index == 2 ? 70 : 50,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: index == 2
|
||||||
|
? Border.all(color: Color(0xFFB9382C), width: 2)
|
||||||
|
: index > 2
|
||||||
|
? null
|
||||||
|
: Border.all(
|
||||||
|
color: Color(0xFFCCCCCC), width: 0.75),
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
color: index == 2
|
||||||
|
? Colors.white
|
||||||
|
: index > 2
|
||||||
|
? Color(0xFFB9382C)
|
||||||
|
: Color(0xFFCCCCCC),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
'3',
|
||||||
|
variant: index == 2 ? "heading2" : '',
|
||||||
|
bold: true,
|
||||||
|
color: index == 2
|
||||||
|
? Colors.black
|
||||||
|
: index > 2
|
||||||
|
? Colors.white
|
||||||
|
: Colors.grey,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: index == 2 ? 5 : 10,
|
||||||
|
),
|
||||||
|
Texts('ASSESSMENT',
|
||||||
|
variant: "bodyText",
|
||||||
|
bold: true,
|
||||||
|
color: Colors.black),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
top: index == 3 ? 15 : 30,
|
||||||
|
right: 0,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () => index >= 3 ? changeCurrentTab(4) : null,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: index == 3 ? 70 : 50,
|
||||||
|
height: index == 3 ? 70 : 50,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: index == 3
|
||||||
|
? Border.all(color: Color(0xFFB9382C), width: 2)
|
||||||
|
: index > 3
|
||||||
|
? null
|
||||||
|
: Border.all(
|
||||||
|
color: Color(0xFFCCCCCC), width: 0.75),
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
color: index == 3
|
||||||
|
? Colors.white
|
||||||
|
: index > 3
|
||||||
|
? Color(0xFFB9382C)
|
||||||
|
: Color(0xFFCCCCCC),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
'4',
|
||||||
|
variant: index == 3 ? "heading2" : '',
|
||||||
|
bold: true,
|
||||||
|
color: index == 3
|
||||||
|
? Colors.black
|
||||||
|
: index > 3
|
||||||
|
? Colors.white
|
||||||
|
: Colors.grey,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: index == 3 ? 5 : 10,
|
||||||
|
),
|
||||||
|
Texts('PLAN',
|
||||||
|
variant: "bodyText",
|
||||||
|
bold: true,
|
||||||
|
color: Colors.black),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
: Stack(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
height: 120,
|
||||||
|
width: MediaQuery.of(context).size.width,
|
||||||
|
color: Colors.transparent,
|
||||||
|
child: Center(
|
||||||
|
child: Divider(
|
||||||
|
color: Colors.grey,
|
||||||
|
height: 0.75,
|
||||||
|
thickness: 0.75,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
top: index == 0 ? 15 : 30,
|
||||||
|
right: 0,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () => changeCurrentTab(0),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: index == 0 ? 70 : 50,
|
||||||
|
height: index == 0 ? 70 : 50,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: index == 0
|
||||||
|
? Border.all(color: Color(0xFFB9382C), width: 2)
|
||||||
|
: index > 0
|
||||||
|
? null
|
||||||
|
: Border.all(
|
||||||
|
color: Colors.black, width: 0.75),
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
color: index == 0
|
||||||
|
? Colors.white
|
||||||
|
: index > 0
|
||||||
|
? Color(0xFFB9382C)
|
||||||
|
: Color(0xFFCCCCCC),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
'1',
|
||||||
|
variant: index == 0 ? "heading2" : "",
|
||||||
|
bold: true,
|
||||||
|
color: index == 0
|
||||||
|
? Colors.black
|
||||||
|
: index > 0
|
||||||
|
? Colors.white
|
||||||
|
: Colors.grey,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: index == 0 ? 5 : 10,
|
||||||
|
),
|
||||||
|
Texts('SUBJECTIVE',
|
||||||
|
variant: "bodyText",
|
||||||
|
bold: true,
|
||||||
|
color: Colors.black),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
top: index == 1 ? 15 : 30,
|
||||||
|
right: MediaQuery.of(context).size.width * 0.28,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () => index >= 2 ? changeCurrentTab(1) : null,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: index == 1 ? 70 : 50,
|
||||||
|
height: index == 1 ? 70 : 50,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: index == 1
|
||||||
|
? Border.all(color: Color(0xFFB9382C), width: 2)
|
||||||
|
: index > 2
|
||||||
|
? null
|
||||||
|
: Border.all(
|
||||||
|
color: Color(0xFFCCCCCC), width: 0.75),
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
color: index == 1
|
||||||
|
? Colors.white
|
||||||
|
: index > 1
|
||||||
|
? Color(0xFFB9382C)
|
||||||
|
: Color(0xFFCCCCCC),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
'2',
|
||||||
|
variant: index == 1 ? "heading2" : '',
|
||||||
|
bold: true,
|
||||||
|
color: index == 1
|
||||||
|
? Colors.black
|
||||||
|
: index > 1
|
||||||
|
? Colors.white
|
||||||
|
: Colors.grey,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: index == 1 ? 5 : 10,
|
||||||
|
),
|
||||||
|
Texts('OBJECTIVE',
|
||||||
|
variant: "bodyText",
|
||||||
|
bold: true,
|
||||||
|
color: Colors.black),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
top: index == 2 ? 15 : 30,
|
||||||
|
right: MediaQuery.of(context).size.width * 0.52,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () => index >= 2 ? changeCurrentTab(3) : null,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: index == 2 ? 70 : 50,
|
||||||
|
height: index == 2 ? 70 : 50,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: index == 2
|
||||||
|
? Border.all(color: Color(0xFFB9382C), width: 2)
|
||||||
|
: index > 2
|
||||||
|
? null
|
||||||
|
: Border.all(
|
||||||
|
color: Color(0xFFCCCCCC), width: 0.75),
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
color: index == 2
|
||||||
|
? Colors.white
|
||||||
|
: index > 2
|
||||||
|
? Color(0xFFB9382C)
|
||||||
|
: Color(0xFFCCCCCC),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
'3',
|
||||||
|
variant: index == 2 ? "heading2" : '',
|
||||||
|
bold: true,
|
||||||
|
color: index == 2
|
||||||
|
? Colors.black
|
||||||
|
: index > 2
|
||||||
|
? Colors.white
|
||||||
|
: Colors.grey,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: index == 2 ? 5 : 10,
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
|
||||||
|
padding: const EdgeInsets.only(right: 2),
|
||||||
|
child: Texts('ASSESSMENT',
|
||||||
|
variant: "bodyText",
|
||||||
|
bold: true,
|
||||||
|
color: Colors.black),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
top: index == 3 ? 15 : 30,
|
||||||
|
left: 0,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () => index >= 3 ? changeCurrentTab(4) : null,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: index == 3 ? 70 : 50,
|
||||||
|
height: index == 3 ? 70 : 50,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: index == 3
|
||||||
|
? Border.all(color: Color(0xFFB9382C), width: 2)
|
||||||
|
: index > 3
|
||||||
|
? null
|
||||||
|
: Border.all(
|
||||||
|
color: Color(0xFFCCCCCC), width: 0.75),
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
color: index == 3
|
||||||
|
? Colors.white
|
||||||
|
: index > 3
|
||||||
|
? Color(0xFFB9382C)
|
||||||
|
: Color(0xFFCCCCCC),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
'4',
|
||||||
|
variant: index == 3 ? "heading2" : '',
|
||||||
|
bold: true,
|
||||||
|
color: index == 3
|
||||||
|
? Colors.black
|
||||||
|
: index > 3
|
||||||
|
? Colors.white
|
||||||
|
: Colors.grey,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: index == 3 ? 5 : 10,
|
||||||
|
),
|
||||||
|
Texts('PLAN',
|
||||||
|
variant: "bodyText",
|
||||||
|
bold: true,
|
||||||
|
color: Colors.black),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,343 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/dialogs/master_key_dailog.dart';
|
||||||
|
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
|
|
||||||
|
class AddAllergiesWidget extends StatefulWidget {
|
||||||
|
final List<MySelectedAllergy> myAllergiesList;
|
||||||
|
|
||||||
|
AddAllergiesWidget({Key key, this.myAllergiesList});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_AddAllergiesWidgetState createState() => _AddAllergiesWidgetState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AddAllergiesWidgetState extends State<AddAllergiesWidget> {
|
||||||
|
|
||||||
|
TextEditingController remarkController = TextEditingController();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final screenSize = MediaQuery.of(context).size;
|
||||||
|
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
|
||||||
|
child: TextFields(
|
||||||
|
hintText: "Add Allergies",
|
||||||
|
fontSize: 13.5,
|
||||||
|
onTapTextFields: () {
|
||||||
|
openAllergiesList(context);
|
||||||
|
},
|
||||||
|
readOnly: true,
|
||||||
|
// hintColor: Colors.black,
|
||||||
|
suffixIcon: EvaIcons.plusCircleOutline,
|
||||||
|
suffixIconColor: AppGlobal.appPrimaryColor,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
// controller: messageController,
|
||||||
|
validator: (value) {
|
||||||
|
if (value == null)
|
||||||
|
return TranslationBase
|
||||||
|
.of(context)
|
||||||
|
.emptyMessage;
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin:
|
||||||
|
EdgeInsets.only(left: 15, right: 15, top: 15),
|
||||||
|
child: Column(
|
||||||
|
children: widget.myAllergiesList.map((selectedAllergy) {
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Texts(selectedAllergy.selectedAllergy.nameEn.toUpperCase(),
|
||||||
|
variant: "bodyText", bold: true, color: Colors.black),
|
||||||
|
Texts(
|
||||||
|
selectedAllergy.selectedAllergySeverity.nameEn
|
||||||
|
.toUpperCase(),
|
||||||
|
variant: "bodyText",
|
||||||
|
bold: true,
|
||||||
|
color: AppGlobal.appPrimaryColor),
|
||||||
|
InkWell(
|
||||||
|
child: Icon(
|
||||||
|
FontAwesomeIcons.trash,
|
||||||
|
color: Colors.grey,
|
||||||
|
size: 20,
|
||||||
|
),
|
||||||
|
onTap: () => removeAllergy(selectedAllergy),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}).toList()),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
removeAllergy(MySelectedAllergy mySelectedAllergy) {
|
||||||
|
Iterable<MySelectedAllergy> allergy =
|
||||||
|
widget.myAllergiesList.where((element) => mySelectedAllergy == element);
|
||||||
|
|
||||||
|
if (allergy.length > 0)
|
||||||
|
setState(() {
|
||||||
|
widget.myAllergiesList.remove(allergy.first);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
openAllergiesList(BuildContext context) {
|
||||||
|
showModalBottomSheet(
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
isScrollControlled: true,
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return AddAllergies(
|
||||||
|
addAllergiesFun: (MySelectedAllergy mySelectedAllergy) {
|
||||||
|
setState(() {
|
||||||
|
widget.myAllergiesList.add(mySelectedAllergy);
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
});
|
||||||
|
},);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class AddAllergies extends StatefulWidget {
|
||||||
|
final Function addAllergiesFun;
|
||||||
|
|
||||||
|
const AddAllergies({Key key, this.addAllergiesFun}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_AddAllergiesState createState() => _AddAllergiesState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AddAllergiesState extends State<AddAllergies> {
|
||||||
|
List<MasterKeyModel> allergiesList;
|
||||||
|
List<MasterKeyModel> allergySeverityList;
|
||||||
|
MasterKeyModel _selectedAllergySeverity;
|
||||||
|
MasterKeyModel _selectedAllergy;
|
||||||
|
TextEditingController remarkController = TextEditingController();
|
||||||
|
|
||||||
|
|
||||||
|
InputDecoration textFieldSelectorDecoration(String hintText,
|
||||||
|
String selectedText, bool isDropDown) {
|
||||||
|
return InputDecoration(
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
disabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
hintText: selectedText != null ? selectedText : hintText,
|
||||||
|
suffixIcon: isDropDown ? Icon(Icons.arrow_drop_down) : null,
|
||||||
|
hintStyle: TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
color: Colors.grey.shade600,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final screenSize = MediaQuery
|
||||||
|
.of(context)
|
||||||
|
.size;
|
||||||
|
return FractionallySizedBox(
|
||||||
|
heightFactor: 0.7,
|
||||||
|
child: BaseView<SOAPViewModel>(
|
||||||
|
onModelReady: (model) async {
|
||||||
|
if (model.listOfAllergies.length == 0) {
|
||||||
|
await model.getMasterLookup(MasterKeysService.Allergies);
|
||||||
|
}
|
||||||
|
if (model.allergySeverityList.length == 0) {
|
||||||
|
await model.getMasterLookup(MasterKeysService.AllergySeverity);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
builder: (_, model, w) =>
|
||||||
|
AppScaffold(
|
||||||
|
baseViewModel: model,
|
||||||
|
isShowAppBar: false,
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
child: Center(
|
||||||
|
child: FractionallySizedBox(
|
||||||
|
widthFactor: 0.9,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"Add Allergy",
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: screenSize.height * 0.070,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: model.listOfAllergies != null
|
||||||
|
? () {
|
||||||
|
MasterKeyDailog dialog = MasterKeyDailog(
|
||||||
|
list: model.listOfAllergies,
|
||||||
|
okText: TranslationBase
|
||||||
|
.of(context)
|
||||||
|
.ok,
|
||||||
|
okFunction: (MasterKeyModel selectedValue) {
|
||||||
|
setState(() {
|
||||||
|
_selectedAllergy = selectedValue;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
showDialog(
|
||||||
|
barrierDismissible: false,
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return dialog;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
: null,
|
||||||
|
child: TextField(
|
||||||
|
decoration: textFieldSelectorDecoration(
|
||||||
|
"Select Allergy",
|
||||||
|
_selectedAllergy != null
|
||||||
|
? _selectedAllergy.nameEn
|
||||||
|
: null,
|
||||||
|
true),
|
||||||
|
enabled: false,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
), Container(
|
||||||
|
height: screenSize.height * 0.070,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: model.allergySeverityList != null
|
||||||
|
? () {
|
||||||
|
MasterKeyDailog dialog = MasterKeyDailog(
|
||||||
|
list: model.allergySeverityList,
|
||||||
|
okText: TranslationBase
|
||||||
|
.of(context)
|
||||||
|
.ok,
|
||||||
|
okFunction: (selectedValue) {
|
||||||
|
setState(() {
|
||||||
|
_selectedAllergySeverity =
|
||||||
|
selectedValue;
|
||||||
|
// model.getDoctorBranch().then((value) {
|
||||||
|
// _selectedBranch = value;
|
||||||
|
// if (_referTo['id'] == 1) {
|
||||||
|
// model.getClinics(
|
||||||
|
// _selectedBranch['ID']);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
showDialog(
|
||||||
|
barrierDismissible: false,
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return dialog;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
: null,
|
||||||
|
child: TextField(
|
||||||
|
decoration: textFieldSelectorDecoration(
|
||||||
|
"Select Severity",
|
||||||
|
_selectedAllergySeverity != null
|
||||||
|
? _selectedAllergySeverity.nameEn
|
||||||
|
: null,
|
||||||
|
true),
|
||||||
|
enabled: false,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
left: 0, right: 0, top: 15),
|
||||||
|
child: TextFields(
|
||||||
|
hintText: "Remarks",
|
||||||
|
fontSize: 13.5,
|
||||||
|
// hintColor: Colors.black,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
maxLines: 25,
|
||||||
|
minLines: 13,
|
||||||
|
controller: remarkController,
|
||||||
|
validator: (value) {
|
||||||
|
if (value == null)
|
||||||
|
return TranslationBase
|
||||||
|
.of(context)
|
||||||
|
.emptyMessage;
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
}),
|
||||||
|
), SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
AppButton(
|
||||||
|
title: "Add".toUpperCase(),
|
||||||
|
onPressed: () {
|
||||||
|
MySelectedAllergy mySelectedAllergy = new MySelectedAllergy(
|
||||||
|
remark: remarkController.text,
|
||||||
|
selectedAllergy: _selectedAllergy,
|
||||||
|
selectedAllergySeverity: _selectedAllergySeverity);
|
||||||
|
widget.addAllergiesFun(mySelectedAllergy);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
]
|
||||||
|
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,574 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
|
||||||
|
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
|
import 'package:hexcolor/hexcolor.dart';
|
||||||
|
|
||||||
|
class AddHistoryWidget extends StatefulWidget {
|
||||||
|
final List<MasterKeyModel> myHistoryList;
|
||||||
|
|
||||||
|
const AddHistoryWidget({Key key, this.myHistoryList}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_AddHistoryWidgetState createState() => _AddHistoryWidgetState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AddHistoryWidgetState extends State<AddHistoryWidget>
|
||||||
|
with TickerProviderStateMixin {
|
||||||
|
PageController _controller;
|
||||||
|
int _currentIndex = 0;
|
||||||
|
|
||||||
|
changePageViewIndex(pageIndex) {
|
||||||
|
_controller.jumpToPage(pageIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
_controller = new PageController();
|
||||||
|
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
|
||||||
|
child: TextFields(
|
||||||
|
hintText: "Add History",
|
||||||
|
fontSize: 13.5,
|
||||||
|
onTapTextFields: () {
|
||||||
|
openHistoryList(context);
|
||||||
|
},
|
||||||
|
readOnly: true,
|
||||||
|
// hintColor: Colors.black,
|
||||||
|
suffixIcon: EvaIcons.plusCircleOutline,
|
||||||
|
suffixIconColor: AppGlobal.appPrimaryColor,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
// controller: messageController,
|
||||||
|
validator: (value) {
|
||||||
|
if (value == null)
|
||||||
|
return TranslationBase.of(context)
|
||||||
|
.emptyMessage;
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin:
|
||||||
|
EdgeInsets.only(left: 15, right: 15, top: 15),
|
||||||
|
child: Column(
|
||||||
|
children: widget.myHistoryList.map((myHistory) {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Texts(myHistory.nameEn,
|
||||||
|
variant: "bodyText", bold: true, color: Colors.black),
|
||||||
|
InkWell(
|
||||||
|
child: Icon(
|
||||||
|
FontAwesomeIcons.trash,
|
||||||
|
color: Colors.grey,
|
||||||
|
size: 20,
|
||||||
|
),
|
||||||
|
onTap: () => removeHistory(myHistory),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
removeHistory(MasterKeyModel masterKey) {
|
||||||
|
Iterable<MasterKeyModel> history = widget.myHistoryList.where((element) =>
|
||||||
|
masterKey.id == element.id && masterKey.typeId == element.typeId);
|
||||||
|
|
||||||
|
if (history.length > 0)
|
||||||
|
setState(() {
|
||||||
|
widget.myHistoryList.remove(history.first);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
openHistoryList(BuildContext context) {
|
||||||
|
showModalBottomSheet(
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
isScrollControlled: true,
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return AddHistoryDialog(
|
||||||
|
changePageViewIndex: changePageViewIndex,
|
||||||
|
controller: _controller,
|
||||||
|
myHistoryList: widget.myHistoryList,
|
||||||
|
addSelectedHistories: () {
|
||||||
|
setState(() {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
removeHistory: (masterKey) => removeHistory(masterKey),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class PriorityBar extends StatefulWidget {
|
||||||
|
final Function onTap;
|
||||||
|
|
||||||
|
const PriorityBar({Key key, this.onTap}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_PriorityBarState createState() => _PriorityBarState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _PriorityBarState extends State<PriorityBar> {
|
||||||
|
int _activePriority = 0;
|
||||||
|
|
||||||
|
List<String> _priorities = [
|
||||||
|
"Family",
|
||||||
|
"Surgical/Sports",
|
||||||
|
"Medical",
|
||||||
|
];
|
||||||
|
|
||||||
|
BoxDecoration containerBorderDecoration(
|
||||||
|
Color containerColor, Color borderColor) {
|
||||||
|
return BoxDecoration(
|
||||||
|
color: containerColor,
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(6)),
|
||||||
|
border: Border.fromBorderSide(BorderSide(
|
||||||
|
color: borderColor,
|
||||||
|
width: 2.0,
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final screenSize = MediaQuery.of(context).size;
|
||||||
|
|
||||||
|
return Container(
|
||||||
|
height: screenSize.height * 0.070,
|
||||||
|
decoration:
|
||||||
|
containerBorderDecoration(Color(0Xffffffff), Color(0xFFCCCCCC)),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: _priorities.map((item) {
|
||||||
|
bool _isActive = _priorities[_activePriority] == item ? true : false;
|
||||||
|
return Expanded(
|
||||||
|
child: InkWell(
|
||||||
|
child: Center(
|
||||||
|
child: Container(
|
||||||
|
height: screenSize.height * 0.070,
|
||||||
|
decoration: containerBorderDecoration(
|
||||||
|
_isActive ? HexColor("#B8382B") : Colors.white,
|
||||||
|
_isActive ? HexColor("#B8382B") : Colors.white),
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
item,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 12,
|
||||||
|
color: _isActive
|
||||||
|
? Colors.white
|
||||||
|
: Colors.black, //Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
widget.onTap(_priorities.indexOf(item));
|
||||||
|
|
||||||
|
setState(() {
|
||||||
|
_activePriority = _priorities.indexOf(item);
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class AddHistoryDialog extends StatefulWidget {
|
||||||
|
final Function changePageViewIndex;
|
||||||
|
final PageController controller;
|
||||||
|
final List<MasterKeyModel> myHistoryList;
|
||||||
|
final Function addSelectedHistories;
|
||||||
|
final Function (MasterKeyModel) removeHistory;
|
||||||
|
|
||||||
|
const AddHistoryDialog(
|
||||||
|
{Key key, this.changePageViewIndex, this.controller, this.myHistoryList, this.addSelectedHistories, this.removeHistory})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_AddHistoryDialogState createState() => _AddHistoryDialogState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AddHistoryDialogState extends State<AddHistoryDialog> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return FractionallySizedBox(
|
||||||
|
heightFactor: 0.7,
|
||||||
|
child: BaseView<SOAPViewModel>(
|
||||||
|
onModelReady: (model) async {
|
||||||
|
if (model.historyFamilyList.length == 0) {
|
||||||
|
await model.getMasterLookup(MasterKeysService.HistoryFamily);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
builder: (_, model, w) => AppScaffold(
|
||||||
|
// baseViewModel: model,
|
||||||
|
isShowAppBar: false,
|
||||||
|
body: Center(
|
||||||
|
child: Container(
|
||||||
|
child: FractionallySizedBox(
|
||||||
|
widthFactor: 0.9,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
PriorityBar(onTap: (activePriority) async {
|
||||||
|
widget.changePageViewIndex(activePriority);
|
||||||
|
if(activePriority ==1) {
|
||||||
|
if (model.historySurgicalList.length == 0) {
|
||||||
|
await model.getMasterLookup(MasterKeysService.HistorySurgical);
|
||||||
|
await model.getMasterLookup(MasterKeysService.HistorySports);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(activePriority ==2) {
|
||||||
|
if (model.historyMedicalList.length == 0) {
|
||||||
|
await model.getMasterLookup(MasterKeysService.HistoryMedical);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: PageView(
|
||||||
|
physics: NeverScrollableScrollPhysics(),
|
||||||
|
controller: widget.controller,
|
||||||
|
onPageChanged: (index) {
|
||||||
|
setState(() {
|
||||||
|
// currentIndex = index;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
scrollDirection: Axis.horizontal,
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
NetworkBaseView(
|
||||||
|
baseViewModel: model,
|
||||||
|
child: Container(
|
||||||
|
height:
|
||||||
|
MediaQuery.of(context).size.height * 0.5,
|
||||||
|
child: Center(
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(top: 15),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
color: Colors.white),
|
||||||
|
child: ListView(
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
children: model.historyFamilyList
|
||||||
|
.map((historyInfo) {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Checkbox(
|
||||||
|
value: isServiceSelected(
|
||||||
|
historyInfo),
|
||||||
|
activeColor:
|
||||||
|
Colors.red[800],
|
||||||
|
onChanged:
|
||||||
|
(bool newValue) {
|
||||||
|
setState(() {
|
||||||
|
if (isServiceSelected(
|
||||||
|
historyInfo
|
||||||
|
)) {
|
||||||
|
widget
|
||||||
|
.removeHistory(
|
||||||
|
historyInfo
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
widget
|
||||||
|
.myHistoryList
|
||||||
|
.add(
|
||||||
|
historyInfo);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding:
|
||||||
|
const EdgeInsets
|
||||||
|
.symmetric(
|
||||||
|
horizontal: 10,
|
||||||
|
vertical: 0),
|
||||||
|
child: Texts(
|
||||||
|
historyInfo.nameEn,
|
||||||
|
variant: "bodyText",
|
||||||
|
bold: true,
|
||||||
|
color:
|
||||||
|
Colors.black),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
DividerWithSpacesAround(),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
if (model.state == ViewState.Idle)
|
||||||
|
AppButton(
|
||||||
|
title: "Add SELECTED HISTORIES"
|
||||||
|
.toUpperCase(),
|
||||||
|
onPressed: () {
|
||||||
|
widget.addSelectedHistories();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
NetworkBaseView(
|
||||||
|
baseViewModel: model,
|
||||||
|
child: Container(
|
||||||
|
height:
|
||||||
|
MediaQuery.of(context).size.height * 0.5,
|
||||||
|
child: Center(
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(top: 15),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
color: Colors.white),
|
||||||
|
child: ListView(
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
children: model.mergeHistorySurgicalWithHistorySportList
|
||||||
|
.map((historyInfo) {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Checkbox(
|
||||||
|
value: isServiceSelected(
|
||||||
|
historyInfo),
|
||||||
|
activeColor:
|
||||||
|
Colors.red[800],
|
||||||
|
onChanged:
|
||||||
|
(
|
||||||
|
bool newValue) {
|
||||||
|
setState(() {
|
||||||
|
if (isServiceSelected(
|
||||||
|
historyInfo
|
||||||
|
)) {
|
||||||
|
widget
|
||||||
|
.removeHistory(
|
||||||
|
historyInfo
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
widget
|
||||||
|
.myHistoryList
|
||||||
|
.add(
|
||||||
|
historyInfo);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding:
|
||||||
|
const EdgeInsets
|
||||||
|
.symmetric(
|
||||||
|
horizontal: 10,
|
||||||
|
vertical: 0),
|
||||||
|
child: Texts(
|
||||||
|
historyInfo.nameEn,
|
||||||
|
variant: "bodyText",
|
||||||
|
bold: true,
|
||||||
|
color:
|
||||||
|
Colors.black),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
DividerWithSpacesAround(),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
if (model.state == ViewState.Idle)
|
||||||
|
AppButton(
|
||||||
|
title: "Add SELECTED HISTORIES"
|
||||||
|
.toUpperCase(),
|
||||||
|
onPressed: () {
|
||||||
|
widget.addSelectedHistories();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
NetworkBaseView(
|
||||||
|
baseViewModel: model,
|
||||||
|
child: Container(
|
||||||
|
height:
|
||||||
|
MediaQuery.of(context).size.height * 0.5,
|
||||||
|
child: Center(
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(top: 15),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
color: Colors.white),
|
||||||
|
child: ListView(
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
children: model.historyMedicalList
|
||||||
|
.map((historyInfo) {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Checkbox(
|
||||||
|
value: isServiceSelected(
|
||||||
|
historyInfo),
|
||||||
|
activeColor:
|
||||||
|
Colors.red[800],
|
||||||
|
onChanged:
|
||||||
|
(
|
||||||
|
bool newValue) {
|
||||||
|
setState(() {
|
||||||
|
if (isServiceSelected(
|
||||||
|
historyInfo
|
||||||
|
)) {
|
||||||
|
widget
|
||||||
|
.removeHistory(
|
||||||
|
historyInfo
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
widget
|
||||||
|
.myHistoryList
|
||||||
|
.add(
|
||||||
|
historyInfo);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding:
|
||||||
|
const EdgeInsets
|
||||||
|
.symmetric(
|
||||||
|
horizontal: 10,
|
||||||
|
vertical: 0),
|
||||||
|
child: Texts(
|
||||||
|
historyInfo.nameEn,
|
||||||
|
variant: "bodyText",
|
||||||
|
bold: true,
|
||||||
|
color:
|
||||||
|
Colors.black),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
DividerWithSpacesAround(),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
if (model.state == ViewState.Idle)
|
||||||
|
AppButton(
|
||||||
|
title: "Add SELECTED HISTORIES"
|
||||||
|
.toUpperCase(),
|
||||||
|
onPressed: () {
|
||||||
|
setState(() {
|
||||||
|
widget.addSelectedHistories();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
isServiceSelected(MasterKeyModel masterKey) {
|
||||||
|
Iterable<MasterKeyModel> history =
|
||||||
|
widget
|
||||||
|
.myHistoryList
|
||||||
|
.where((element) =>
|
||||||
|
masterKey.id == element.id && masterKey.typeId == element.typeId);
|
||||||
|
if (history.length > 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,107 @@
|
|||||||
|
|
||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
|
||||||
|
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
|
|
||||||
|
class AddMedication extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
_AddMedicationState createState() => _AddMedicationState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AddMedicationState extends State<AddMedication> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin:
|
||||||
|
EdgeInsets.only(left: 10, right: 10, top: 15),
|
||||||
|
child: TextFields(
|
||||||
|
hintText: "Current Medications",
|
||||||
|
fontSize: 13.5,
|
||||||
|
onTapTextFields: () {
|
||||||
|
openMedicationsList(context);
|
||||||
|
},
|
||||||
|
readOnly: true,
|
||||||
|
// hintColor: Colors.black,
|
||||||
|
suffixIcon: EvaIcons.plusCircleOutline,
|
||||||
|
suffixIconColor: AppGlobal.appPrimaryColor,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
// controller: messageController,
|
||||||
|
validator: (value) {
|
||||||
|
if (value == null)
|
||||||
|
return TranslationBase.of(context)
|
||||||
|
.emptyMessage;
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin:
|
||||||
|
EdgeInsets.only(left: 15, right: 15, top: 15),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Texts('Abdomen Pain',
|
||||||
|
variant: "bodyText",
|
||||||
|
bold: true,
|
||||||
|
color: Colors.black),
|
||||||
|
Icon(
|
||||||
|
FontAwesomeIcons.trash,
|
||||||
|
color: Colors.grey,
|
||||||
|
size: 20,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Texts('Back Pain',
|
||||||
|
variant: "bodyText",
|
||||||
|
bold: true,
|
||||||
|
color: Colors.black),
|
||||||
|
Icon(
|
||||||
|
FontAwesomeIcons.trash,
|
||||||
|
color: Colors.grey,
|
||||||
|
size: 20,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
openMedicationsList(BuildContext context) {
|
||||||
|
showModalBottomSheet(
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
isScrollControlled: true,
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return FractionallySizedBox(
|
||||||
|
heightFactor: 0.7,
|
||||||
|
child: Container(
|
||||||
|
child: Center(
|
||||||
|
child: Texts("dfdfd"),
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,300 @@
|
|||||||
|
import 'package:doctor_app_flutter/client/base_app_client.dart';
|
||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/post_allergy_request_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/subjective/add_allergies_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/subjective/add_history_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/subjective/add_medication_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
|
||||||
|
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
|
|
||||||
|
class SubjectivePage extends StatefulWidget {
|
||||||
|
final Function changePageViewIndex;
|
||||||
|
final List<MySelectedAllergy> myAllergiesList;
|
||||||
|
final List<MasterKeyModel> myHistoryList ;
|
||||||
|
|
||||||
|
SubjectivePage({Key key, this.changePageViewIndex, this.myAllergiesList, this.myHistoryList});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_SubjectivePageState createState() => _SubjectivePageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _SubjectivePageState extends State<SubjectivePage> {
|
||||||
|
bool isChiefExpand = false;
|
||||||
|
bool isHistoryExpand = false;
|
||||||
|
bool isAllergiesExpand = false;
|
||||||
|
List<MasterKeyModel> myHistoryList = List();
|
||||||
|
TextEditingController illnessController = TextEditingController();
|
||||||
|
TextEditingController complaintsController = TextEditingController();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BaseView<SOAPViewModel>(
|
||||||
|
// onModelReady: (model) => model.getMasterLookup(MasterKeysService.Allergies),
|
||||||
|
builder: (_, model, w) => AppScaffold(
|
||||||
|
isShowAppBar: false,
|
||||||
|
baseViewModel: model,
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
physics: ScrollPhysics(),
|
||||||
|
child: Center(
|
||||||
|
child: FractionallySizedBox(
|
||||||
|
widthFactor: 0.9,
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
HeaderBodyExpandableNotifier(
|
||||||
|
headerWidget: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Texts('CHIEF COMPLAINTS',
|
||||||
|
variant: isChiefExpand ? "bodyText" : '',
|
||||||
|
bold: isChiefExpand ? true : false,
|
||||||
|
color: Colors.black),
|
||||||
|
Icon(
|
||||||
|
FontAwesomeIcons.asterisk,
|
||||||
|
color: AppGlobal.appPrimaryColor,
|
||||||
|
size: 12,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
isChiefExpand = !isChiefExpand;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Icon(
|
||||||
|
isChiefExpand ? EvaIcons.minus : EvaIcons.plus))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
bodyWidget: Column(children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
|
||||||
|
child: TextFields(
|
||||||
|
hintText: "Add Chief Complaints",
|
||||||
|
fontSize: 13.5,
|
||||||
|
// hintColor: Colors.black,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
maxLines: 25,
|
||||||
|
minLines: 13,
|
||||||
|
controller: complaintsController,
|
||||||
|
validator: (value) {
|
||||||
|
if (value == null)
|
||||||
|
return TranslationBase
|
||||||
|
.of(context)
|
||||||
|
.emptyMessage;
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
|
||||||
|
child: TextFields(
|
||||||
|
hintText: "History of Present Illness",
|
||||||
|
fontSize: 13.5,
|
||||||
|
// hintColor: Colors.black,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
maxLines: 25,
|
||||||
|
minLines: 13,
|
||||||
|
controller: illnessController,
|
||||||
|
validator: (value) {
|
||||||
|
if (value == null)
|
||||||
|
return TranslationBase
|
||||||
|
.of(context)
|
||||||
|
.emptyMessage;
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
AddMedication(),
|
||||||
|
]),
|
||||||
|
isExpand: isChiefExpand,
|
||||||
|
),
|
||||||
|
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 1,
|
||||||
|
color: Color(0xffCCCCCC),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
HeaderBodyExpandableNotifier(
|
||||||
|
headerWidget: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Texts('History'.toUpperCase(),
|
||||||
|
variant: isHistoryExpand ? "bodyText" : '',
|
||||||
|
bold: isHistoryExpand ? true : false,
|
||||||
|
color: Colors.black),
|
||||||
|
Icon(
|
||||||
|
FontAwesomeIcons.asterisk,
|
||||||
|
color: AppGlobal.appPrimaryColor,
|
||||||
|
size: 12,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
isHistoryExpand = !isHistoryExpand;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Icon(isHistoryExpand
|
||||||
|
? EvaIcons.minus
|
||||||
|
: EvaIcons.plus))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
bodyWidget: Column(
|
||||||
|
children: [
|
||||||
|
AddHistoryWidget(myHistoryList: myHistoryList)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
isExpand: isHistoryExpand,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 1,
|
||||||
|
color: Color(0xffCCCCCC),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
HeaderBodyExpandableNotifier(
|
||||||
|
headerWidget: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Texts('Allergies'.toUpperCase(),
|
||||||
|
variant: isAllergiesExpand ? "bodyText" : '',
|
||||||
|
bold: isAllergiesExpand ? true : false,
|
||||||
|
color: Colors.black),
|
||||||
|
Icon(
|
||||||
|
FontAwesomeIcons.asterisk,
|
||||||
|
color: AppGlobal.appPrimaryColor,
|
||||||
|
size: 12,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
isAllergiesExpand = !isAllergiesExpand;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Icon(isAllergiesExpand
|
||||||
|
? EvaIcons.minus
|
||||||
|
: EvaIcons.plus))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
bodyWidget:Column(
|
||||||
|
children: [
|
||||||
|
AddAllergiesWidget(myAllergiesList: widget.myAllergiesList,),
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
,
|
||||||
|
isExpand: isAllergiesExpand,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 1,
|
||||||
|
color: Color(0xffCCCCCC),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
AppButton(
|
||||||
|
title: TranslationBase
|
||||||
|
.of(context)
|
||||||
|
.next,
|
||||||
|
|
||||||
|
onPressed: () async {
|
||||||
|
addSubjectiveInfo(model: model,
|
||||||
|
myAllergiesList: widget.myAllergiesList,
|
||||||
|
myHistoryList: myHistoryList);
|
||||||
|
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),),);
|
||||||
|
}
|
||||||
|
|
||||||
|
addSubjectiveInfo(
|
||||||
|
{SOAPViewModel model, List<MySelectedAllergy> myAllergiesList, List<
|
||||||
|
MasterKeyModel> myHistoryList }) async {
|
||||||
|
PostAllergyRequestModel postAllergyRequestModel = new PostAllergyRequestModel();
|
||||||
|
widget.myAllergiesList.forEach((allergy) {
|
||||||
|
if(postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM ==null)
|
||||||
|
postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM = [];
|
||||||
|
postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM.add(
|
||||||
|
ListHisProgNotePatientAllergyDiseaseVM(
|
||||||
|
allergyDiseaseId: allergy.selectedAllergy.id,
|
||||||
|
allergyDiseaseType: allergy.selectedAllergy.typeId,
|
||||||
|
patientMRN: 2500477,
|
||||||
|
episodeId: 200011502,
|
||||||
|
appointmentNo: 2016053271,
|
||||||
|
severity: allergy.selectedAllergySeverity.id,
|
||||||
|
remarks: allergy.remark,
|
||||||
|
createdBy: 1485,
|
||||||
|
createdOn: "2020-08-14T20:37:22.780Z",
|
||||||
|
editedBy: 1485,
|
||||||
|
editedOn: "2020-08-14T20:37:22.780Z",
|
||||||
|
isChecked: false,
|
||||||
|
isUpdatedByNurse: false
|
||||||
|
));
|
||||||
|
});
|
||||||
|
await model.postAllergy(postAllergyRequestModel);
|
||||||
|
|
||||||
|
if(model.state == ViewState.ErrorLocal) {
|
||||||
|
helpers.showErrorToast(model.error);
|
||||||
|
}
|
||||||
|
widget.changePageViewIndex(1);
|
||||||
|
|
||||||
|
print(postAllergyRequestModel);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,92 @@
|
|||||||
|
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class PatientPageHeaderWidget extends StatelessWidget {
|
||||||
|
|
||||||
|
final PatiantInformtion patient;
|
||||||
|
|
||||||
|
PatientPageHeaderWidget(this.patient);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: <Widget>[
|
||||||
|
AvatarWidget(
|
||||||
|
Icon(
|
||||||
|
patient.genderDescription == "Male"
|
||||||
|
? DoctorApp.male
|
||||||
|
: DoctorApp.female_icon,
|
||||||
|
size: 70,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 20,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 5,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
patient.firstName + ' ' + patient.lastName,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(context).age,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 20,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
patient.age.toString(),
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"ALLERGIC TO: FOOD, ASPIRIN, EGG WHITE",
|
||||||
|
color: Color(0xFFB9382C),
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 1,
|
||||||
|
color: Color(0xffCCCCCC),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 20,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,86 @@
|
|||||||
|
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class MasterKeyDailog extends StatefulWidget {
|
||||||
|
final List<MasterKeyModel> list;
|
||||||
|
final okText;
|
||||||
|
final Function(MasterKeyModel) okFunction;
|
||||||
|
MasterKeyModel selectedValue;
|
||||||
|
|
||||||
|
MasterKeyDailog(
|
||||||
|
{@required this.list,
|
||||||
|
@required this.okText,
|
||||||
|
@required this.okFunction});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_MasterKeyDailogState createState() => _MasterKeyDailogState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _MasterKeyDailogState extends State<MasterKeyDailog> {
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
widget.selectedValue = widget.selectedValue ?? widget.list[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return showAlertDialog(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
showAlertDialog(BuildContext context) {
|
||||||
|
// set up the buttons
|
||||||
|
Widget cancelButton = FlatButton(
|
||||||
|
child: Text(TranslationBase.of(context).cancel),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
});
|
||||||
|
Widget continueButton = FlatButton(
|
||||||
|
child: Text(this.widget.okText),
|
||||||
|
onPressed: () {
|
||||||
|
this.widget.okFunction(widget.selectedValue);
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
});
|
||||||
|
// set up the AlertDialog
|
||||||
|
AlertDialog alert = AlertDialog(
|
||||||
|
// title: Text(widget.title),
|
||||||
|
content: createDialogList(),
|
||||||
|
actions: [
|
||||||
|
cancelButton,
|
||||||
|
continueButton,
|
||||||
|
],
|
||||||
|
);
|
||||||
|
return alert;
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget createDialogList() {
|
||||||
|
return Container(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.5,
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
...widget.list
|
||||||
|
.map((item) => RadioListTile(
|
||||||
|
title: Text(item.nameEn.toString()),
|
||||||
|
groupValue: widget.selectedValue.id.toString(),
|
||||||
|
value: item.id.toString(),
|
||||||
|
activeColor: Colors.blue.shade700,
|
||||||
|
selected: item.id.toString() == widget.selectedValue.id.toString(),
|
||||||
|
onChanged: (val) {
|
||||||
|
setState(() {
|
||||||
|
widget.selectedValue = item;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
))
|
||||||
|
.toList()
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
static closeAlertDialog(BuildContext context) {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class DividerWithSpacesAround extends StatelessWidget {
|
||||||
|
DividerWithSpacesAround({
|
||||||
|
Key key, this.height = 0,
|
||||||
|
});
|
||||||
|
final double height ;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: height,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 1,
|
||||||
|
color: Color(0xffCCCCCC),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: height,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue