Merge branch 'master' into 'Amjad_search'

# Conflicts:
#   lib/screens/patients/patient_search_screen.dart
merge-requests/39/head
amjad nabil amireh 6 years ago
commit aafde2c311

@ -59,7 +59,7 @@ class VitalSignReqModel {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
data['ProjectID'] = this.projectID; data['ProjectID'] = this.projectID;
data['PatientID'] = this.patientID; data['PatientID'] = this.patientID;
data['InOutpatientType'] = this.inOutpatientType; data['InOutPatientType'] = this.inOutpatientType;
data['TransNo'] = this.transNo; data['TransNo'] = this.transNo;
data['LanguageID'] = this.languageID; data['LanguageID'] = this.languageID;
data['stamp'] = this.stamp; data['stamp'] = this.stamp;

@ -1,65 +1,65 @@
class VitalSignResModel { class VitalSignResModel {
int transNo; var transNo;
Null projectID; var projectID;
int weightKg; var weightKg;
int heightCm; var heightCm;
var temperatureCelcius; var temperatureCelcius;
int pulseBeatPerMinute; var pulseBeatPerMinute;
int respirationBeatPerMinute; var respirationBeatPerMinute;
int bloodPressureLower; var bloodPressureLower;
int bloodPressureHigher; var bloodPressureHigher;
int sAO2; var sAO2;
int fIO2; var fIO2;
Null painScore; var painScore;
var bodyMassIndex; var bodyMassIndex;
int headCircumCm; var headCircumCm;
int leanBodyWeightLbs; var leanBodyWeightLbs;
int idealBodyWeightLbs; var idealBodyWeightLbs;
int temperatureCelciusMethod; var temperatureCelciusMethod;
int pulseRhythm; var pulseRhythm;
int respirationPattern; var respirationPattern;
Null bloodPressureCuffLocation; var bloodPressureCuffLocation;
Null bloodPressureCuffSize; var bloodPressureCuffSize;
Null bloodPressurePatientPosition; var bloodPressurePatientPosition;
String painLocation; var painLocation;
String painDuration; var painDuration;
String painCharacter; var painCharacter;
String painFrequency; var painFrequency;
bool isPainManagementDone; bool isPainManagementDone;
int status; var status;
bool isVitalsRequired; bool isVitalsRequired;
int patientID; var patientID;
String createdOn; var createdOn;
int doctorID; var doctorID;
int clinicID; var clinicID;
Null triageCategory; var triageCategory;
Null gCScore; var gCScore;
Null lineItemNo; var lineItemNo;
Null vitalSignDate; var vitalSignDate;
Null actualTimeTaken; var actualTimeTaken;
Null sugarLevel; var sugarLevel;
Null fBS; var fBS;
Null rBS; var rBS;
Null observationType; var observationType;
Null heartRate; var heartRate;
Null muscleTone; var muscleTone;
Null reflexIrritability; var reflexIrritability;
Null bodyColor; var bodyColor;
Null isFirstAssessment; var isFirstAssessment;
Null dateofBirth; var dateofBirth;
Null timeOfBirth; var timeOfBirth;
String bloodPressure; var bloodPressure;
String bloodPressureCuffLocationDesc; var bloodPressureCuffLocationDesc;
String bloodPressureCuffSizeDesc; var bloodPressureCuffSizeDesc;
String bloodPressurePatientPositionDesc; var bloodPressurePatientPositionDesc;
String clinicName; var clinicName;
String doctorImageURL; var doctorImageURL;
String doctorName; var doctorName;
String painScoreDesc; var painScoreDesc;
String pulseRhythmDesc; var pulseRhythmDesc;
String respirationPatternDesc; var respirationPatternDesc;
String temperatureCelciusMethodDesc; var temperatureCelciusMethodDesc;
Null time; var time;
VitalSignResModel( VitalSignResModel(
{this.transNo, {this.transNo,

@ -37,8 +37,8 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
var _patientSearchFormValues = PatientModel( var _patientSearchFormValues = PatientModel(
ProjectID: 15, ProjectID: 15,
ClinicID: 0, ClinicID: 90,
DoctorID: 4709, DoctorID: 145642,
FirstName: "0", FirstName: "0",
MiddleName: "0", MiddleName: "0",
LastName: "0", LastName: "0",
@ -57,26 +57,36 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
IsLoginForDoctorApp: true, IsLoginForDoctorApp: true,
PatientOutSA: false); PatientOutSA: false);
void _validateInputs() { void _validateInputs() async {
print("####IBRAHIM TEST#####"+_patientSearchFormValues.From); print("####IBRAHIM TEST#####" + _patientSearchFormValues.From);
// _patientSearchFormValues.TokenID = // _patientSearchFormValues.TokenID =
if (_formKey.currentState.validate()) { if (_formKey.currentState.validate()) {
// If all data are correct then save data to out variables // If all data are correct then save data to out variables
<<<<<<< lib/screens/patients/patient_search_screen.dart
// _formKey.currentState.save(); // _formKey.currentState.save();
sharedPref.getString(TOKEN).then((token) { sharedPref.getString(TOKEN).then((token) {
_patientSearchFormValues.TokenID = '@dm!n'; _patientSearchFormValues.TokenID = _patientSearchFormValues,
_patientSearchFormValues.ProjectID= 15; _patientSearchFormValues.ProjectID= _selectedType
//"patientSearchForm": _patientSearchFormValues,
//"selectedType": _selectedType
Navigator.of(context).pushNamed(PATIENTS, arguments: { Navigator.of(context).pushNamed(PATIENTS, arguments: {
"patientSearchForm": _patientSearchFormValues, "patientSearchForm": _patientSearchFormValues,
"selectedType": _selectedType "selectedType": _selectedType
}); });
=======
// _formKey.currentState.save();
String token = await sharedPref.getString(TOKEN);
int projectID = await sharedPref.getInt(PROJECT_ID);
_patientSearchFormValues.TokenID = token;
_patientSearchFormValues.ProjectID = projectID;
// print(_patientSearchFormValues.PatientMobileNumber+"dfdfdfddf");
Navigator.of(context).pushNamed(PATIENTS, arguments: {
"patientSearchForm": _patientSearchFormValues,
"selectedType": _selectedType
>>>>>>> lib/screens/patients/patient_search_screen.dart
}); });
} else { } else {
// If all data are not valid then start auto validation. // If all data are not valid then start auto validation.
@ -173,41 +183,38 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
height: 10, height: 10,
), ),
AppTextFormField( AppTextFormField(
hintText: 'First Name', hintText: 'First Name',
onSaved: (value) { onSaved: (value) {
_patientSearchFormValues.FirstName = value; _patientSearchFormValues.FirstName = value;
}, },
// validator: (value) { // validator: (value) {
// return TextValidator().validateName(value); // return TextValidator().validateName(value);
// }, // },
inputFormatter: ONLY_LETTERS inputFormatter: ONLY_LETTERS),
),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
AppTextFormField( AppTextFormField(
hintText: 'Middle Name', hintText: 'Middle Name',
onSaved: (value) { onSaved: (value) {
_patientSearchFormValues.MiddleName = value; _patientSearchFormValues.MiddleName = value;
}, },
// validator: (value) { // validator: (value) {
// return TextValidator().validateName(value); // return TextValidator().validateName(value);
// }, // },
inputFormatter: ONLY_LETTERS inputFormatter: ONLY_LETTERS),
),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
AppTextFormField( AppTextFormField(
hintText: 'Last Name', hintText: 'Last Name',
onSaved: (value) { onSaved: (value) {
_patientSearchFormValues.LastName = value; _patientSearchFormValues.LastName = value;
}, },
// validator: (value) { // validator: (value) {
// return TextValidator().validateName(value); // return TextValidator().validateName(value);
// }, // },
inputFormatter: ONLY_LETTERS inputFormatter: ONLY_LETTERS),
),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
@ -229,7 +236,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
AppTextFormField( AppTextFormField(
textInputType: TextInputType.number, textInputType: TextInputType.number,
hintText: 'Patiant ID', hintText: 'Patiant ID',
// //
inputFormatter: ONLY_NUMBERS, inputFormatter: ONLY_NUMBERS,
onSaved: (value) { onSaved: (value) {
_patientSearchFormValues.PatientID = 89000; _patientSearchFormValues.PatientID = 89000;

@ -39,22 +39,20 @@ class _VitalSignScreenState extends State<VitalSignScreen> {
*@return: *@return:
*@desc: getVitalSignList Function *@desc: getVitalSignList Function
*/ */
getVitalSignList(context) { getVitalSignList(context) async {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
sharedPref.getString(TOKEN).then((token) { String token = await sharedPref.getString(TOKEN);
VitalSignReqModel vitalSignReqModel = VitalSignReqModel( VitalSignReqModel vitalSignReqModel = VitalSignReqModel(
patientID: 1237159, //patient.patientId, patientID: patient.patientId,
projectID: 12, //patient.projectId, projectID: patient.projectId,
tokenID: '@dm!n', tokenID: token,
patientTypeID: patient.patientType, patientTypeID: patient.patientType,
inOutpatientType: 2, inOutpatientType: 1,
languageID: 2, languageID: 2,
transNo: 0, transNo:
); patient.admissionNo != null ? int.parse(patient.admissionNo) : 0);
//patient.admissionNo != null ? int.parse(patient.admissionNo) : 0); patientsProv.getPatientVitalSign(vitalSignReqModel.toJson());
patientsProv.getPatientVitalSign(vitalSignReqModel.toJson());
});
} }
@override @override
@ -71,6 +69,8 @@ class _VitalSignScreenState extends State<VitalSignScreen> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: "VITAL SIGN", appBarTitle: "VITAL SIGN",
showAppDrawer: false,
showBottomBar: false,
body: patientsProv.isLoading body: patientsProv.isLoading
? DrAppCircularProgressIndeicator() ? DrAppCircularProgressIndeicator()
: patientsProv.isError : patientsProv.isError
@ -88,6 +88,11 @@ class _VitalSignScreenState extends State<VitalSignScreen> {
), ),
) )
: Container( : Container(
margin: EdgeInsets.fromLTRB(
SizeConfig.realScreenWidth * 0.05,
0,
SizeConfig.realScreenWidth * 0.05,
0),
child: ListView.builder( child: ListView.builder(
itemCount: patientsProv.patientVitalSignList.length, itemCount: patientsProv.patientVitalSignList.length,
itemBuilder: (BuildContext ctxt, int index) { itemBuilder: (BuildContext ctxt, int index) {
@ -96,18 +101,42 @@ class _VitalSignScreenState extends State<VitalSignScreen> {
widget: Column( widget: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( Row(
'DoctorName - ${patientsProv.patientVitalSignList[index].doctorName}', children: <Widget>[
fontSize: 2.5 * SizeConfig.textMultiplier, CircleAvatar(
), radius:
SizedBox( SizeConfig.imageSizeMultiplier *
height: 8, 12,
), backgroundImage: NetworkImage(
AppText('painScoreDesc - ${patientsProv.patientVitalSignList[index].painScoreDesc}', patientsProv
fontSize: .patientVitalSignList[index]
2.5 * SizeConfig.textMultiplier), .doctorImageURL),
SizedBox( backgroundColor: Colors.transparent,
height: 8, ),
Padding(
padding: const EdgeInsets.fromLTRB(8,0,0,0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
'${patientsProv.patientVitalSignList[index].doctorName}',
fontSize: 2.5 *
SizeConfig.textMultiplier,
),
SizedBox(
height: 8,
),
AppText(
' ${patientsProv.patientVitalSignList[index].clinicName}',
fontSize: 2.5 *
SizeConfig.textMultiplier),
SizedBox(
height: 8,
),
],
),
)
],
), ),
], ],
), ),

@ -99,7 +99,7 @@ class _LoginFormState extends State<LoginForm> {
controller: projectIdController, controller: projectIdController,
onTap: () { onTap: () {
helpers.showCupertinoPicker( helpers.showCupertinoPicker(
context, projectsList, 'Desciption', onSelectProject); context, projectsList, 'Name', onSelectProject);
}, },
showCursor: false, showCursor: false,
readOnly: true, readOnly: true,

Loading…
Cancel
Save