Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into design-updates

 Conflicts:
	lib/client/base_app_client.dart
	lib/config/config.dart
pull/201/head
hussam al-habibeh 5 years ago
commit b2aade9b2b

@ -7,6 +7,8 @@ PODS:
- connectivity (0.0.1): - connectivity (0.0.1):
- Flutter - Flutter
- Reachability - Reachability
- connectivity_for_web (0.1.0):
- Flutter
- connectivity_macos (0.0.1): - connectivity_macos (0.0.1):
- Flutter - Flutter
- device_info (0.0.1): - device_info (0.0.1):
@ -22,17 +24,27 @@ PODS:
- Flutter - Flutter
- local_auth (0.0.1): - local_auth (0.0.1):
- Flutter - Flutter
- maps_launcher (0.0.1):
- Flutter
- MTBBarcodeScanner (5.0.11) - MTBBarcodeScanner (5.0.11)
- OpenTok (2.15.3) - OpenTok (2.15.3)
- "permission_handler (5.0.0+hotfix.5)": - path_provider_linux (0.0.1):
- Flutter
- path_provider_windows (0.0.1):
- Flutter
- "permission_handler (5.0.1+1)":
- Flutter - Flutter
- Reachability (3.2) - Reachability (3.2)
- shared_preferences (0.0.1): - shared_preferences (0.0.1):
- Flutter - Flutter
- shared_preferences_linux (0.0.1):
- Flutter
- shared_preferences_macos (0.0.1): - shared_preferences_macos (0.0.1):
- Flutter - Flutter
- shared_preferences_web (0.0.1): - shared_preferences_web (0.0.1):
- Flutter - Flutter
- shared_preferences_windows (0.0.1):
- Flutter
- speech_to_text (0.0.1): - speech_to_text (0.0.1):
- Flutter - Flutter
- Try - Try
@ -40,15 +52,20 @@ PODS:
- Try (2.1.1) - Try (2.1.1)
- url_launcher (0.0.1): - url_launcher (0.0.1):
- Flutter - Flutter
- url_launcher_linux (0.0.1):
- Flutter
- url_launcher_macos (0.0.1): - url_launcher_macos (0.0.1):
- Flutter - Flutter
- url_launcher_web (0.0.1): - url_launcher_web (0.0.1):
- Flutter - Flutter
- url_launcher_windows (0.0.1):
- Flutter
DEPENDENCIES: DEPENDENCIES:
- Alamofire - Alamofire
- barcode_scan (from `.symlinks/plugins/barcode_scan/ios`) - barcode_scan (from `.symlinks/plugins/barcode_scan/ios`)
- connectivity (from `.symlinks/plugins/connectivity/ios`) - connectivity (from `.symlinks/plugins/connectivity/ios`)
- connectivity_for_web (from `.symlinks/plugins/connectivity_for_web/ios`)
- connectivity_macos (from `.symlinks/plugins/connectivity_macos/ios`) - connectivity_macos (from `.symlinks/plugins/connectivity_macos/ios`)
- device_info (from `.symlinks/plugins/device_info/ios`) - device_info (from `.symlinks/plugins/device_info/ios`)
- Flutter (from `Flutter`) - Flutter (from `Flutter`)
@ -57,15 +74,22 @@ DEPENDENCIES:
- hexcolor (from `.symlinks/plugins/hexcolor/ios`) - hexcolor (from `.symlinks/plugins/hexcolor/ios`)
- imei_plugin (from `.symlinks/plugins/imei_plugin/ios`) - imei_plugin (from `.symlinks/plugins/imei_plugin/ios`)
- local_auth (from `.symlinks/plugins/local_auth/ios`) - local_auth (from `.symlinks/plugins/local_auth/ios`)
- maps_launcher (from `.symlinks/plugins/maps_launcher/ios`)
- OpenTok - OpenTok
- path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`)
- path_provider_windows (from `.symlinks/plugins/path_provider_windows/ios`)
- permission_handler (from `.symlinks/plugins/permission_handler/ios`) - permission_handler (from `.symlinks/plugins/permission_handler/ios`)
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
- shared_preferences_linux (from `.symlinks/plugins/shared_preferences_linux/ios`)
- shared_preferences_macos (from `.symlinks/plugins/shared_preferences_macos/ios`) - shared_preferences_macos (from `.symlinks/plugins/shared_preferences_macos/ios`)
- shared_preferences_web (from `.symlinks/plugins/shared_preferences_web/ios`) - shared_preferences_web (from `.symlinks/plugins/shared_preferences_web/ios`)
- shared_preferences_windows (from `.symlinks/plugins/shared_preferences_windows/ios`)
- speech_to_text (from `.symlinks/plugins/speech_to_text/ios`) - speech_to_text (from `.symlinks/plugins/speech_to_text/ios`)
- url_launcher (from `.symlinks/plugins/url_launcher/ios`) - url_launcher (from `.symlinks/plugins/url_launcher/ios`)
- url_launcher_linux (from `.symlinks/plugins/url_launcher_linux/ios`)
- url_launcher_macos (from `.symlinks/plugins/url_launcher_macos/ios`) - url_launcher_macos (from `.symlinks/plugins/url_launcher_macos/ios`)
- url_launcher_web (from `.symlinks/plugins/url_launcher_web/ios`) - url_launcher_web (from `.symlinks/plugins/url_launcher_web/ios`)
- url_launcher_windows (from `.symlinks/plugins/url_launcher_windows/ios`)
SPEC REPOS: SPEC REPOS:
trunk: trunk:
@ -81,6 +105,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/barcode_scan/ios" :path: ".symlinks/plugins/barcode_scan/ios"
connectivity: connectivity:
:path: ".symlinks/plugins/connectivity/ios" :path: ".symlinks/plugins/connectivity/ios"
connectivity_for_web:
:path: ".symlinks/plugins/connectivity_for_web/ios"
connectivity_macos: connectivity_macos:
:path: ".symlinks/plugins/connectivity_macos/ios" :path: ".symlinks/plugins/connectivity_macos/ios"
device_info: device_info:
@ -97,27 +123,42 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/imei_plugin/ios" :path: ".symlinks/plugins/imei_plugin/ios"
local_auth: local_auth:
:path: ".symlinks/plugins/local_auth/ios" :path: ".symlinks/plugins/local_auth/ios"
maps_launcher:
:path: ".symlinks/plugins/maps_launcher/ios"
path_provider_linux:
:path: ".symlinks/plugins/path_provider_linux/ios"
path_provider_windows:
:path: ".symlinks/plugins/path_provider_windows/ios"
permission_handler: permission_handler:
:path: ".symlinks/plugins/permission_handler/ios" :path: ".symlinks/plugins/permission_handler/ios"
shared_preferences: shared_preferences:
:path: ".symlinks/plugins/shared_preferences/ios" :path: ".symlinks/plugins/shared_preferences/ios"
shared_preferences_linux:
:path: ".symlinks/plugins/shared_preferences_linux/ios"
shared_preferences_macos: shared_preferences_macos:
:path: ".symlinks/plugins/shared_preferences_macos/ios" :path: ".symlinks/plugins/shared_preferences_macos/ios"
shared_preferences_web: shared_preferences_web:
:path: ".symlinks/plugins/shared_preferences_web/ios" :path: ".symlinks/plugins/shared_preferences_web/ios"
shared_preferences_windows:
:path: ".symlinks/plugins/shared_preferences_windows/ios"
speech_to_text: speech_to_text:
:path: ".symlinks/plugins/speech_to_text/ios" :path: ".symlinks/plugins/speech_to_text/ios"
url_launcher: url_launcher:
:path: ".symlinks/plugins/url_launcher/ios" :path: ".symlinks/plugins/url_launcher/ios"
url_launcher_linux:
:path: ".symlinks/plugins/url_launcher_linux/ios"
url_launcher_macos: url_launcher_macos:
:path: ".symlinks/plugins/url_launcher_macos/ios" :path: ".symlinks/plugins/url_launcher_macos/ios"
url_launcher_web: url_launcher_web:
:path: ".symlinks/plugins/url_launcher_web/ios" :path: ".symlinks/plugins/url_launcher_web/ios"
url_launcher_windows:
:path: ".symlinks/plugins/url_launcher_windows/ios"
SPEC CHECKSUMS: SPEC CHECKSUMS:
Alamofire: 85e8a02c69d6020a0d734f6054870d7ecb75cf18 Alamofire: 85e8a02c69d6020a0d734f6054870d7ecb75cf18
barcode_scan: a5c27959edfafaa0c771905bad0b29d6d39e4479 barcode_scan: a5c27959edfafaa0c771905bad0b29d6d39e4479
connectivity: 6e94255659cc86dcbef1d452ad3e0491bb1b3e75 connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467
connectivity_for_web: 2b8584556930d4bd490d82b836bcf45067ce345b
connectivity_macos: e2e9731b6b22dda39eb1b128f6969d574460e191 connectivity_macos: e2e9731b6b22dda39eb1b128f6969d574460e191
device_info: d7d233b645a32c40dfdc212de5cf646ca482f175 device_info: d7d233b645a32c40dfdc212de5cf646ca482f175
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
@ -126,20 +167,27 @@ SPEC CHECKSUMS:
hexcolor: fdfb9c4258ad96e949c2dbcdf790a62194b8aa89 hexcolor: fdfb9c4258ad96e949c2dbcdf790a62194b8aa89
imei_plugin: cb1af7c223ac2d82dcd1457a7137d93d65d2a3cd imei_plugin: cb1af7c223ac2d82dcd1457a7137d93d65d2a3cd
local_auth: 25938960984c3a7f6e3253e3f8d962fdd16852bd local_auth: 25938960984c3a7f6e3253e3f8d962fdd16852bd
maps_launcher: eae38ee13a9c3f210fa04e04bb4c073fa4c6ed92
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
OpenTok: fde03ecc5ea31fe0a453242847c4ee1f47e1d735 OpenTok: fde03ecc5ea31fe0a453242847c4ee1f47e1d735
permission_handler: 6226fcb78b97c7c7458a95c7346a11d5184fec12 path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4
path_provider_windows: a2b81600c677ac1959367280991971cb9a1edb3b
permission_handler: eac8e15b4a1a3fba55b761d19f3f4e6b005d15b6
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
shared_preferences_linux: afefbfe8d921e207f01ede8b60373d9e3b566b78
shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087 shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087
shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9 shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9
shared_preferences_windows: 36b76d6f54e76ead957e60b49e2f124b4cd3e6ae
speech_to_text: b43a7d99aef037bd758ed8e45d79bbac035d2dfe speech_to_text: b43a7d99aef037bd758ed8e45d79bbac035d2dfe
SwiftProtobuf: ecbec1be9036d15655f6b3443a1c4ea693c97932 SwiftProtobuf: ecbec1be9036d15655f6b3443a1c4ea693c97932
Try: 5ef669ae832617b3cee58cb2c6f99fb767a4ff96 Try: 5ef669ae832617b3cee58cb2c6f99fb767a4ff96
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
url_launcher_linux: ac237cb7a8058736e4aae38bdbcc748a4b394cc0
url_launcher_macos: fd7894421cd39320dce5f292fc99ea9270b2a313 url_launcher_macos: fd7894421cd39320dce5f292fc99ea9270b2a313
url_launcher_web: e5527357f037c87560776e36436bf2b0288b965c url_launcher_web: e5527357f037c87560776e36436bf2b0288b965c
url_launcher_windows: 683d7c283894db8d1914d3ab2223b20cc1ad95d5
PODFILE CHECKSUM: 649616dc336b3659ac6b2b25159d8e488e042b69 PODFILE CHECKSUM: 649616dc336b3659ac6b2b25159d8e488e042b69
COCOAPODS: 1.9.3 COCOAPODS: 1.10.0

@ -40,7 +40,6 @@ class BaseAppClient {
String token = await sharedPref.getString(TOKEN); String token = await sharedPref.getString(TOKEN);
if (profile != null) { if (profile != null) {
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
if (body['DoctorID'] == null) if (body['DoctorID'] == null)
body['DoctorID'] = doctorProfile?.doctorID; body['DoctorID'] = doctorProfile?.doctorID;
body['EditedBy'] = doctorProfile?.doctorID; body['EditedBy'] = doctorProfile?.doctorID;
@ -79,39 +78,23 @@ class BaseAppClient {
'Accept': 'application/json' 'Accept': 'application/json'
}); });
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
if (statusCode < 200 || statusCode >= 400 || json == null) { if (statusCode < 200 || statusCode >= 400 ) {
onFailure('Error While Fetching data', statusCode); onFailure('Error While Fetching data', statusCode);
} else { } else {
var parsed = json.decode(response.body.toString()); var parsed = json.decode(response.body.toString());
if (!parsed['IsAuthenticated']) { // if (!parsed['IsAuthenticated']) {
// TODO: return it back when IsAuthenticated work fine in all service // // TODO: return it back when IsAuthenticated work fine in all service
// await helpers.logout(); // // await helpers.logout();
// //
// helpers.showErrorToast('Your session expired Please login agian'); // helpers.showErrorToast('Your session expired Please login agian');
} else if (parsed['MessageStatus'] == 1) { // } else
onSuccess(parsed, statusCode); if (parsed['MessageStatus'] == 1) {
if(!parsed['IsAuthenticated'])
onFailure(getError(parsed), statusCode);
else
onSuccess(parsed, statusCode);
} else { } else {
String error = onFailure(getError(parsed), statusCode);
parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'];
if (parsed["ValidationErrors"] != null) {
error =
parsed["ValidationErrors"]["StatusMessage"].toString() + "\n";
if (parsed["ValidationErrors"]["ValidationErrors"] != null &&
parsed["ValidationErrors"]["ValidationErrors"].length != 0) {
for (var i = 0;
i < parsed["ValidationErrors"]["ValidationErrors"].length;
i++) {
error = error +
parsed["ValidationErrors"]["ValidationErrors"][i]
["Messages"][0] +
"\n";
}
}
}
onFailure(error, statusCode);
} }
} }
} else { } else {
@ -122,4 +105,26 @@ class BaseAppClient {
onFailure(e.toString(), -1); onFailure(e.toString(), -1);
} }
} }
String getError(parsed){
//TODO change this fun
String error = parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'];
if (parsed["ValidationErrors"] != null) {
error = parsed["ValidationErrors"]["StatusMessage"].toString() + "\n";
if (parsed["ValidationErrors"]["ValidationErrors"] != null &&
parsed["ValidationErrors"]["ValidationErrors"].length != 0) {
for (var i = 0;
i < parsed["ValidationErrors"]["ValidationErrors"].length;
i++) {
error = error +
parsed["ValidationErrors"]["ValidationErrors"][i]
["Messages"][0] +
"\n";
}
}
}
return error;
}
} }

@ -120,6 +120,9 @@ const GET_MASTER_LOOKUP_LIST =
'Services/DoctorApplication.svc/REST/GetMasterLookUpList'; 'Services/DoctorApplication.svc/REST/GetMasterLookUpList';
const POST_ALLERGY = 'Services/DoctorApplication.svc/REST/PostAllergies'; const POST_ALLERGY = 'Services/DoctorApplication.svc/REST/PostAllergies';
const POST_HISTORY = 'Services/DoctorApplication.svc/REST/PostHistory'; const POST_HISTORY = 'Services/DoctorApplication.svc/REST/PostHistory';
const POST_CHIEF_COMPLAINT = 'Services/DoctorApplication.svc/REST/PostChiefcomplaint';
const POST_PHYSICAL_EXAM = 'Services/DoctorApplication.svc/REST/PostPhysicalExam';
const POST_PROGRESS_NOTE = '/Services/DoctorApplication.svc/REST/PostProgressNote';
const POST_CHIEF_COMPLAINT = const POST_CHIEF_COMPLAINT =
'Services/DoctorApplication.svc/REST/PostChiefcomplaint'; 'Services/DoctorApplication.svc/REST/PostChiefcomplaint';
const GET_CATEGORISE_PROCEDURE = const GET_CATEGORISE_PROCEDURE =
@ -181,8 +184,6 @@ const CHANNEL = 9;
const SESSION_ID = 'BlUSkYymTt'; const SESSION_ID = 'BlUSkYymTt';
const IS_LOGIN_FOR_DOCTOR_APP = true; const IS_LOGIN_FOR_DOCTOR_APP = true;
const PATIENT_OUT_SA = false; const PATIENT_OUT_SA = false;
const VIDA_AUTH =
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxNDg1IiwianRpIjoiMmI5ZTZlYmYtZmYzMC00ZmEyLTgwYjUtZGJlODM2MmZlNmNhIiwiZW1haWwiOiJNb2hhbWVkLlJlc3dhbkBjbG91ZHNvbHV0aW9uLXNhLmNvbSIsImlkIjoiMTQ4NSIsIk5hbWUiOiJTSEFLRVJBIFBBUlZFRU4gKFVTRUQgQlkgRVNFUlZJQ0VTKSIsIkVtcGxveWVlSWQiOiIxNDg1IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiIxNDg1IiwiU0VTU0lPTklEIjoiMjE1NzU3MTYiLCJDbGluaWNJZCI6IjMiLCJyb2xlIjoiRE9DVE9SUyIsIm5iZiI6MTYwNzk3Mjk1MCwiZXhwIjoxNjA4ODM2OTUwLCJpYXQiOjE2MDc5NzI5NTB9.nHDltbMuIA3o4Gqa7mQ88fowDy6Oey9fG1zF45dumec';
/// Timer Info /// Timer Info
const TIMER_MIN = 10; const TIMER_MIN = 10;

@ -7,7 +7,9 @@ enum MasterKeysService {
HistorySurgical, HistorySurgical,
PhysicalExamination, PhysicalExamination,
AllergySeverity, AllergySeverity,
physiotherapyGoals physiotherapyGoals,
DiagnosisCondition,
DiagnosisType
} }
extension SelectedMasterKeysService on MasterKeysService { extension SelectedMasterKeysService on MasterKeysService {
@ -40,6 +42,11 @@ extension SelectedMasterKeysService on MasterKeysService {
break; break;
case MasterKeysService.physiotherapyGoals: case MasterKeysService.physiotherapyGoals:
return 117; return 117;
break;case MasterKeysService.DiagnosisCondition:
return 34;
break;
case MasterKeysService.DiagnosisType:
return 35;
break; break;
} }
} }

@ -4,6 +4,8 @@ import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_allergy_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_allergy_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_chief_complaint_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_chief_complaint_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_histories_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_histories_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_physical_exam_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.dart';
import 'base/lookup-service.dart'; import 'base/lookup-service.dart';
@ -55,9 +57,33 @@ class SOAPService extends LookupService {
await baseAppClient.post(POST_CHIEF_COMPLAINT, await baseAppClient.post(POST_CHIEF_COMPLAINT,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: postChiefComplaintRequestModel.toJson()); }, body: postChiefComplaintRequestModel.toJson());
}
Future postPhysicalExam(
PostPhysicalExamRequestModel postPhysicalExamRequestModel) async {
hasError = false;
await baseAppClient.post(POST_PHYSICAL_EXAM,
onSuccess: (dynamic response, int statusCode) {
print("Success");
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: postPhysicalExamRequestModel.toJson());
}
Future postProgressNote(
PostProgressNoteRequestModel postProgressNoteRequestModel) async {
hasError = false;
await baseAppClient.post(POST_PROGRESS_NOTE,
onSuccess: (dynamic response, int statusCode) {
print("Success");
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: postProgressNoteRequestModel.toJson());
} }
} }

@ -31,6 +31,8 @@ class LookupService extends BaseService {
List<MasterKeyModel> _physicalExaminationList = []; List<MasterKeyModel> _physicalExaminationList = [];
// List<MasterKeyModel> listOfPhysiotherapyGoals = []; // List<MasterKeyModel> listOfPhysiotherapyGoals = [];
List<MasterKeyModel> listOfDiagnosisType = [];
List<MasterKeyModel> listOfDiagnosisCondition = [];
Future getMasterLookup(MasterKeysService masterKeys) async { Future getMasterLookup(MasterKeysService masterKeys) async {
hasError = false; hasError = false;
@ -103,6 +105,21 @@ class LookupService extends BaseService {
listOfPhysiotherapyGoals.add(MasterKeyModel.fromJson(v)); listOfPhysiotherapyGoals.add(MasterKeyModel.fromJson(v));
}); });
break; break;
case MasterKeysService.DiagnosisType:
listOfDiagnosisType.clear();
entryList.forEach((v) {
listOfDiagnosisType
.add(MasterKeyModel.fromJson(v));
});
break;
case MasterKeysService.DiagnosisCondition:
listOfDiagnosisCondition.clear();
entryList.forEach((v) {
listOfDiagnosisCondition
.add(MasterKeyModel.fromJson(v));
});
break;
} }
} }
} }

@ -7,6 +7,8 @@ import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_allergy_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_allergy_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_chief_complaint_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_chief_complaint_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_histories_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_histories_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_physical_exam_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.dart';
import '../../locator.dart'; import '../../locator.dart';
import 'base_view_model.dart'; import 'base_view_model.dart';
@ -30,6 +32,8 @@ class SOAPViewModel extends BaseViewModel {
List<MasterKeyModel> get historySurgicalList => _SOAPService.historySurgicalList; List<MasterKeyModel> get historySurgicalList => _SOAPService.historySurgicalList;
List<MasterKeyModel> get mergeHistorySurgicalWithHistorySportList => [...historySurgicalList,...historySportList]; List<MasterKeyModel> get mergeHistorySurgicalWithHistorySportList => [...historySurgicalList,...historySportList];
List<MasterKeyModel> get physicalExaminationList => _SOAPService.physicalExaminationList; List<MasterKeyModel> get physicalExaminationList => _SOAPService.physicalExaminationList;
List<MasterKeyModel> get listOfDiagnosisType => _SOAPService.listOfDiagnosisType;
List<MasterKeyModel> get listOfDiagnosisCondition => _SOAPService.listOfDiagnosisCondition;
@ -83,5 +87,25 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future postPhysicalExam(PostPhysicalExamRequestModel postPhysicalExamRequestModel) async {
setState(ViewState.BusyLocal);
await _SOAPService.postPhysicalExam(postPhysicalExamRequestModel);
if (_SOAPService.hasError) {
error = _SOAPService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
Future postProgressNote(PostProgressNoteRequestModel postProgressNoteRequestModel) async {
setState(ViewState.BusyLocal);
await _SOAPService.postProgressNote(postProgressNoteRequestModel);
if (_SOAPService.hasError) {
error = _SOAPService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
} }

@ -0,0 +1,47 @@
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
class MySelectedAssessment {
MasterKeyModel selectedICD;
MasterKeyModel selectedDiagnosisCondition;
MasterKeyModel selectedDiagnosisType;
String remark;
int appointmentId;
MySelectedAssessment(
{this.selectedICD,
this.selectedDiagnosisCondition,
this.selectedDiagnosisType,
this.remark, this.appointmentId});
MySelectedAssessment.fromJson(Map<String, dynamic> json) {
selectedICD = json['selectedICD'] != null
? new MasterKeyModel.fromJson(json['selectedICD'])
: null;
selectedDiagnosisCondition = json['selectedDiagnosisCondition'] != null
? new MasterKeyModel.fromJson(json['selectedDiagnosisCondition'])
: null;
selectedDiagnosisType = json['selectedDiagnosisType'] != null
? new MasterKeyModel.fromJson(json['selectedDiagnosisType'])
: null;
remark = json['remark'];
appointmentId = json['appointmentId'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.selectedICD != null) {
data['selectedICD'] = this.selectedICD.toJson();
}
if (this.selectedDiagnosisCondition != null) {
data['selectedICD'] = this.selectedDiagnosisCondition.toJson();
}
if (this.selectedDiagnosisType != null) {
data['selectedICD'] = this.selectedDiagnosisType.toJson();
}
data['remark'] = this.remark;
data['appointmentId'] = this.appointmentId;
return data;
}
}

@ -1,31 +1,31 @@
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
class PostPhysicalExamRequestModel { class PostPhysicalExamRequestModel {
List<ListHisProgNotePhysicalVM> listHisProgNotePhysicalVM; List<ListHisProgNotePhysicalExaminationVM> listHisProgNotePhysicalExaminationVM;
PostPhysicalExamRequestModel({this.listHisProgNotePhysicalVM}); PostPhysicalExamRequestModel({this.listHisProgNotePhysicalExaminationVM});
PostPhysicalExamRequestModel.fromJson(Map<String, dynamic> json) { PostPhysicalExamRequestModel.fromJson(Map<String, dynamic> json) {
if (json['listHisProgNotePhysicalVM'] != null) { if (json['listHisProgNotePhysicalExaminationVM'] != null) {
listHisProgNotePhysicalVM = new List<ListHisProgNotePhysicalVM>(); listHisProgNotePhysicalExaminationVM = new List<ListHisProgNotePhysicalExaminationVM>();
json['listHisProgNotePhysicalVM'].forEach((v) { json['listHisProgNotePhysicalExaminationVM'].forEach((v) {
listHisProgNotePhysicalVM listHisProgNotePhysicalExaminationVM
.add(new ListHisProgNotePhysicalVM.fromJson(v)); .add(new ListHisProgNotePhysicalExaminationVM.fromJson(v));
}); });
} }
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.listHisProgNotePhysicalVM != null) { if (this.listHisProgNotePhysicalExaminationVM != null) {
data['listHisProgNotePhysicalVM'] = data['listHisProgNotePhysicalExaminationVM'] =
this.listHisProgNotePhysicalVM.map((v) => v.toJson()).toList(); this.listHisProgNotePhysicalExaminationVM.map((v) => v.toJson()).toList();
} }
return data; return data;
} }
} }
class ListHisProgNotePhysicalVM { class ListHisProgNotePhysicalExaminationVM {
int episodeId; int episodeId;
int appointmentNo; int appointmentNo;
int examType; int examType;
@ -41,7 +41,7 @@ class ListHisProgNotePhysicalVM {
bool notExamined; bool notExamined;
MasterKeyModel masterDescription; MasterKeyModel masterDescription;
ListHisProgNotePhysicalVM( ListHisProgNotePhysicalExaminationVM(
{this.episodeId, {this.episodeId,
this.appointmentNo, this.appointmentNo,
this.examType, this.examType,
@ -57,7 +57,7 @@ class ListHisProgNotePhysicalVM {
this.notExamined, this.notExamined,
this.masterDescription}); this.masterDescription});
ListHisProgNotePhysicalVM.fromJson(Map<String, dynamic> json) { ListHisProgNotePhysicalExaminationVM.fromJson(Map<String, dynamic> json) {
episodeId = json['episodeId']; episodeId = json['episodeId'];
appointmentNo = json['appointmentNo']; appointmentNo = json['appointmentNo'];
examType = json['examType']; examType = json['examType'];

@ -0,0 +1,25 @@
class PostProgressNoteRequestModel {
int appointmentNo;
int episodeId;
int patientMRN;
String planNote;
PostProgressNoteRequestModel(
{this.appointmentNo, this.episodeId, this.patientMRN, this.planNote});
PostProgressNoteRequestModel.fromJson(Map<String, dynamic> json) {
appointmentNo = json['AppointmentNo'];
episodeId = json['EpisodeId'];
patientMRN = json['PatientMRN'];
planNote = json['PlanNote'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['AppointmentNo'] = this.appointmentNo;
data['EpisodeId'] = this.episodeId;
data['PatientMRN'] = this.patientMRN;
data['PlanNote'] = this.planNote;
return data;
}
}

@ -1,20 +1,3 @@
import 'dart:convert';
//PatiantInformtion patiantInformtionFromJson(String str) => PatiantInformtion.fromJson(json.decode(str));
////String patiantInformtionToJson(PatiantInformtion data) => json.encode(data.toJson());
//****************************** */
/*
*@author: Amjad Amireh
*@Date:27/4/2020
*@param:
*@return:Patian information Model
*@desc:
*/
class PatiantInformtion { class PatiantInformtion {
final List<PatiantInformtion> list; final List<PatiantInformtion> list;

@ -348,7 +348,8 @@ class Helpers {
String lang = await sharedPref.getString(APP_Language); String lang = await sharedPref.getString(APP_Language);
await clearSharedPref(); await clearSharedPref();
sharedPref.setString(APP_Language, lang); sharedPref.setString(APP_Language, lang);
// Navigator.of(AppGlobal.CONTEX).pushReplacementNamed(LOGIN); Navigator.of(AppGlobal.CONTEX).pushReplacementNamed(LOGIN);
Navigator.of(AppGlobal.CONTEX).popUntil((ModalRoute.withName(LOGIN))); // TODO Fix it
// Navigator.of(AppGlobal.CONTEX).popUntil((ModalRoute.withName(LOGIN)));
} }
} }

@ -2,6 +2,7 @@ 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/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_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/my_selected_allergy.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_assement.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.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/screens/base/base_view.dart';
@ -32,6 +33,7 @@ class _AddSOAPIndexState extends State<AddSOAPIndex>
List<MySelectedAllergy> myAllergiesList= List(); List<MySelectedAllergy> myAllergiesList= List();
List<MasterKeyModel> myHistoryList = List(); List<MasterKeyModel> myHistoryList = List();
List<MySelectedExamination> mySelectedExamination = List(); List<MySelectedExamination> mySelectedExamination = List();
MySelectedAssessment mySelectedAssessment = new MySelectedAssessment();
changePageViewIndex(pageIndex) { changePageViewIndex(pageIndex) {
_controller.jumpToPage(pageIndex); _controller.jumpToPage(pageIndex);
} }
@ -108,10 +110,13 @@ class _AddSOAPIndexState extends State<AddSOAPIndex>
), ),
], ],
), ),
AppText( Container(
"ALLERGIC TO: FOOD, ASPIRIN, EGG WHITE", width: MediaQuery.of(context).size.width *0.65,
color: Color(0xFFB9382C), child: AppText(
fontWeight: FontWeight.bold, "ALLERGIC TO: FOOD, ASPIRIN, EGG WHITE",
color: Color(0xFFB9382C),
fontWeight: FontWeight.bold,
),
), ),
], ],
) )
@ -156,7 +161,7 @@ class _AddSOAPIndexState extends State<AddSOAPIndex>
children: <Widget>[ children: <Widget>[
SubjectivePage(changePageViewIndex: changePageViewIndex,myAllergiesList: myAllergiesList,myHistoryList: myHistoryList,), SubjectivePage(changePageViewIndex: changePageViewIndex,myAllergiesList: myAllergiesList,myHistoryList: myHistoryList,),
ObjectivePage(changePageViewIndex: changePageViewIndex,mySelectedExamination:mySelectedExamination), ObjectivePage(changePageViewIndex: changePageViewIndex,mySelectedExamination:mySelectedExamination),
AssessmentPage(changePageViewIndex: changePageViewIndex,), AssessmentPage(changePageViewIndex: changePageViewIndex,mySelectedAssessment:mySelectedAssessment),
PlanPage(changePageViewIndex: changePageViewIndex,) PlanPage(changePageViewIndex: changePageViewIndex,)
], ],
), ),

@ -1,11 +1,16 @@
import 'package:doctor_app_flutter/config/config.dart'; 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_assement.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/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.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/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.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_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_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/dialogs/master_key_dailog.dart';
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.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:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart';
@ -14,8 +19,10 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
class AssessmentPage extends StatefulWidget { class AssessmentPage extends StatefulWidget {
final Function changePageViewIndex; final Function changePageViewIndex;
final MySelectedAssessment mySelectedAssessment;
AssessmentPage({Key key, this.changePageViewIndex}); AssessmentPage(
{Key key, this.changePageViewIndex, this.mySelectedAssessment});
@override @override
_AssessmentPageState createState() => _AssessmentPageState(); _AssessmentPageState createState() => _AssessmentPageState();
@ -33,61 +40,64 @@ class _AssessmentPageState extends State<AssessmentPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size; final screenSize = MediaQuery.of(context).size;
return AppScaffold( return BaseView<SOAPViewModel>(
isShowAppBar: false, builder: (_, model, w) => AppScaffold(
body: SingleChildScrollView( isShowAppBar: false,
physics: ScrollPhysics(), body: SingleChildScrollView(
child: Center( physics: ScrollPhysics(),
child: FractionallySizedBox( child: Center(
widthFactor: 0.9, child: FractionallySizedBox(
child: Column( widthFactor: 0.9,
mainAxisAlignment: MainAxisAlignment.start, child: Column(
children: [ mainAxisAlignment: MainAxisAlignment.start,
SizedBox( children: [
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( SizedBox(
height: 20, height: 30,
), ),
Column( HeaderBodyExpandableNotifier(
children: [ headerWidget: Row(
Container( mainAxisAlignment: MainAxisAlignment.spaceBetween,
margin: EdgeInsets.only(left: 5, right: 5, top: 15), children: [
child: TextFields( Row(
hintText: "Add ASSESSMENT", children: [
fontSize: 13.5, Texts('ASSESSMENT',
onTapTextFields: () { variant:
openAssessmentDialog(context); 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, readOnly: true,
// hintColor: Colors.black, // hintColor: Colors.black,
suffixIcon: EvaIcons.plusCircleOutline, suffixIcon: EvaIcons.plusCircleOutline,
@ -96,184 +106,247 @@ class _AssessmentPageState extends State<AssessmentPage> {
// controller: messageController, // controller: messageController,
validator: (value) { validator: (value) {
if (value == null) if (value == null)
return TranslationBase.of(context) return TranslationBase
.of(context)
.emptyMessage; .emptyMessage;
else else
return null; return null;
}), }),
),
SizedBox(
height: 20,
),
if(widget.mySelectedAssessment != null &&
widget.mySelectedAssessment
.appointmentId !=
null && widget.mySelectedAssessment
.selectedDiagnosisType != null &&
widget.mySelectedAssessment
.selectedDiagnosisCondition != null)
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(
widget.mySelectedAssessment
.appointmentId
.toString(),
fontSize: 10,
color: Colors.grey,
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
widget.mySelectedAssessment
.selectedDiagnosisCondition
.nameEn,
fontWeight: FontWeight.bold,
fontSize: 16,
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Type : ",
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
widget.mySelectedAssessment
.selectedDiagnosisType
.nameEn,
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( SizedBox(
height: 20, height: 30,
), ),
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) { openAssessmentDialog(BuildContext context) {
final screenSize = MediaQuery.of(context).size; showModalBottomSheet(
InputDecoration textFieldSelectorDecoration( backgroundColor: Colors.white,
String hintText, String selectedText, bool isDropDown) { isScrollControlled: true,
context: context,
builder: (context) {
return AddAssessmentDetails(
mySelectedAssessment: widget.mySelectedAssessment,
addSelectedAssessment: () {
setState(() {
Navigator.of(context).pop();
});
});
});
}
}
class AddAssessmentDetails extends StatefulWidget {
final MySelectedAssessment mySelectedAssessment;
final Function() addSelectedAssessment;
const AddAssessmentDetails(
{Key key, this.mySelectedAssessment, this.addSelectedAssessment})
: super(key: key);
@override
_AddAssessmentDetailsState createState() => _AddAssessmentDetailsState();
}
class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
MasterKeyModel _selectedDiagnosisCondition;
MasterKeyModel _selectedDiagnosisType;
TextEditingController remarkController = TextEditingController();
TextEditingController appointmentIdController = TextEditingController(
text: "234567");
@override
Widget build(BuildContext context) {
final screenSize = MediaQuery
.of(context)
.size;
InputDecoration textFieldSelectorDecoration(String hintText,
String selectedText, bool isDropDown) {
//TODO: make one Input InputDecoration for all //TODO: make one Input InputDecoration for all
return InputDecoration( return InputDecoration(
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
@ -296,199 +369,237 @@ class _AssessmentPageState extends State<AssessmentPage> {
), ),
); );
} }
return FractionallySizedBox(
showModalBottomSheet( heightFactor: 0.75,
backgroundColor: Colors.white, child: BaseView<SOAPViewModel>(
isScrollControlled: true, onModelReady: (model) async {
context: context, if (model.listOfDiagnosisCondition.length == 0) {
builder: (context) { await model.getMasterLookup(MasterKeysService.DiagnosisCondition);
return FractionallySizedBox( }
heightFactor: 0.75, if (model.listOfDiagnosisType.length == 0) {
widthFactor: 0.9, await model.getMasterLookup(MasterKeysService.DiagnosisType);
}
child: Container( },
child: Column( builder: (_, model, w) =>
crossAxisAlignment: CrossAxisAlignment.start, AppScaffold(
children: [ baseViewModel: model,
SizedBox( isShowAppBar: false,
height: 16, body: SingleChildScrollView(
), child: Center(
AppText( child: FractionallySizedBox(
"Add Assessment Details".toUpperCase(), widthFactor: 0.9,
fontWeight: FontWeight.bold, child: Container(
fontSize: 16, child: Column(
), crossAxisAlignment: CrossAxisAlignment.start,
SizedBox( children: [
height: 16, SizedBox(
), height: 16,
Container( ),
height: screenSize.height * 0.070, AppText(
child: InkWell( "Add Assessment Details".toUpperCase(),
onTap: assessmentList != null fontWeight: FontWeight.bold,
? () { fontSize: 16,
ListSelectDialog dialog = ListSelectDialog( ),
list: assessmentList, SizedBox(
attributeName: 'name', height: 16,
attributeValueId: 'id', ),
okText: TranslationBase.of(context).ok, Container(
okFunction: (selectedValue) { margin: EdgeInsets.only(
left: 0, right: 0, top: 15),
child: TextFields(
hintText: "Appointment Number",
fontSize: 13.5,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
readOnly: true,
controller: appointmentIdController,
validator: (value) {
if (value == null)
return TranslationBase
.of(context)
.emptyMessage;
else
return null;
}),
),
SizedBox(
height: 10,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: model.listOfDiagnosisCondition !=
null
? () {
MasterKeyDailog dialog = MasterKeyDailog(
list: model.listOfDiagnosisCondition,
okText: TranslationBase
.of(context)
.ok,
okFunction: (
MasterKeyModel selectedValue) {
setState(() {
_selectedDiagnosisCondition =
selectedValue;
widget.mySelectedAssessment
.selectedDiagnosisCondition =
selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
"Condition",
_selectedDiagnosisCondition != null
? _selectedDiagnosisCondition
.nameEn
: null,
true),
enabled: false,
),
),
),
SizedBox(
height: 10,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: model.listOfDiagnosisCondition !=
null
? () {
MasterKeyDailog dialog = MasterKeyDailog(
list: model.listOfDiagnosisCondition,
okText: TranslationBase
.of(context)
.ok,
okFunction: (
MasterKeyModel selectedValue) {
setState(() {
_selectedDiagnosisCondition =
selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
"Condition",
_selectedDiagnosisCondition != null
? _selectedDiagnosisCondition
.nameEn
: null,
true),
enabled: false,
),
),
),
SizedBox(
height: 10,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: model.listOfDiagnosisType != null
? () {
MasterKeyDailog dialog = MasterKeyDailog(
list: model.listOfDiagnosisType,
okText: TranslationBase
.of(context)
.ok,
okFunction: (
MasterKeyModel selectedValue) {
setState(() {
_selectedDiagnosisType =
selectedValue;
widget.mySelectedAssessment
.selectedDiagnosisType =
_selectedDiagnosisType;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
"Type",
_selectedDiagnosisType != null
? _selectedDiagnosisType.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: 18,
minLines: 5,
controller: remarkController,
validator: (value) {
if (value == null)
return TranslationBase
.of(context)
.emptyMessage;
else
return null;
}),
),
SizedBox(
height: 10,
),
AppButton(
title: "Add".toUpperCase(),
onPressed: () {
setState(() { setState(() {
// model.getDoctorBranch().then((value) { widget.mySelectedAssessment.remark =
// _selectedBranch = value; remarkController.text;
// if (_referTo['id'] == 1) { widget.mySelectedAssessment
// model.getClinics( .appointmentId = int.parse(
// _selectedBranch['ID']); appointmentIdController.text);
// }
// }); widget.addSelectedAssessment();
}); });
}, },
); ),
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: () {},
),
])),
);
});
} }
} }

@ -1,9 +1,11 @@
import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/config/config.dart'; 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/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.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/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart';
import 'package:doctor_app_flutter/models/SOAP/post_physical_exam_request_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.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/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
@ -49,7 +51,9 @@ class _ObjectivePageState extends State<ObjectivePage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size; final screenSize = MediaQuery.of(context).size;
return AppScaffold( return BaseView<SOAPViewModel>(
// onModelReady: (model) => model.getMasterLookup(MasterKeysService.Allergies),
builder: (_, model, w) => AppScaffold(
isShowAppBar: false, isShowAppBar: false,
body: SingleChildScrollView( body: SingleChildScrollView(
physics: ScrollPhysics(), physics: ScrollPhysics(),
@ -161,7 +165,12 @@ class _ObjectivePageState extends State<ObjectivePage> {
0.070, 0.070,
decoration: decoration:
containerBorderDecoration( containerBorderDecoration(
Colors.white, examination
.isNormal
? Color(
0xFF515A5D)
: Colors
.white,
Colors.grey), Colors.grey),
child: Center( child: Center(
child: Padding( child: Padding(
@ -173,17 +182,28 @@ class _ObjectivePageState extends State<ObjectivePage> {
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
color: color:
Colors.black, examination
.isNormal
? Colors.white
: Colors
.black,
//Colors.black, //Colors.black,
fontWeight: fontWeight:
FontWeight FontWeight
.bold, .bold,
), ),
), ),
), ),
)), )),
), ),
onTap: () {}), onTap: () {
setState(() {
examination.isAbnormal =
!examination.isAbnormal;
examination.isNormal =
!examination.isNormal;
});
}),
SizedBox( SizedBox(
width: 12, width: 12,
), ),
@ -191,33 +211,49 @@ class _ObjectivePageState extends State<ObjectivePage> {
child: Center( child: Center(
child: Container( child: Container(
height: height:
screenSize.height * screenSize.height *
0.070, 0.070,
decoration: decoration:
containerBorderDecoration( containerBorderDecoration(
Color(0xFF515A5D), examination
Colors.black), .isAbnormal
? Color(
0xFF515A5D)
: Colors
.white,
Colors.black),
child: Center( child: Center(
child: Padding( child: Padding(
padding: padding:
const EdgeInsets const EdgeInsets
.all(8.0), .all(8.0),
child: Text( child: Text(
"Abnormal", "Abnormal",
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
color: color:
Colors.white, examination
.isAbnormal
? Colors.white
: Colors
.black,
//Colors.black, //Colors.black,
fontWeight: fontWeight:
FontWeight FontWeight
.bold, .bold,
), ),
), ),
), ),
)), )),
), ),
onTap: () {}), onTap: () {
setState(() {
examination.isAbnormal =
!examination.isAbnormal;
examination.isNormal =
!examination.isNormal;
});
}),
], ],
), ),
InkWell( InkWell(
@ -268,10 +304,11 @@ class _ObjectivePageState extends State<ObjectivePage> {
DividerWithSpacesAround(height: 30,), DividerWithSpacesAround(height: 30,),
AppButton( AppButton(
title: TranslationBase.of(context).next, title: TranslationBase.of(context).next,
onPressed: () { loading: model.state == ViewState.BusyLocal,
widget.changePageViewIndex(2); onPressed: () async {
}, await submitObjectivePage(model);
), },
),
SizedBox( SizedBox(
height: 30, height: 30,
), ),
@ -279,7 +316,48 @@ class _ObjectivePageState extends State<ObjectivePage> {
), ),
), ),
), ),
)); )));
}
submitObjectivePage(SOAPViewModel model) async {
if(widget.mySelectedExamination.isNotEmpty){
PostPhysicalExamRequestModel postPhysicalExamRequestModel = new PostPhysicalExamRequestModel();
widget.mySelectedExamination.forEach((exam) {
if (postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM ==
null)
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM = [];
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM.add(
ListHisProgNotePhysicalExaminationVM(
patientMRN: 3120690,
episodeId: 200012117,
appointmentNo: 2016054573,
remarks: exam.remark ?? '',
createdBy: 1485,
createdOn: DateTime.now().toIso8601String(),
editedBy: 1485,
editedOn: DateTime.now().toIso8601String(),
examId: exam.selectedExamination.id,
examType: exam.selectedExamination.typeId,
isAbnormal: exam.isAbnormal,
isNormal: exam.isNormal,
masterDescription: exam.selectedExamination,
notExamined: false
));
});
await model.postPhysicalExam(postPhysicalExamRequestModel);
if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error);
} else {
}
}
// TODO move it back to else stat when it work.
widget.changePageViewIndex(2);
} }
removeExamination(MasterKeyModel masterKey) { removeExamination(MasterKeyModel masterKey) {

@ -1,4 +1,9 @@
import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/config/config.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/post_progress_note_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/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.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/TextFields.dart';
@ -25,7 +30,9 @@ class _PlanPageState extends State<PlanPage> {
List<dynamic> progressNoteList; List<dynamic> progressNoteList;
TextEditingController progressNoteController = TextEditingController(); TextEditingController progressNoteController =
TextEditingController(text: null);
BoxDecoration containerBorderDecoration( BoxDecoration containerBorderDecoration(
Color containerColor, Color borderColor) { Color containerColor, Color borderColor) {
return BoxDecoration( return BoxDecoration(
@ -38,11 +45,14 @@ class _PlanPageState extends State<PlanPage> {
)), )),
); );
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size; final screenSize = MediaQuery.of(context).size;
return AppScaffold( return BaseView<SOAPViewModel>(
// onModelReady: (model) => model.getMasterLookup(MasterKeysService.Allergies),
builder: (_, model, w) => AppScaffold(
isShowAppBar: false, isShowAppBar: false,
body: SingleChildScrollView( body: SingleChildScrollView(
physics: ScrollPhysics(), physics: ScrollPhysics(),
@ -98,7 +108,7 @@ class _PlanPageState extends State<PlanPage> {
hintText: "Add Progress Note", hintText: "Add Progress Note",
fontSize: 13.5, fontSize: 13.5,
onTapTextFields: () { onTapTextFields: () {
openExaminationList(context); openProgressNote(context);
}, },
readOnly: true, readOnly: true,
// hintColor: Colors.black, // hintColor: Colors.black,
@ -108,7 +118,8 @@ class _PlanPageState extends State<PlanPage> {
// controller: messageController, // controller: messageController,
validator: (value) { validator: (value) {
if (value == null) if (value == null)
return TranslationBase.of(context) return TranslationBase
.of(context)
.emptyMessage; .emptyMessage;
else else
return null; return null;
@ -117,104 +128,117 @@ class _PlanPageState extends State<PlanPage> {
SizedBox( SizedBox(
height: 20, height: 20,
), ),
Container( if (progressNoteController.text.isNotEmpty)
margin: EdgeInsets.only(left: 5, right: 5, top: 15), Container(
child: Row( margin:
mainAxisAlignment: MainAxisAlignment.spaceBetween, EdgeInsets.only(left: 5, right: 5, top: 15),
crossAxisAlignment: CrossAxisAlignment.start, child: Row(
children: [ mainAxisAlignment:
Column( MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Column( Column(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.start,
MainAxisAlignment.start, children: [
crossAxisAlignment: Column(
CrossAxisAlignment.start, mainAxisAlignment:
children: [ MainAxisAlignment.start,
AppText( crossAxisAlignment:
"12".toUpperCase(), CrossAxisAlignment.start,
fontWeight: FontWeight.bold, children: [
fontSize: 16, AppText(
), "12".toUpperCase(),
AppText( fontWeight: FontWeight.bold,
"DEC".toUpperCase(), fontSize: 16,
fontSize: 10, ),
color: Colors.grey, AppText(
), "DEC".toUpperCase(),
], fontSize: 10,
) color: Colors.grey,
], ),
), ],
Column( )
crossAxisAlignment: CrossAxisAlignment.start, ],
children: [ ),
Column(
crossAxisAlignment: CrossAxisAlignment
.start,
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
SizedBox(
height: 6,
),
Padding(
padding: const EdgeInsets.all(0.0),
child: Container(
width: MediaQuery
.of(context)
.size
.width * 0.6,
child: AppText(
progressNoteController.text,
fontSize: 10,
Row( color: Colors.grey,
mainAxisAlignment: ),
MainAxisAlignment.start, ),
children: [ ),
SizedBox( ],
height: 6, ), SizedBox(
), height: 8,
Padding( ),
padding: const EdgeInsets.all(0.0), Row(
child: AppText( mainAxisAlignment:
"Some progress note about", MainAxisAlignment.start,
children: [
AppText(
"Created By : ",
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
"Anas Abdullah on 12 De",
fontSize: 10, fontSize: 10,
color: Colors.grey, color: Colors.grey,
), ),
), ],
], ),
),SizedBox( Row(
height: 8, mainAxisAlignment:
), MainAxisAlignment.start,
Row( children: [
mainAxisAlignment: AppText(
MainAxisAlignment.start, "Edited By : ",
children: [ fontWeight: FontWeight.bold,
AppText( fontSize: 16,
"Created By : ", ),
fontWeight: FontWeight.bold, AppText(
fontSize: 16, "Rahim on 13 Dec",
), fontSize: 10,
AppText( color: Colors.grey,
"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( Column(
children: [ children: [
InkWell( InkWell(
onTap: () {}, onTap: () {
child: Icon(EvaIcons.edit2Outline), openProgressNote(context);
) },
], child: Icon(EvaIcons.edit2Outline),
), )
], ],
), ),
) ],
),
)
], ],
) )
]), ]),
@ -222,9 +246,14 @@ class _PlanPageState extends State<PlanPage> {
), ),
DividerWithSpacesAround(height: 30,), DividerWithSpacesAround(height: 30,),
AppButton( AppButton(
title: TranslationBase.of(context).next, title: TranslationBase
.of(context)
.next,
loading: model.state == ViewState.BusyLocal,
onPressed: () { onPressed: () {
widget.changePageViewIndex(2);
submitPlan(model);
// widget.changePageViewIndex(2);
}, },
), ),
SizedBox( SizedBox(
@ -234,36 +263,29 @@ class _PlanPageState extends State<PlanPage> {
), ),
), ),
), ),
)); ),),);
} }
openExaminationList(BuildContext context) { submitPlan(SOAPViewModel model) async {
final screenSize = MediaQuery.of(context).size; if (progressNoteController.text.isNotEmpty) {
InputDecoration textFieldSelectorDecoration( PostProgressNoteRequestModel postProgressNoteRequestModel = new PostProgressNoteRequestModel(
String hintText, String selectedText, bool isDropDown) { patientMRN: 3120690,
return InputDecoration( episodeId: 200012117,
focusedBorder: OutlineInputBorder( appointmentNo: 2016054573,
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), planNote: progressNoteController.text);
borderRadius: BorderRadius.circular(8),
),
enabledBorder: OutlineInputBorder( await model.postProgressNote(postProgressNoteRequestModel);
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8), if (model.state == ViewState.ErrorLocal) {
), helpers.showErrorToast(model.error);
disabledBorder: OutlineInputBorder( } else {
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), Navigator.of(context).pop();
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,
),
);
} }
}
; openProgressNote(BuildContext context) {
showModalBottomSheet( showModalBottomSheet(
backgroundColor: Colors.white, backgroundColor: Colors.white,
isScrollControlled: true, isScrollControlled: true,
@ -291,7 +313,7 @@ class _PlanPageState extends State<PlanPage> {
Container( Container(
margin: EdgeInsets.only(left: 0, right: 0, top: 15), margin: EdgeInsets.only(left: 0, right: 0, top: 15),
child: TextFields( child: TextFields(
hintText: "Remarks", hintText: "Add progress note here",
fontSize: 13.5, fontSize: 13.5,
// hintColor: Colors.black, // hintColor: Colors.black,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -300,7 +322,9 @@ class _PlanPageState extends State<PlanPage> {
controller: progressNoteController, controller: progressNoteController,
validator: (value) { validator: (value) {
if (value == null) if (value == null)
return TranslationBase.of(context).emptyMessage; return TranslationBase
.of(context)
.emptyMessage;
else else
return null; return null;
}), }),
@ -310,6 +334,7 @@ class _PlanPageState extends State<PlanPage> {
AppButton( AppButton(
title: "Add".toUpperCase(), title: "Add".toUpperCase(),
onPressed: () { onPressed: () {
Navigator.of(context).pop();
}, },
), ),
]), ]),

@ -140,7 +140,8 @@ class _SubjectivePageState extends State<SubjectivePage> {
SizedBox( SizedBox(
height: 20, height: 20,
), ),
AddMedication(), // TODO return it back when we need it.
// AddMedication(),
]), ]),
), ),
isExpand: isChiefExpand, isExpand: isChiefExpand,
@ -305,9 +306,9 @@ class _SubjectivePageState extends State<SubjectivePage> {
remarks: allergy.remark, remarks: allergy.remark,
createdBy: 1485, createdBy: 1485,
// //
createdOn: "2020-08-14T20:37:22.780Z", createdOn: DateTime.now().toIso8601String(),//"2020-08-14T20:37:22.780Z",
editedBy: 1485, editedBy: 1485,
editedOn: "2020-08-14T20:37:22.780Z", editedOn: DateTime.now().toIso8601String(),//"2020-08-14T20:37:22.780Z",
isChecked: false, isChecked: false,
isUpdatedByNurse: false)); isUpdatedByNurse: false));
}); });

@ -7,14 +7,14 @@ packages:
name: _fe_analyzer_shared name: _fe_analyzer_shared
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "14.0.0" version: "12.0.0"
analyzer: analyzer:
dependency: transitive dependency: transitive
description: description:
name: analyzer name: analyzer
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.41.1" version: "0.40.6"
archive: archive:
dependency: transitive dependency: transitive
description: description:
@ -112,7 +112,7 @@ packages:
name: build_web_compilers name: build_web_compilers
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.15.3" version: "2.12.2"
built_collection: built_collection:
dependency: transitive dependency: transitive
description: description:
@ -475,7 +475,7 @@ packages:
name: meta name: meta
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0-nullsafety.4" version: "1.3.0-nullsafety.3"
mime: mime:
dependency: transitive dependency: transitive
description: description:
@ -732,7 +732,7 @@ packages:
name: stack_trace name: stack_trace
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.10.0-nullsafety.2" version: "1.10.0-nullsafety.1"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
@ -867,5 +867,5 @@ packages:
source: hosted source: hosted
version: "2.2.1" version: "2.2.1"
sdks: sdks:
dart: ">=2.11.0-162.0 <=2.11.0-213.1.beta" dart: ">=2.10.0 <2.11.0"
flutter: ">=1.22.0 <2.0.0" flutter: ">=1.22.0 <2.0.0"

Loading…
Cancel
Save