123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585 |
- import 'package:fis_common/json_convert.dart';
- class AdminAccountInfo {
- String? adminCode;
- String? fatherCode;
- String? adminName;
- String? secretPassword;
- String? headImageToken;
- String? licenseKey;
- String? lastIP;
- String? phone;
- String? email;
- AdminAccountInfo({
- this.adminCode,
- this.fatherCode,
- this.adminName,
- this.secretPassword,
- this.headImageToken,
- this.licenseKey,
- this.lastIP,
- this.phone,
- this.email,
- });
- factory AdminAccountInfo.fromJson(Map<String, dynamic> map) {
- return AdminAccountInfo(
- adminCode: map['AdminCode'],
- fatherCode: map['FatherCode'],
- adminName: map['AdminName'],
- secretPassword: map['SecretPassword'],
- headImageToken: map['HeadImageToken'],
- licenseKey: map['LicenseKey'],
- lastIP: map['LastIP'],
- phone: map['Phone'],
- email: map['Email'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(adminCode != null)
- map['AdminCode'] = adminCode;
- if(fatherCode != null)
- map['FatherCode'] = fatherCode;
- if(adminName != null)
- map['AdminName'] = adminName;
- if(secretPassword != null)
- map['SecretPassword'] = secretPassword;
- if(headImageToken != null)
- map['HeadImageToken'] = headImageToken;
- if(licenseKey != null)
- map['LicenseKey'] = licenseKey;
- if(lastIP != null)
- map['LastIP'] = lastIP;
- if(phone != null)
- map['Phone'] = phone;
- if(email != null)
- map['Email'] = email;
- return map;
- }
- }
- class PageCollection<T> {
- int currentPage;
- int pageSize;
- int dataCount;
- List<T>? pageData;
- PageCollection({
- this.currentPage=0,
- this.pageSize=0,
- this.dataCount=0,
- this.pageData,
- });
- factory PageCollection.fromJson(Map<String, dynamic> map) {
- List<T> pageDataList = [];
- if (map['PageData'] != null) {
- pageDataList.addAll(
- (map['PageData'] as List).map((e) => FJsonConvert.fromJson<T>(e)!));
- }
- return PageCollection(
- currentPage: map['CurrentPage'],
- pageSize: map['PageSize'],
- dataCount: map['DataCount'],
- pageData: pageDataList,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- map['CurrentPage'] = currentPage;
- map['PageSize'] = pageSize;
- map['DataCount'] = dataCount;
- if(pageData != null)
- map['PageData'] = pageData;
- return map;
- }
- }
- enum UserInfoStateEnum {
- Nonactivated,
- Activated,
- }
- class UserInfo {
- String? userCode;
- String? userName;
- String? phone;
- String? email;
- String? nickName;
- String? fullName;
- String? headImageToken;
- String? organizationCode;
- List<String>? authorityGroups;
- List<String>? bindDevices;
- int score;
- String? lastIP;
- UserInfoStateEnum userState;
- String? securityQuestion;
- String? securityAnswers;
- DateTime? createTime;
- DateTime? updateTime;
- UserInfo({
- this.userCode,
- this.userName,
- this.phone,
- this.email,
- this.nickName,
- this.fullName,
- this.headImageToken,
- this.organizationCode,
- this.authorityGroups,
- this.bindDevices,
- this.score=0,
- this.lastIP,
- this.userState=UserInfoStateEnum.Nonactivated,
- this.securityQuestion,
- this.securityAnswers,
- this.createTime,
- this.updateTime,
- });
- factory UserInfo.fromJson(Map<String, dynamic> map) {
- return UserInfo(
- userCode: map['UserCode'],
- userName: map['UserName'],
- phone: map['Phone'],
- email: map['Email'],
- nickName: map['NickName'],
- fullName: map['FullName'],
- headImageToken: map['HeadImageToken'],
- organizationCode: map['OrganizationCode'],
- authorityGroups: map['AuthorityGroups'].cast<String>().toList(),
- bindDevices: map['BindDevices'].cast<String>().toList(),
- score: map['Score'],
- lastIP: map['LastIP'],
- userState: UserInfoStateEnum.values.firstWhere((e) => e.index == map['UserState']),
- securityQuestion: map['SecurityQuestion'],
- securityAnswers: map['SecurityAnswers'],
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(userCode != null)
- map['UserCode'] = userCode;
- if(userName != null)
- map['UserName'] = userName;
- if(phone != null)
- map['Phone'] = phone;
- if(email != null)
- map['Email'] = email;
- if(nickName != null)
- map['NickName'] = nickName;
- if(fullName != null)
- map['FullName'] = fullName;
- if(headImageToken != null)
- map['HeadImageToken'] = headImageToken;
- if(organizationCode != null)
- map['OrganizationCode'] = organizationCode;
- if(authorityGroups != null)
- map['AuthorityGroups'] = authorityGroups;
- if(bindDevices != null)
- map['BindDevices'] = bindDevices;
- map['Score'] = score;
- if(lastIP != null)
- map['LastIP'] = lastIP;
- map['UserState'] = userState.index;
- if(securityQuestion != null)
- map['SecurityQuestion'] = securityQuestion;
- if(securityAnswers != null)
- map['SecurityAnswers'] = securityAnswers;
- if(createTime != null)
- map['CreateTime'] = createTime;
- if(updateTime != null)
- map['UpdateTime'] = updateTime;
- return map;
- }
- }
- class ReportInfo {
- String? reportCode;
- String? snapShotReportTemplate;
- String? reportValuesJson;
- String? recordCode;
- String? reportUser;
- String? tags;
- String? reportImageUrl;
- String? reportHtmlRaw;
- ReportInfo({
- this.reportCode,
- this.snapShotReportTemplate,
- this.reportValuesJson,
- this.recordCode,
- this.reportUser,
- this.tags,
- this.reportImageUrl,
- this.reportHtmlRaw,
- });
- factory ReportInfo.fromJson(Map<String, dynamic> map) {
- return ReportInfo(
- reportCode: map['ReportCode'],
- snapShotReportTemplate: map['SnapShotReportTemplate'],
- reportValuesJson: map['ReportValuesJson'],
- recordCode: map['RecordCode'],
- reportUser: map['ReportUser'],
- tags: map['Tags'],
- reportImageUrl: map['ReportImageUrl'],
- reportHtmlRaw: map['ReportHtmlRaw'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(reportCode != null)
- map['ReportCode'] = reportCode;
- if(snapShotReportTemplate != null)
- map['SnapShotReportTemplate'] = snapShotReportTemplate;
- if(reportValuesJson != null)
- map['ReportValuesJson'] = reportValuesJson;
- if(recordCode != null)
- map['RecordCode'] = recordCode;
- if(reportUser != null)
- map['ReportUser'] = reportUser;
- if(tags != null)
- map['Tags'] = tags;
- if(reportImageUrl != null)
- map['ReportImageUrl'] = reportImageUrl;
- if(reportHtmlRaw != null)
- map['ReportHtmlRaw'] = reportHtmlRaw;
- return map;
- }
- }
- enum RecordTypeEnum {
- Ultrasound,
- Electrocardio,
- }
- enum CheckTypeEnum {
- Default,
- }
- enum RecordStatusEnum {
- Default,
- }
- class RecordInfo {
- String? recordCode;
- String? patientCode;
- String? patientName;
- String? orgName;
- RecordTypeEnum recordType;
- CheckTypeEnum checkType;
- String? localRecordCode;
- RecordStatusEnum recordStatus;
- String? recordRemark;
- String? tags;
- DateTime? createTime;
- DateTime? updateTime;
- RecordInfo({
- this.recordCode,
- this.patientCode,
- this.patientName,
- this.orgName,
- this.recordType=RecordTypeEnum.Ultrasound,
- this.checkType=CheckTypeEnum.Default,
- this.localRecordCode,
- this.recordStatus=RecordStatusEnum.Default,
- this.recordRemark,
- this.tags,
- this.createTime,
- this.updateTime,
- });
- factory RecordInfo.fromJson(Map<String, dynamic> map) {
- return RecordInfo(
- recordCode: map['RecordCode'],
- patientCode: map['PatientCode'],
- patientName: map['PatientName'],
- orgName: map['OrgName'],
- recordType: RecordTypeEnum.values.firstWhere((e) => e.index == map['RecordType']),
- checkType: CheckTypeEnum.values.firstWhere((e) => e.index == map['CheckType']),
- localRecordCode: map['LocalRecordCode'],
- recordStatus: RecordStatusEnum.values.firstWhere((e) => e.index == map['RecordStatus']),
- recordRemark: map['RecordRemark'],
- tags: map['Tags'],
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(recordCode != null)
- map['RecordCode'] = recordCode;
- if(patientCode != null)
- map['PatientCode'] = patientCode;
- if(patientName != null)
- map['PatientName'] = patientName;
- if(orgName != null)
- map['OrgName'] = orgName;
- map['RecordType'] = recordType.index;
- map['CheckType'] = checkType.index;
- if(localRecordCode != null)
- map['LocalRecordCode'] = localRecordCode;
- map['RecordStatus'] = recordStatus.index;
- if(recordRemark != null)
- map['RecordRemark'] = recordRemark;
- if(tags != null)
- map['Tags'] = tags;
- if(createTime != null)
- map['CreateTime'] = createTime;
- if(updateTime != null)
- map['UpdateTime'] = updateTime;
- return map;
- }
- }
- enum DeviceDataTypeEnum {
- Default,
- }
- class DeviceData {
- String? deviceDataCode;
- String? deviceCode;
- String? deviceFileCode;
- String? recordCode;
- String? patientCode;
- String? previewImageToken;
- String? dataToken;
- DeviceDataTypeEnum deviceDataType;
- String? processResult;
- DateTime? createTime;
- DateTime? updateTime;
- DeviceData({
- this.deviceDataCode,
- this.deviceCode,
- this.deviceFileCode,
- this.recordCode,
- this.patientCode,
- this.previewImageToken,
- this.dataToken,
- this.deviceDataType=DeviceDataTypeEnum.Default,
- this.processResult,
- this.createTime,
- this.updateTime,
- });
- factory DeviceData.fromJson(Map<String, dynamic> map) {
- return DeviceData(
- deviceDataCode: map['DeviceDataCode'],
- deviceCode: map['DeviceCode'],
- deviceFileCode: map['DeviceFileCode'],
- recordCode: map['RecordCode'],
- patientCode: map['PatientCode'],
- previewImageToken: map['PreviewImageToken'],
- dataToken: map['DataToken'],
- deviceDataType: DeviceDataTypeEnum.values.firstWhere((e) => e.index == map['DeviceDataType']),
- processResult: map['ProcessResult'],
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(deviceDataCode != null)
- map['DeviceDataCode'] = deviceDataCode;
- if(deviceCode != null)
- map['DeviceCode'] = deviceCode;
- if(deviceFileCode != null)
- map['DeviceFileCode'] = deviceFileCode;
- if(recordCode != null)
- map['RecordCode'] = recordCode;
- if(patientCode != null)
- map['PatientCode'] = patientCode;
- if(previewImageToken != null)
- map['PreviewImageToken'] = previewImageToken;
- if(dataToken != null)
- map['DataToken'] = dataToken;
- map['DeviceDataType'] = deviceDataType.index;
- if(processResult != null)
- map['ProcessResult'] = processResult;
- if(createTime != null)
- map['CreateTime'] = createTime;
- if(updateTime != null)
- map['UpdateTime'] = updateTime;
- return map;
- }
- }
- enum GenderTypeEnum {
- Male,
- Female,
- }
- enum PatientTypeEnum {
- Default,
- }
- class PatientInfo {
- String? patientCode;
- String? firstName;
- String? lastName;
- String? patientCardNo;
- DateTime? birthday;
- GenderTypeEnum genderType;
- String? patientCaseHistory;
- String? patientPhone;
- PatientTypeEnum patientType;
- DateTime? createTime;
- DateTime? updateTime;
- PatientInfo({
- this.patientCode,
- this.firstName,
- this.lastName,
- this.patientCardNo,
- this.birthday,
- this.genderType=GenderTypeEnum.Male,
- this.patientCaseHistory,
- this.patientPhone,
- this.patientType=PatientTypeEnum.Default,
- this.createTime,
- this.updateTime,
- });
- factory PatientInfo.fromJson(Map<String, dynamic> map) {
- return PatientInfo(
- patientCode: map['PatientCode'],
- firstName: map['FirstName'],
- lastName: map['LastName'],
- patientCardNo: map['PatientCardNo'],
- birthday: map['Birthday'] != null ? DateTime.parse(map['Birthday']) : null,
- genderType: GenderTypeEnum.values.firstWhere((e) => e.index == map['GenderType']),
- patientCaseHistory: map['PatientCaseHistory'],
- patientPhone: map['PatientPhone'],
- patientType: PatientTypeEnum.values.firstWhere((e) => e.index == map['PatientType']),
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(patientCode != null)
- map['PatientCode'] = patientCode;
- if(firstName != null)
- map['FirstName'] = firstName;
- if(lastName != null)
- map['LastName'] = lastName;
- if(patientCardNo != null)
- map['PatientCardNo'] = patientCardNo;
- if(birthday != null)
- map['Birthday'] = birthday;
- map['GenderType'] = genderType.index;
- if(patientCaseHistory != null)
- map['PatientCaseHistory'] = patientCaseHistory;
- if(patientPhone != null)
- map['PatientPhone'] = patientPhone;
- map['PatientType'] = patientType.index;
- if(createTime != null)
- map['CreateTime'] = createTime;
- if(updateTime != null)
- map['UpdateTime'] = updateTime;
- return map;
- }
- }
- class MenuInfo {
- String? menuCode;
- String? menuName;
- String? menuType;
- String? menuShowName;
- int menuSort;
- String? menuFatherCode;
- MenuInfo({
- this.menuCode,
- this.menuName,
- this.menuType,
- this.menuShowName,
- this.menuSort=0,
- this.menuFatherCode,
- });
- factory MenuInfo.fromJson(Map<String, dynamic> map) {
- return MenuInfo(
- menuCode: map['MenuCode'],
- menuName: map['MenuName'],
- menuType: map['MenuType'],
- menuShowName: map['MenuShowName'],
- menuSort: map['MenuSort'],
- menuFatherCode: map['MenuFatherCode'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(menuCode != null)
- map['MenuCode'] = menuCode;
- if(menuName != null)
- map['MenuName'] = menuName;
- if(menuType != null)
- map['MenuType'] = menuType;
- if(menuShowName != null)
- map['MenuShowName'] = menuShowName;
- map['MenuSort'] = menuSort;
- if(menuFatherCode != null)
- map['MenuFatherCode'] = menuFatherCode;
- return map;
- }
- }
- class FrontAuthorityGroupInfo {
- String? frontGroupCode;
- String? description;
- List<String>? adminCodes;
- List<String>? features;
- bool isShow;
- FrontAuthorityGroupInfo({
- this.frontGroupCode,
- this.description,
- this.adminCodes,
- this.features,
- this.isShow=false,
- });
- factory FrontAuthorityGroupInfo.fromJson(Map<String, dynamic> map) {
- return FrontAuthorityGroupInfo(
- frontGroupCode: map['FrontGroupCode'],
- description: map['Description'],
- adminCodes: map['AdminCodes'].cast<String>().toList(),
- features: map['Features'].cast<String>().toList(),
- isShow: map['IsShow'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(frontGroupCode != null)
- map['FrontGroupCode'] = frontGroupCode;
- if(description != null)
- map['Description'] = description;
- if(adminCodes != null)
- map['AdminCodes'] = adminCodes;
- if(features != null)
- map['Features'] = features;
- map['IsShow'] = isShow;
- return map;
- }
- }
|