child Vaccines
parent
6830996f9c
commit
fe17c20bdf
@ -0,0 +1,100 @@
|
||||
class CreateNewBaby {
|
||||
String babyName;
|
||||
String gender;
|
||||
String strDOB;
|
||||
int editedBy;
|
||||
int createdBy;
|
||||
bool tempValue;
|
||||
int userID;
|
||||
bool isLogin;
|
||||
int alertBy;
|
||||
double versionID;
|
||||
int channel;
|
||||
int languageID;
|
||||
String iPAdress;
|
||||
String generalid;
|
||||
int patientOutSA;
|
||||
String sessionID;
|
||||
bool isDentalAllowedBackend;
|
||||
int deviceTypeID;
|
||||
int patientID;
|
||||
String tokenID;
|
||||
int patientTypeID;
|
||||
int patientType;
|
||||
|
||||
CreateNewBaby(
|
||||
{this.babyName,
|
||||
this.gender,
|
||||
this.strDOB,
|
||||
this.editedBy,
|
||||
this.createdBy,
|
||||
this.tempValue,
|
||||
this.userID,
|
||||
this.isLogin,
|
||||
this.alertBy,
|
||||
this.versionID,
|
||||
this.channel,
|
||||
this.languageID,
|
||||
this.iPAdress,
|
||||
this.generalid,
|
||||
this.patientOutSA,
|
||||
this.sessionID,
|
||||
this.isDentalAllowedBackend,
|
||||
this.deviceTypeID,
|
||||
this.patientID,
|
||||
this.tokenID,
|
||||
this.patientTypeID,
|
||||
this.patientType});
|
||||
|
||||
CreateNewBaby.fromJson(Map<String, dynamic> json) {
|
||||
babyName = json['BabyName'];
|
||||
gender = json['Gender'];
|
||||
strDOB = json['StrDOB'];
|
||||
editedBy = json['EditedBy'];
|
||||
createdBy = json['CreatedBy'];
|
||||
tempValue = json['TempValue'];
|
||||
userID = json['UserID'];
|
||||
isLogin = json['IsLogin'];
|
||||
alertBy = json['AlertBy'];
|
||||
versionID = json['VersionID'];
|
||||
channel = json['Channel'];
|
||||
languageID = json['LanguageID'];
|
||||
iPAdress = json['IPAdress'];
|
||||
generalid = json['generalid'];
|
||||
patientOutSA = json['PatientOutSA'];
|
||||
sessionID = json['SessionID'];
|
||||
isDentalAllowedBackend = json['isDentalAllowedBackend'];
|
||||
deviceTypeID = json['DeviceTypeID'];
|
||||
patientID = json['PatientID'];
|
||||
tokenID = json['TokenID'];
|
||||
patientTypeID = json['PatientTypeID'];
|
||||
patientType = json['PatientType'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['BabyName'] = this.babyName;
|
||||
data['Gender'] = this.gender;
|
||||
data['StrDOB'] = this.strDOB;
|
||||
data['EditedBy'] = this.editedBy;
|
||||
data['CreatedBy'] = this.createdBy;
|
||||
data['TempValue'] = this.tempValue;
|
||||
data['UserID'] = this.userID;
|
||||
data['IsLogin'] = this.isLogin;
|
||||
data['AlertBy'] = this.alertBy;
|
||||
data['VersionID'] = this.versionID;
|
||||
data['Channel'] = this.channel;
|
||||
data['LanguageID'] = this.languageID;
|
||||
data['IPAdress'] = this.iPAdress;
|
||||
data['generalid'] = this.generalid;
|
||||
data['PatientOutSA'] = this.patientOutSA;
|
||||
data['SessionID'] = this.sessionID;
|
||||
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
|
||||
data['DeviceTypeID'] = this.deviceTypeID;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['TokenID'] = this.tokenID;
|
||||
data['PatientTypeID'] = this.patientTypeID;
|
||||
data['PatientType'] = this.patientType;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart';
|
||||
import '../base_service.dart';
|
||||
|
||||
class CreteNewBabyService extends BaseService {
|
||||
List<CreateNewBaby> createNewBabyModelList = List();
|
||||
|
||||
|
||||
Future getCreateNewBabyOrders({ CreateNewBaby newChild}) async {
|
||||
hasError = false;
|
||||
await baseAppClient.post(GET_NEWCHILD_REQUEST,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
createNewBabyModelList.clear();
|
||||
|
||||
response['List_UserInformationModel_New'].forEach((vital) {
|
||||
createNewBabyModelList.add(
|
||||
CreateNewBaby.fromJson(vital));
|
||||
});
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: newChild.toJson());
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue