Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into hack_login
Conflicts: lib/client/base_app_client.dart lib/routes.dartmerge-requests/202/head
commit
6f2e764deb
@ -0,0 +1,72 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/PatientArrivalEntity.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/vital_sign/vital_sign_res_model.dart';
|
||||||
|
|
||||||
|
class VitalSignsService extends BaseService{
|
||||||
|
|
||||||
|
List<VitalSignResModel> patientVitalSignList = [];
|
||||||
|
List<VitalSignResModel> patientVitalSignOrderdSubList = [];
|
||||||
|
VitalSignData patientVitalSigns;
|
||||||
|
|
||||||
|
/*Future getPatientVitalSign(patient) async {
|
||||||
|
hasError = false;
|
||||||
|
await baseAppClient.post(
|
||||||
|
GET_PATIENT_VITAL_SIGN,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
patientVitalSignList = [];
|
||||||
|
response['List_DoctorPatientVitalSign'].forEach((v) {
|
||||||
|
patientVitalSignList.add(new VitalSignResModel.fromJson(v));
|
||||||
|
});
|
||||||
|
|
||||||
|
if (patientVitalSignList.length > 0) {
|
||||||
|
List<VitalSignResModel> patientVitalSignOrderdSubListTemp = [];
|
||||||
|
patientVitalSignOrderdSubListTemp = patientVitalSignList;
|
||||||
|
patientVitalSignOrderdSubListTemp
|
||||||
|
.sort((VitalSignResModel a, VitalSignResModel b) {
|
||||||
|
return b.vitalSignDate.microsecondsSinceEpoch -
|
||||||
|
a.vitalSignDate.microsecondsSinceEpoch;
|
||||||
|
});
|
||||||
|
patientVitalSignOrderdSubList.clear();
|
||||||
|
int length = patientVitalSignOrderdSubListTemp.length >= 20
|
||||||
|
? 20
|
||||||
|
: patientVitalSignOrderdSubListTemp.length;
|
||||||
|
for (int x = 0; x < length; x++) {
|
||||||
|
patientVitalSignOrderdSubList
|
||||||
|
.add(patientVitalSignOrderdSubListTemp[x]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
},
|
||||||
|
body: patient,
|
||||||
|
);
|
||||||
|
} // Vit*/
|
||||||
|
|
||||||
|
Future getPatientVitalSign(PatientArrivalEntity patientArrivalEntity) async {
|
||||||
|
hasError = false;
|
||||||
|
Map<String, dynamic> body = Map();
|
||||||
|
body['PatientMRN'] = patientArrivalEntity.patientMRN;
|
||||||
|
body['AppointmentNo'] = patientArrivalEntity.appointmentNo;
|
||||||
|
body['EpisodeID'] = patientArrivalEntity.episodeNo;
|
||||||
|
|
||||||
|
await baseAppClient.post(
|
||||||
|
GET_PATIENT_VITAL_SIGN_DATA,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
if(response['VitalSignsList'] != null){
|
||||||
|
if(response['VitalSignsList']['entityList'] = null && (response['VitalSignsList']['entityList'] as List).length > 0){
|
||||||
|
patientVitalSigns = VitalSignData.fromJson(response['VitalSignsList']['entityList']['0']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error.toString();
|
||||||
|
},
|
||||||
|
body: body,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,100 @@
|
|||||||
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/patient-vital-signs-service.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/PatientArrivalEntity.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/vital_sign/vital_sign_res_model.dart';
|
||||||
|
|
||||||
|
import '../../locator.dart';
|
||||||
|
|
||||||
|
class VitalSignsViewModel extends BaseViewModel {
|
||||||
|
VitalSignsService _vitalSignService = locator<VitalSignsService>();
|
||||||
|
|
||||||
|
List<PatientArrivalEntity> get patientArrivalList =>
|
||||||
|
_vitalSignService.patientArrivalList;
|
||||||
|
|
||||||
|
VitalSignData get patientVitalSigns => _vitalSignService.patientVitalSigns;
|
||||||
|
|
||||||
|
Future getPatientArrivalList(String date, PatiantInformtion patient,
|
||||||
|
{String fromDate}) async {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _vitalSignService.getPatientArrivalList(date, fromDate: fromDate);
|
||||||
|
if (_vitalSignService.hasError) {
|
||||||
|
error = _vitalSignService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else {
|
||||||
|
await getPatientVitalSign(patient);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
PatientArrivalEntity getPatientAppointmentEntity(PatiantInformtion patient) {
|
||||||
|
String ffName = "${patient.firstName} ${patient.lastName}";
|
||||||
|
String fmfName =
|
||||||
|
"${patient.firstName} ${patient.middleName} ${patient.lastName}";
|
||||||
|
|
||||||
|
for (var element in patientArrivalList) {
|
||||||
|
int index = patientArrivalList.indexOf(element);
|
||||||
|
if (element.patientName == ffName || element.patientName == fmfName) {
|
||||||
|
return element;
|
||||||
|
}
|
||||||
|
// print("patient index: $index");
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getPatientVitalSign(PatiantInformtion patient) async {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
PatientArrivalEntity patientArrivalEntity =
|
||||||
|
getPatientAppointmentEntity(patient);
|
||||||
|
if (patientArrivalEntity == null) {
|
||||||
|
_vitalSignService.hasError = true;
|
||||||
|
error = "There is no appointments for this patient";
|
||||||
|
setState(ViewState.Error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await _vitalSignService.getPatientVitalSign(patientArrivalEntity);
|
||||||
|
// TODO remove (not) from below condition
|
||||||
|
if (!_vitalSignService.hasError) {
|
||||||
|
error = _vitalSignService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else {
|
||||||
|
if (patientVitalSigns == null) {
|
||||||
|
_vitalSignService.patientVitalSigns = VitalSignData(
|
||||||
|
appointmentNo: 2016053265,
|
||||||
|
bloodPressureCuffLocation: 0,
|
||||||
|
bloodPressureCuffSize: 0,
|
||||||
|
bloodPressureHigher: 38,
|
||||||
|
bloodPressureLower: 32,
|
||||||
|
bloodPressurePatientPosition: 1,
|
||||||
|
bodyMassIndex: 31.11,
|
||||||
|
fio2: 0,
|
||||||
|
headCircumCm: 0,
|
||||||
|
heightCm: 150,
|
||||||
|
idealBodyWeightLbs: -2,
|
||||||
|
isPainManagementDone: false,
|
||||||
|
isVitalsRequired: true,
|
||||||
|
leanBodyWeightLbs: 0,
|
||||||
|
painCharacter: null,
|
||||||
|
painDuration: null,
|
||||||
|
painFrequency: null,
|
||||||
|
painLocation: null,
|
||||||
|
painScore: 0,
|
||||||
|
patientMRN: 3333274,
|
||||||
|
patientType: 1,
|
||||||
|
pulseBeatPerMinute: 0,
|
||||||
|
pulseRhythm: 0,
|
||||||
|
respirationBeatPerMinute: 0,
|
||||||
|
respirationPattern: 0,
|
||||||
|
sao2: 0,
|
||||||
|
status: 47,
|
||||||
|
temperatureCelcius: 40,
|
||||||
|
temperatureCelciusMethod: 1,
|
||||||
|
waistSizeInch: 39,
|
||||||
|
weightKg: 70,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,136 @@
|
|||||||
|
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,989 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/patient-vital-sign-viewmodel.dart';
|
||||||
|
import 'package:doctor_app_flutter/lookups/patient_lookup.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/date-utils.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-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/expandable-widget-header-body.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class PatientVitalSignScreen extends StatelessWidget {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
||||||
|
PatiantInformtion patient = routeArgs['patient'];
|
||||||
|
|
||||||
|
return BaseView<VitalSignsViewModel>(
|
||||||
|
onModelReady: (model) => model.getPatientArrivalList(
|
||||||
|
DateUtils.convertDateToFormat(DateTime.now(), "yyyy-MM-dd"), patient,
|
||||||
|
fromDate: DateUtils.convertDateToFormat(
|
||||||
|
DateTime.now().subtract(Duration(days: 500)), "yyyy-MM-dd")),
|
||||||
|
builder: (_, model, w) => AppScaffold(
|
||||||
|
baseViewModel: model,
|
||||||
|
appBarTitle: TranslationBase.of(context).vitalSign,
|
||||||
|
body: model.patientVitalSigns != null
|
||||||
|
? SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
PatientPageHeaderWidget(patient),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin:
|
||||||
|
EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).weight} :",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${model.patientVitalSigns.weightKg} ${TranslationBase.of(context).kg}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).idealBodyWeight} :",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${model.patientVitalSigns.idealBodyWeightLbs} ${TranslationBase.of(context).kg}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 4,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).height} :",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${model.patientVitalSigns.heightCm} ${TranslationBase.of(context).cm}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 4,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).waistSize} :",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${model.patientVitalSigns.waistSizeInch} ${TranslationBase.of(context).inch}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).headCircum} :",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${model.patientVitalSigns.headCircumCm} ${TranslationBase.of(context).cm}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).leanBodyWeight} :",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${model.patientVitalSigns.leanBodyWeightLbs} ${TranslationBase.of(context).kg}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 4,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).bodyMassIndex} :",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${model.patientVitalSigns.bodyMassIndex}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 4,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"G.C.S :",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"N/A",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
const Divider(
|
||||||
|
color: Color(0xffCCCCCC),
|
||||||
|
height: 1,
|
||||||
|
thickness: 2,
|
||||||
|
indent: 0,
|
||||||
|
endIndent: 0,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
TemperatureWidget(model.patientVitalSigns),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
const Divider(
|
||||||
|
color: Color(0xffCCCCCC),
|
||||||
|
height: 1,
|
||||||
|
thickness: 2,
|
||||||
|
indent: 0,
|
||||||
|
endIndent: 0,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
PulseWidget(model.patientVitalSigns),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
const Divider(
|
||||||
|
color: Color(0xffCCCCCC),
|
||||||
|
height: 1,
|
||||||
|
thickness: 2,
|
||||||
|
indent: 0,
|
||||||
|
endIndent: 0,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
RespirationWidget(model.patientVitalSigns),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
const Divider(
|
||||||
|
color: Color(0xffCCCCCC),
|
||||||
|
height: 1,
|
||||||
|
thickness: 2,
|
||||||
|
indent: 0,
|
||||||
|
endIndent: 0,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
BloodPressureWidget(model.patientVitalSigns),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
const Divider(
|
||||||
|
color: Color(0xffCCCCCC),
|
||||||
|
height: 1,
|
||||||
|
thickness: 2,
|
||||||
|
indent: 0,
|
||||||
|
endIndent: 0,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
OxygenationWidget(model.patientVitalSigns),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
const Divider(
|
||||||
|
color: Color(0xffCCCCCC),
|
||||||
|
height: 1,
|
||||||
|
thickness: 2,
|
||||||
|
indent: 0,
|
||||||
|
endIndent: 0,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
PainScaleWidget(model.patientVitalSigns),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
const Divider(
|
||||||
|
color: Color(0xffCCCCCC),
|
||||||
|
height: 1,
|
||||||
|
thickness: 2,
|
||||||
|
indent: 0,
|
||||||
|
endIndent: 0,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: Container(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class TemperatureWidget extends StatefulWidget {
|
||||||
|
final VitalSignData vitalSign;
|
||||||
|
|
||||||
|
TemperatureWidget(this.vitalSign);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_TemperatureWidgetState createState() => _TemperatureWidgetState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _TemperatureWidgetState extends State<TemperatureWidget> {
|
||||||
|
bool isExpand = false;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
child: HeaderBodyExpandableNotifier(
|
||||||
|
headerWidget: Container(
|
||||||
|
margin: EdgeInsets.symmetric(vertical: 16.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).temperature}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2.5,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: isExpand ? FontWeight.bold : FontWeight.normal,
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
isExpand = !isExpand;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Icon(isExpand ? Icons.remove : Icons.add),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
bodyWidget: Container(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).temperature} (C):",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.temperatureCelcius}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).temperature} (F):",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.temperatureCelcius * (9 / 5) + 32}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 4,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).method} :",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.temperatureCelciusMethod}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
isExpand: isExpand,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class PulseWidget extends StatefulWidget {
|
||||||
|
|
||||||
|
final VitalSignData vitalSign;
|
||||||
|
|
||||||
|
PulseWidget(this.vitalSign);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_PulseWidgetState createState() => _PulseWidgetState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _PulseWidgetState extends State<PulseWidget> {
|
||||||
|
bool isExpand = false;
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
child: HeaderBodyExpandableNotifier(
|
||||||
|
headerWidget: Container(
|
||||||
|
margin: EdgeInsets.symmetric(vertical: 16.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).pulse}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2.5,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: isExpand ? FontWeight.bold : FontWeight.normal,
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
isExpand = !isExpand;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Icon(isExpand ? Icons.remove : Icons.add),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
bodyWidget: Container(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).pulseBeats}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.pulseBeatPerMinute}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).rhythm}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.pulseRhythm}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
isExpand: isExpand,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class RespirationWidget extends StatefulWidget {
|
||||||
|
|
||||||
|
final VitalSignData vitalSign;
|
||||||
|
|
||||||
|
RespirationWidget(this.vitalSign);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_RespirationWidgetState createState() => _RespirationWidgetState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _RespirationWidgetState extends State<RespirationWidget> {
|
||||||
|
bool isExpand = false;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
child: HeaderBodyExpandableNotifier(
|
||||||
|
headerWidget: Container(
|
||||||
|
margin: EdgeInsets.symmetric(vertical: 16.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).respiration}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2.5,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: isExpand ? FontWeight.bold : FontWeight.normal,
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
isExpand = !isExpand;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Icon(isExpand ? Icons.remove : Icons.add),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
bodyWidget: Container(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).respBeats}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.respirationBeatPerMinute}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).patternOfRespiration}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.respirationPattern}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
isExpand: isExpand,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class BloodPressureWidget extends StatefulWidget {
|
||||||
|
|
||||||
|
final VitalSignData vitalSign;
|
||||||
|
|
||||||
|
BloodPressureWidget(this.vitalSign);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_BloodPressureWidgetState createState() => _BloodPressureWidgetState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _BloodPressureWidgetState extends State<BloodPressureWidget> {
|
||||||
|
bool isExpand = false;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
child: HeaderBodyExpandableNotifier(
|
||||||
|
headerWidget: Container(
|
||||||
|
margin: EdgeInsets.symmetric(vertical: 16.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).bloodPressure}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2.5,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: isExpand ? FontWeight.bold : FontWeight.normal,
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
isExpand = !isExpand;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Icon(isExpand ? Icons.remove : Icons.add),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
bodyWidget: Container(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).bloodPressureDiastoleAndSystole}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.bloodPressureHigher}, ${widget.vitalSign.bloodPressureLower}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).cuffLocation}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.bloodPressureCuffLocation}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 4,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).patientPosition}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.bloodPressurePatientPosition}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).cuffSize}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.bloodPressureCuffSize}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
isExpand: isExpand,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class OxygenationWidget extends StatefulWidget {
|
||||||
|
|
||||||
|
final VitalSignData vitalSign;
|
||||||
|
|
||||||
|
OxygenationWidget(this.vitalSign);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_OxygenationWidgetState createState() => _OxygenationWidgetState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _OxygenationWidgetState extends State<OxygenationWidget> {
|
||||||
|
bool isExpand = false;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
child: HeaderBodyExpandableNotifier(
|
||||||
|
headerWidget: Container(
|
||||||
|
margin: EdgeInsets.symmetric(vertical: 16.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).oxygenation}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2.5,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: isExpand ? FontWeight.bold : FontWeight.normal,
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
isExpand = !isExpand;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Icon(isExpand ? Icons.remove : Icons.add),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
bodyWidget: Container(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).sao2}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.sao2}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).fio2}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.fio2}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
isExpand: isExpand,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class PainScaleWidget extends StatefulWidget {
|
||||||
|
|
||||||
|
final VitalSignData vitalSign;
|
||||||
|
|
||||||
|
PainScaleWidget(this.vitalSign);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_PainScaleWidgetState createState() => _PainScaleWidgetState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _PainScaleWidgetState extends State<PainScaleWidget> {
|
||||||
|
bool isExpand = false;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
child: HeaderBodyExpandableNotifier(
|
||||||
|
headerWidget: Container(
|
||||||
|
margin: EdgeInsets.symmetric(vertical: 16.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).painScale}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2.5,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: isExpand ? FontWeight.bold : FontWeight.normal,
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
isExpand = !isExpand;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Icon(isExpand ? Icons.remove : Icons.add),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
bodyWidget: Container(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).painScale}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.painScore}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).painManagement}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.isPainManagementDone}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
isExpand: isExpand,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -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,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue