|
|
|
@ -20,44 +20,57 @@ DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
|
|
|
|
|
*@return:VitalSignScreen
|
|
|
|
|
*@desc: VitalSignScreen class
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
class VitalSignScreen extends StatefulWidget {
|
|
|
|
|
@override
|
|
|
|
|
_VitalSignScreenState createState() => _VitalSignScreenState();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class _VitalSignScreenState extends State<VitalSignScreen> {
|
|
|
|
|
List<String> litems = [
|
|
|
|
|
"1",
|
|
|
|
|
"1",
|
|
|
|
|
"1",
|
|
|
|
|
];
|
|
|
|
|
PatientsProvider patientsProv;
|
|
|
|
|
var _isInit = true;
|
|
|
|
|
|
|
|
|
|
PatientsProvider getVitalSignList(context, PatientsProvider patientsProv) {
|
|
|
|
|
/*
|
|
|
|
|
*@author: Elham Rababah
|
|
|
|
|
*@Date:28/4/2020
|
|
|
|
|
*@param: context
|
|
|
|
|
*@return:
|
|
|
|
|
*@desc: getVitalSignList Function
|
|
|
|
|
*/
|
|
|
|
|
getVitalSignList(context) {
|
|
|
|
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
|
|
|
|
PatiantInformtion patient = routeArgs['patient'];
|
|
|
|
|
sharedPref.getString(TOKEN).then((token) {
|
|
|
|
|
VitalSignReqModel vitalSignReqModel = VitalSignReqModel(
|
|
|
|
|
patientID: patient.patientId,
|
|
|
|
|
projectID: patient.projectId,
|
|
|
|
|
tokenID: token,
|
|
|
|
|
tokenID: '@dm!n',
|
|
|
|
|
patientTypeID: patient.patientType,
|
|
|
|
|
inOutpatientType: 1,
|
|
|
|
|
languageID: 2,
|
|
|
|
|
transNo:
|
|
|
|
|
patient.admissionNo != null ? int.parse(patient.admissionNo) : 0);
|
|
|
|
|
patientsProv.getPatientVitalSign(vitalSignReqModel.toJson());
|
|
|
|
|
return patientsProv;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
|
|
|
|
|
void didChangeDependencies() {
|
|
|
|
|
super.didChangeDependencies();
|
|
|
|
|
if (_isInit) {
|
|
|
|
|
patientsProv = Provider.of<PatientsProvider>(context);
|
|
|
|
|
getVitalSignList(context);
|
|
|
|
|
}
|
|
|
|
|
_isInit = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getVitalSignList(context, patientsProv);
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return AppScaffold(
|
|
|
|
|
appBarTitle: "VITAL SIGN",
|
|
|
|
|
body: patientsProv.isLoading?DrAppCircularProgressIndeicator():patientsProv.isError
|
|
|
|
|
body: patientsProv.isLoading
|
|
|
|
|
? DrAppCircularProgressIndeicator()
|
|
|
|
|
: patientsProv.isError
|
|
|
|
|
? Center(
|
|
|
|
|
child: Text(
|
|
|
|
|
patientsProv.error,
|
|
|
|
@ -71,22 +84,22 @@ class _VitalSignScreenState extends State<VitalSignScreen> {
|
|
|
|
|
style: TextStyle(color: Theme.of(context).errorColor),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
:Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: patientsProv.patientVitalSignList.map((item) {
|
|
|
|
|
return InkWell(
|
|
|
|
|
child: CardWithBgWidget(
|
|
|
|
|
line1Text: 'Fahad AlSlehm - 324599',
|
|
|
|
|
line2Text: '12/04/2020 - 02:00 PM',
|
|
|
|
|
heightPercentage: 0.15,
|
|
|
|
|
widthPercentage: 0.80),
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.of(context).pushNamed(VITAL_SIGN);
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
}).toList(),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
: Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: patientsProv.patientVitalSignList.map((item) {
|
|
|
|
|
return InkWell(
|
|
|
|
|
child: CardWithBgWidget(
|
|
|
|
|
line1Text: 'Fahad AlSlehm - 324599',
|
|
|
|
|
line2Text: '12/04/2020 - 02:00 PM',
|
|
|
|
|
heightPercentage: 0.15,
|
|
|
|
|
widthPercentage: 0.80),
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.of(context).pushNamed(VITAL_SIGN);
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
}).toList(),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|