12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184 |
- import 'aIDiagnosis.m.dart';
- import 'connect.m.dart';
- import 'authentication.m.dart';
- import 'package:fis_jsonrpc/utils.dart';
- class DataItemDTO {
- String? key;
- String? value;
- DataItemDTO({
- this.key,
- this.value,
- });
- factory DataItemDTO.fromJson(Map<String, dynamic> map) {
- return DataItemDTO(
- key: map['Key'],
- value: map['Value'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(key != null)
- map['Key'] = key;
- if(value != null)
- map['Value'] = value;
- return map;
- }
- }
- class CreatePatientRequest extends TokenRequest{
- List<DataItemDTO >? patientData;
- List<String >? assignmentUserCodes;
- CreatePatientRequest({
- this.patientData,
- this.assignmentUserCodes,
- String? token,
- }) : super(
- token: token,
- );
- factory CreatePatientRequest.fromJson(Map<String, dynamic> map) {
- return CreatePatientRequest(
- patientData: map['PatientData'] != null ? (map['PatientData'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- assignmentUserCodes: map['AssignmentUserCodes'] != null ? map['AssignmentUserCodes'].cast<String>().toList() : null,
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(patientData != null)
- map['PatientData'] = patientData;
- if(assignmentUserCodes != null)
- map['AssignmentUserCodes'] = assignmentUserCodes;
- return map;
- }
- }
- class CreatePatientByUnregisteredRequest extends TokenRequest{
- String? unregisteredPatientCode;
- String? patientName;
- CreatePatientByUnregisteredRequest({
- this.unregisteredPatientCode,
- this.patientName,
- String? token,
- }) : super(
- token: token,
- );
- factory CreatePatientByUnregisteredRequest.fromJson(Map<String, dynamic> map) {
- return CreatePatientByUnregisteredRequest(
- unregisteredPatientCode: map['UnregisteredPatientCode'],
- patientName: map['PatientName'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(unregisteredPatientCode != null)
- map['UnregisteredPatientCode'] = unregisteredPatientCode;
- if(patientName != null)
- map['PatientName'] = patientName;
- return map;
- }
- }
- class UpdatePatientRequest extends TokenRequest{
- String? code;
- List<DataItemDTO >? patientData;
- List<String >? assignmentUserCodes;
- UpdatePatientRequest({
- this.code,
- this.patientData,
- this.assignmentUserCodes,
- String? token,
- }) : super(
- token: token,
- );
- factory UpdatePatientRequest.fromJson(Map<String, dynamic> map) {
- return UpdatePatientRequest(
- code: map['Code'],
- patientData: map['PatientData'] != null ? (map['PatientData'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- assignmentUserCodes: map['AssignmentUserCodes'] != null ? map['AssignmentUserCodes'].cast<String>().toList() : null,
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(code != null)
- map['Code'] = code;
- if(patientData != null)
- map['PatientData'] = patientData;
- if(assignmentUserCodes != null)
- map['AssignmentUserCodes'] = assignmentUserCodes;
- return map;
- }
- }
- class PatientInfoBaseDTO extends BaseDTO{
- String? patientCode;
- String? name;
- String? phone;
- String? identityCard;
- String? insuranceCode;
- String? age;
- int gender;
- bool isValid;
- String? organizationCode;
- String? rootOrganizationCode;
- List<String >? assignmentUserCodes;
- List<DataItemDTO >? patientData;
- int unReadRecordCount;
- String? headImgUrl;
- String? patientType;
- bool isReferral;
- PatientInfoBaseDTO({
- this.patientCode,
- this.name,
- this.phone,
- this.identityCard,
- this.insuranceCode,
- this.age,
- this.gender = 0,
- this.isValid = false,
- this.organizationCode,
- this.rootOrganizationCode,
- this.assignmentUserCodes,
- this.patientData,
- this.unReadRecordCount = 0,
- this.headImgUrl,
- this.patientType,
- this.isReferral = false,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- createTime: createTime,
- updateTime: updateTime,
- );
- factory PatientInfoBaseDTO.fromJson(Map<String, dynamic> map) {
- return PatientInfoBaseDTO(
- patientCode: map['PatientCode'],
- name: map['Name'],
- phone: map['Phone'],
- identityCard: map['IdentityCard'],
- insuranceCode: map['InsuranceCode'],
- age: map['Age'],
- gender: map['Gender'],
- isValid: map['IsValid'],
- organizationCode: map['OrganizationCode'],
- rootOrganizationCode: map['RootOrganizationCode'],
- assignmentUserCodes: map['AssignmentUserCodes'] != null ? map['AssignmentUserCodes'].cast<String>().toList() : null,
- patientData: map['PatientData'] != null ? (map['PatientData'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- unReadRecordCount: map['UnReadRecordCount'],
- headImgUrl: map['HeadImgUrl'],
- patientType: map['PatientType'],
- isReferral: map['IsReferral'],
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(patientCode != null)
- map['PatientCode'] = patientCode;
- if(name != null)
- map['Name'] = name;
- if(phone != null)
- map['Phone'] = phone;
- if(identityCard != null)
- map['IdentityCard'] = identityCard;
- if(insuranceCode != null)
- map['InsuranceCode'] = insuranceCode;
- if(age != null)
- map['Age'] = age;
- map['Gender'] = gender;
- map['IsValid'] = isValid;
- if(organizationCode != null)
- map['OrganizationCode'] = organizationCode;
- if(rootOrganizationCode != null)
- map['RootOrganizationCode'] = rootOrganizationCode;
- if(assignmentUserCodes != null)
- map['AssignmentUserCodes'] = assignmentUserCodes;
- if(patientData != null)
- map['PatientData'] = patientData;
- map['UnReadRecordCount'] = unReadRecordCount;
- if(headImgUrl != null)
- map['HeadImgUrl'] = headImgUrl;
- if(patientType != null)
- map['PatientType'] = patientType;
- map['IsReferral'] = isReferral;
- return map;
- }
- }
- class PatientInfoDTO extends PatientInfoBaseDTO{
- String? creatorCode;
- String? deviceCode;
- List<String >? updateUsers;
- PatientInfoDTO({
- this.creatorCode,
- this.deviceCode,
- this.updateUsers,
- String? patientCode,
- String? name,
- String? phone,
- String? identityCard,
- String? insuranceCode,
- String? age,
- int gender = 0,
- bool isValid = false,
- String? organizationCode,
- String? rootOrganizationCode,
- List<String >? assignmentUserCodes,
- List<DataItemDTO >? patientData,
- int unReadRecordCount = 0,
- String? headImgUrl,
- String? patientType,
- bool isReferral = false,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- patientCode: patientCode,
- name: name,
- phone: phone,
- identityCard: identityCard,
- insuranceCode: insuranceCode,
- age: age,
- gender: gender,
- isValid: isValid,
- organizationCode: organizationCode,
- rootOrganizationCode: rootOrganizationCode,
- assignmentUserCodes: assignmentUserCodes,
- patientData: patientData,
- unReadRecordCount: unReadRecordCount,
- headImgUrl: headImgUrl,
- patientType: patientType,
- isReferral: isReferral,
- createTime: createTime,
- updateTime: updateTime,
- );
- factory PatientInfoDTO.fromJson(Map<String, dynamic> map) {
- return PatientInfoDTO(
- creatorCode: map['CreatorCode'],
- deviceCode: map['DeviceCode'],
- updateUsers: map['UpdateUsers'] != null ? map['UpdateUsers'].cast<String>().toList() : null,
- patientCode: map['PatientCode'],
- name: map['Name'],
- phone: map['Phone'],
- identityCard: map['IdentityCard'],
- insuranceCode: map['InsuranceCode'],
- age: map['Age'],
- gender: map['Gender'],
- isValid: map['IsValid'],
- organizationCode: map['OrganizationCode'],
- rootOrganizationCode: map['RootOrganizationCode'],
- assignmentUserCodes: map['AssignmentUserCodes'] != null ? map['AssignmentUserCodes'].cast<String>().toList() : null,
- patientData: map['PatientData'] != null ? (map['PatientData'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- unReadRecordCount: map['UnReadRecordCount'],
- headImgUrl: map['HeadImgUrl'],
- patientType: map['PatientType'],
- isReferral: map['IsReferral'],
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(creatorCode != null)
- map['CreatorCode'] = creatorCode;
- if(deviceCode != null)
- map['DeviceCode'] = deviceCode;
- if(updateUsers != null)
- map['UpdateUsers'] = updateUsers;
- return map;
- }
- }
- class CreatePatientsRequest extends TokenRequest{
- List<PatientInfoDTO >? patients;
- CreatePatientsRequest({
- this.patients,
- String? token,
- }) : super(
- token: token,
- );
- factory CreatePatientsRequest.fromJson(Map<String, dynamic> map) {
- return CreatePatientsRequest(
- patients: map['Patients'] != null ? (map['Patients'] as List).map((e)=>PatientInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(patients != null)
- map['Patients'] = patients;
- return map;
- }
- }
- class ClientPatientInfoBaseDTO extends BaseDTO{
- String? patientCode;
- bool isValid;
- List<DataItemDTO >? patientData;
- int unReadRecordCount;
- bool isReferral;
- ClientPatientInfoBaseDTO({
- this.patientCode,
- this.isValid = false,
- this.patientData,
- this.unReadRecordCount = 0,
- this.isReferral = false,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- createTime: createTime,
- updateTime: updateTime,
- );
- factory ClientPatientInfoBaseDTO.fromJson(Map<String, dynamic> map) {
- return ClientPatientInfoBaseDTO(
- patientCode: map['PatientCode'],
- isValid: map['IsValid'],
- patientData: map['PatientData'] != null ? (map['PatientData'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- unReadRecordCount: map['UnReadRecordCount'],
- isReferral: map['IsReferral'],
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(patientCode != null)
- map['PatientCode'] = patientCode;
- map['IsValid'] = isValid;
- if(patientData != null)
- map['PatientData'] = patientData;
- map['UnReadRecordCount'] = unReadRecordCount;
- map['IsReferral'] = isReferral;
- return map;
- }
- }
- enum PatientValidStatusEnum {
- All,
- CheckOut,
- CheckIn,
- }
- class FindPatientsPageRequest extends PageRequest{
- String? keyWord;
- DateTime? startTime;
- DateTime? endTime;
- PatientValidStatusEnum isValid;
- FindPatientsPageRequest({
- this.keyWord,
- this.startTime,
- this.endTime,
- this.isValid = PatientValidStatusEnum.All,
- int pageIndex = 0,
- int pageSize = 0,
- String? token,
- }) : super(
- pageIndex: pageIndex,
- pageSize: pageSize,
- token: token,
- );
- factory FindPatientsPageRequest.fromJson(Map<String, dynamic> map) {
- return FindPatientsPageRequest(
- keyWord: map['KeyWord'],
- startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
- endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
- isValid: PatientValidStatusEnum.values.firstWhere((e) => e.index == map['IsValid']),
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(keyWord != null)
- map['KeyWord'] = keyWord;
- if(startTime != null)
- map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
- if(endTime != null)
- map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
- map['IsValid'] = isValid.index;
- return map;
- }
- }
- class UserBaseDTO extends BaseDTO{
- String? userCode;
- String? userName;
- String? headImageUrl;
- UserBaseDTO({
- this.userCode,
- this.userName,
- this.headImageUrl,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- createTime: createTime,
- updateTime: updateTime,
- );
- factory UserBaseDTO.fromJson(Map<String, dynamic> map) {
- return UserBaseDTO(
- userCode: map['UserCode'],
- userName: map['UserName'],
- headImageUrl: map['HeadImageUrl'],
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(userCode != null)
- map['UserCode'] = userCode;
- if(userName != null)
- map['UserName'] = userName;
- if(headImageUrl != null)
- map['HeadImageUrl'] = headImageUrl;
- return map;
- }
- }
- enum RecordStatusEnum {
- NotScanned,
- Uploaded,
- NotReport,
- Completed,
- }
- class TerminalImageDTO {
- String? previewUrl;
- String? imageUrl;
- String? coverImageUrl;
- TerminalImageDTO({
- this.previewUrl,
- this.imageUrl,
- this.coverImageUrl,
- });
- factory TerminalImageDTO.fromJson(Map<String, dynamic> map) {
- return TerminalImageDTO(
- previewUrl: map['PreviewUrl'],
- imageUrl: map['ImageUrl'],
- coverImageUrl: map['CoverImageUrl'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(previewUrl != null)
- map['PreviewUrl'] = previewUrl;
- if(imageUrl != null)
- map['ImageUrl'] = imageUrl;
- if(coverImageUrl != null)
- map['CoverImageUrl'] = coverImageUrl;
- return map;
- }
- }
- class ImageLocationDTO {
- String? group;
- String? position;
- String? quadrant;
- ImageLocationDTO({
- this.group,
- this.position,
- this.quadrant,
- });
- factory ImageLocationDTO.fromJson(Map<String, dynamic> map) {
- return ImageLocationDTO(
- group: map['Group'],
- position: map['Position'],
- quadrant: map['Quadrant'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(group != null)
- map['Group'] = group;
- if(position != null)
- map['Position'] = position;
- if(quadrant != null)
- map['Quadrant'] = quadrant;
- return map;
- }
- }
- class ChildrenFetusNodeDTO {
- String? typeName;
- String? folderName;
- String? folderDescription;
- String? modeName;
- String? applicationId;
- String? application;
- List<String >? children;
- ChildrenFetusNodeDTO({
- this.typeName,
- this.folderName,
- this.folderDescription,
- this.modeName,
- this.applicationId,
- this.application,
- this.children,
- });
- factory ChildrenFetusNodeDTO.fromJson(Map<String, dynamic> map) {
- return ChildrenFetusNodeDTO(
- typeName: map['TypeName'],
- folderName: map['FolderName'],
- folderDescription: map['FolderDescription'],
- modeName: map['ModeName'],
- applicationId: map['ApplicationId'],
- application: map['Application'],
- children: map['Children'] != null ? map['Children'].cast<String>().toList() : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(typeName != null)
- map['TypeName'] = typeName;
- if(folderName != null)
- map['FolderName'] = folderName;
- if(folderDescription != null)
- map['FolderDescription'] = folderDescription;
- if(modeName != null)
- map['ModeName'] = modeName;
- if(applicationId != null)
- map['ApplicationId'] = applicationId;
- if(application != null)
- map['Application'] = application;
- if(children != null)
- map['Children'] = children;
- return map;
- }
- }
- class FetusNodeDTO {
- String? typeName;
- String? fetusIndex;
- List<ChildrenFetusNodeDTO >? children;
- FetusNodeDTO({
- this.typeName,
- this.fetusIndex,
- this.children,
- });
- factory FetusNodeDTO.fromJson(Map<String, dynamic> map) {
- return FetusNodeDTO(
- typeName: map['TypeName'],
- fetusIndex: map['FetusIndex'],
- children: map['Children'] != null ? (map['Children'] as List).map((e)=>ChildrenFetusNodeDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(typeName != null)
- map['TypeName'] = typeName;
- if(fetusIndex != null)
- map['FetusIndex'] = fetusIndex;
- if(children != null)
- map['Children'] = children;
- return map;
- }
- }
- class MeasuredResultsDTO {
- String? version;
- List<FetusNodeDTO >? fetusNodes;
- MeasuredResultsDTO({
- this.version,
- this.fetusNodes,
- });
- factory MeasuredResultsDTO.fromJson(Map<String, dynamic> map) {
- return MeasuredResultsDTO(
- version: map['Version'],
- fetusNodes: map['FetusNodes'] != null ? (map['FetusNodes'] as List).map((e)=>FetusNodeDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(version != null)
- map['Version'] = version;
- if(fetusNodes != null)
- map['FetusNodes'] = fetusNodes;
- return map;
- }
- }
- class PointDTO {
- double x;
- double y;
- PointDTO({
- this.x = 0,
- this.y = 0,
- });
- factory PointDTO.fromJson(Map<String, dynamic> map) {
- return PointDTO(
- x: double.parse(map['X'].toString()),
- y: double.parse(map['Y'].toString()),
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- map['X'] = x;
- map['Y'] = y;
- return map;
- }
- }
- class AdornerDTO {
- String? adornerTypeName;
- PointDTO? topLeft;
- String? content;
- AdornerDTO({
- this.adornerTypeName,
- this.topLeft,
- this.content,
- });
- factory AdornerDTO.fromJson(Map<String, dynamic> map) {
- return AdornerDTO(
- adornerTypeName: map['AdornerTypeName'],
- topLeft: map['TopLeft'] != null ? PointDTO.fromJson(map['TopLeft']) : null,
- content: map['Content'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(adornerTypeName != null)
- map['AdornerTypeName'] = adornerTypeName;
- if(topLeft != null)
- map['TopLeft'] = topLeft;
- if(content != null)
- map['Content'] = content;
- return map;
- }
- }
- class BaseAreaDTO {
- String? visualAreaTypeName;
- List<AdornerDTO >? adorner;
- BaseAreaDTO({
- this.visualAreaTypeName,
- this.adorner,
- });
- factory BaseAreaDTO.fromJson(Map<String, dynamic> map) {
- return BaseAreaDTO(
- visualAreaTypeName: map['VisualAreaTypeName'],
- adorner: map['Adorner'] != null ? (map['Adorner'] as List).map((e)=>AdornerDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(visualAreaTypeName != null)
- map['VisualAreaTypeName'] = visualAreaTypeName;
- if(adorner != null)
- map['Adorner'] = adorner;
- return map;
- }
- }
- class VisualAreaDTO {
- List<BaseAreaDTO >? children;
- VisualAreaDTO({
- this.children,
- });
- factory VisualAreaDTO.fromJson(Map<String, dynamic> map) {
- return VisualAreaDTO(
- children: map['Children'] != null ? (map['Children'] as List).map((e)=>BaseAreaDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(children != null)
- map['Children'] = children;
- return map;
- }
- }
- class VisualKeyDTO {
- String? visualKeyTypeName;
- VisualAreaDTO? visualArea;
- VisualKeyDTO({
- this.visualKeyTypeName,
- this.visualArea,
- });
- factory VisualKeyDTO.fromJson(Map<String, dynamic> map) {
- return VisualKeyDTO(
- visualKeyTypeName: map['VisualKeyTypeName'],
- visualArea: map['VisualArea'] != null ? VisualAreaDTO.fromJson(map['VisualArea']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(visualKeyTypeName != null)
- map['VisualKeyTypeName'] = visualKeyTypeName;
- if(visualArea != null)
- map['VisualArea'] = visualArea;
- return map;
- }
- }
- class VisualDTO {
- List<VisualKeyDTO >? children;
- VisualDTO({
- this.children,
- });
- factory VisualDTO.fromJson(Map<String, dynamic> map) {
- return VisualDTO(
- children: map['Children'] != null ? (map['Children'] as List).map((e)=>VisualKeyDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(children != null)
- map['Children'] = children;
- return map;
- }
- }
- class ScanImageDTO {
- VisualDTO? visual;
- ScanImageDTO({
- this.visual,
- });
- factory ScanImageDTO.fromJson(Map<String, dynamic> map) {
- return ScanImageDTO(
- visual: map['Visual'] != null ? VisualDTO.fromJson(map['Visual']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(visual != null)
- map['Visual'] = visual;
- return map;
- }
- }
- class RemedicalInfoDTO extends BaseDTO{
- String? remedicalCode;
- String? deviceCode;
- String? recordCode;
- String? patientScanType;
- String? application;
- TerminalImageDTO? terminalImages;
- RemedicalFileDataTypeEnum fileDataType;
- ImageLocationDTO? imageLocation;
- DiagnosisConclusionEnum diagnosisConclusion;
- String? diagnosisResult;
- List<DiagnosisOrganEnum >? diagnosisOrgans;
- MeasuredResultsDTO? measuredResult;
- ScanImageDTO? commentResult;
- CarotidResultDTO? carotidResult;
- DateTime? createTime;
- DateTime? updateTime;
- RemedicalInfoDTO({
- this.remedicalCode,
- this.deviceCode,
- this.recordCode,
- this.patientScanType,
- this.application,
- this.terminalImages,
- this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
- this.imageLocation,
- this.diagnosisConclusion = DiagnosisConclusionEnum.NotRequired,
- this.diagnosisResult,
- this.diagnosisOrgans,
- this.measuredResult,
- this.commentResult,
- this.carotidResult,
- this.createTime,
- this.updateTime,
- });
- factory RemedicalInfoDTO.fromJson(Map<String, dynamic> map) {
- return RemedicalInfoDTO(
- remedicalCode: map['RemedicalCode'],
- deviceCode: map['DeviceCode'],
- recordCode: map['RecordCode'],
- patientScanType: map['PatientScanType'],
- application: map['Application'],
- terminalImages: map['TerminalImages'] != null ? TerminalImageDTO.fromJson(map['TerminalImages']) : null,
- fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
- imageLocation: map['ImageLocation'] != null ? ImageLocationDTO.fromJson(map['ImageLocation']) : null,
- diagnosisConclusion: DiagnosisConclusionEnum.values.firstWhere((e) => e.index == map['DiagnosisConclusion']),
- diagnosisResult: map['DiagnosisResult'],
- diagnosisOrgans: map['DiagnosisOrgans'] != null ? (map['DiagnosisOrgans'] as List).map((e)=>DiagnosisOrganEnum.values.firstWhere((i) => i.index == e)).toList() : null,
- measuredResult: map['MeasuredResult'] != null ? MeasuredResultsDTO.fromJson(map['MeasuredResult']) : null,
- commentResult: map['CommentResult'] != null ? ScanImageDTO.fromJson(map['CommentResult']) : null,
- carotidResult: map['CarotidResult'] != null ? CarotidResultDTO.fromJson(map['CarotidResult']) : null,
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- return map;
- }
- }
- enum DiagnosisStatusEnum {
- NotRequired,
- Under,
- Completed,
- }
- enum DiagnosisReportStatusEnum {
- NotRequired,
- Reporting,
- Reported,
- }
- class DiagnosisInfoDTO {
- DiagnosisOrganEnum diagnosisOrgan;
- DiagnosisConclusionEnum conclusion;
- DiagnosisReportStatusEnum reportStatus;
- DiagnosisInfoDTO({
- this.diagnosisOrgan = DiagnosisOrganEnum.Null,
- this.conclusion = DiagnosisConclusionEnum.NotRequired,
- this.reportStatus = DiagnosisReportStatusEnum.NotRequired,
- });
- factory DiagnosisInfoDTO.fromJson(Map<String, dynamic> map) {
- return DiagnosisInfoDTO(
- diagnosisOrgan: DiagnosisOrganEnum.values.firstWhere((e) => e.index == map['DiagnosisOrgan']),
- conclusion: DiagnosisConclusionEnum.values.firstWhere((e) => e.index == map['Conclusion']),
- reportStatus: DiagnosisReportStatusEnum.values.firstWhere((e) => e.index == map['ReportStatus']),
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- map['DiagnosisOrgan'] = diagnosisOrgan.index;
- map['Conclusion'] = conclusion.index;
- map['ReportStatus'] = reportStatus.index;
- return map;
- }
- }
- enum ReferralStatusEnum {
- Wait,
- Withdrawn,
- TimedOut,
- Accepted,
- Rejected,
- }
- class GetRecordsPageDTO {
- DateTime? createTime;
- String? deptName;
- String? creatorName;
- String? deviceName;
- String? reportNum;
- String? recordCode;
- RecordStatusEnum recordStatus;
- bool isRead;
- List<RemedicalInfoDTO >? remedicalList;
- DiagnosisStatusEnum diagnosisStatus;
- List<DiagnosisInfoDTO >? diagnosisInfos;
- bool isReferral;
- ReferralStatusEnum referralStatus;
- GetRecordsPageDTO({
- this.createTime,
- this.deptName,
- this.creatorName,
- this.deviceName,
- this.reportNum,
- this.recordCode,
- this.recordStatus = RecordStatusEnum.NotScanned,
- this.isRead = false,
- this.remedicalList,
- this.diagnosisStatus = DiagnosisStatusEnum.NotRequired,
- this.diagnosisInfos,
- this.isReferral = false,
- this.referralStatus = ReferralStatusEnum.Wait,
- });
- factory GetRecordsPageDTO.fromJson(Map<String, dynamic> map) {
- return GetRecordsPageDTO(
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- deptName: map['DeptName'],
- creatorName: map['CreatorName'],
- deviceName: map['DeviceName'],
- reportNum: map['ReportNum'],
- recordCode: map['RecordCode'],
- recordStatus: RecordStatusEnum.values.firstWhere((e) => e.index == map['RecordStatus']),
- isRead: map['IsRead'],
- remedicalList: map['RemedicalList'] != null ? (map['RemedicalList'] as List).map((e)=>RemedicalInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- diagnosisStatus: DiagnosisStatusEnum.values.firstWhere((e) => e.index == map['DiagnosisStatus']),
- diagnosisInfos: map['DiagnosisInfos'] != null ? (map['DiagnosisInfos'] as List).map((e)=>DiagnosisInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- isReferral: map['IsReferral'],
- referralStatus: ReferralStatusEnum.values.firstWhere((e) => e.index == map['ReferralStatus']),
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(createTime != null)
- map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
- if(deptName != null)
- map['DeptName'] = deptName;
- if(creatorName != null)
- map['CreatorName'] = creatorName;
- if(deviceName != null)
- map['DeviceName'] = deviceName;
- if(reportNum != null)
- map['ReportNum'] = reportNum;
- if(recordCode != null)
- map['RecordCode'] = recordCode;
- map['RecordStatus'] = recordStatus.index;
- map['IsRead'] = isRead;
- if(remedicalList != null)
- map['RemedicalList'] = remedicalList;
- map['DiagnosisStatus'] = diagnosisStatus.index;
- if(diagnosisInfos != null)
- map['DiagnosisInfos'] = diagnosisInfos;
- map['IsReferral'] = isReferral;
- map['ReferralStatus'] = referralStatus.index;
- return map;
- }
- }
- class ClientPatientInfoDTO extends ClientPatientInfoBaseDTO{
- String? creatorCode;
- String? creatorName;
- String? deviceCode;
- List<UserBaseDTO >? assignmentUserList;
- GetRecordsPageDTO? lastRecord;
- String? encryptFullName;
- ClientPatientInfoDTO({
- this.creatorCode,
- this.creatorName,
- this.deviceCode,
- this.assignmentUserList,
- this.lastRecord,
- this.encryptFullName,
- String? patientCode,
- bool isValid = false,
- List<DataItemDTO >? patientData,
- int unReadRecordCount = 0,
- bool isReferral = false,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- patientCode: patientCode,
- isValid: isValid,
- patientData: patientData,
- unReadRecordCount: unReadRecordCount,
- isReferral: isReferral,
- createTime: createTime,
- updateTime: updateTime,
- );
- factory ClientPatientInfoDTO.fromJson(Map<String, dynamic> map) {
- return ClientPatientInfoDTO(
- creatorCode: map['CreatorCode'],
- creatorName: map['CreatorName'],
- deviceCode: map['DeviceCode'],
- assignmentUserList: map['AssignmentUserList'] != null ? (map['AssignmentUserList'] as List).map((e)=>UserBaseDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- lastRecord: map['LastRecord'] != null ? GetRecordsPageDTO.fromJson(map['LastRecord']) : null,
- encryptFullName: map['EncryptFullName'],
- patientCode: map['PatientCode'],
- isValid: map['IsValid'],
- patientData: map['PatientData'] != null ? (map['PatientData'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- unReadRecordCount: map['UnReadRecordCount'],
- isReferral: map['IsReferral'],
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(creatorCode != null)
- map['CreatorCode'] = creatorCode;
- if(creatorName != null)
- map['CreatorName'] = creatorName;
- if(deviceCode != null)
- map['DeviceCode'] = deviceCode;
- if(assignmentUserList != null)
- map['AssignmentUserList'] = assignmentUserList;
- if(lastRecord != null)
- map['LastRecord'] = lastRecord;
- if(encryptFullName != null)
- map['EncryptFullName'] = encryptFullName;
- return map;
- }
- }
- class FindPatientByCodeRequest extends TokenRequest{
- String? code;
- FindPatientByCodeRequest({
- this.code,
- String? token,
- }) : super(
- token: token,
- );
- factory FindPatientByCodeRequest.fromJson(Map<String, dynamic> map) {
- return FindPatientByCodeRequest(
- code: map['Code'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(code != null)
- map['Code'] = code;
- return map;
- }
- }
- class FindValidPatientsByNameRequest extends TokenRequest{
- String? name;
- FindValidPatientsByNameRequest({
- this.name,
- String? token,
- }) : super(
- token: token,
- );
- factory FindValidPatientsByNameRequest.fromJson(Map<String, dynamic> map) {
- return FindValidPatientsByNameRequest(
- name: map['Name'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(name != null)
- map['Name'] = name;
- return map;
- }
- }
- class SetValidPatientRequest extends TokenRequest{
- String? newPatientCode;
- String? oldPatientCode;
- bool isFinishExam;
- SetValidPatientRequest({
- this.newPatientCode,
- this.oldPatientCode,
- this.isFinishExam = false,
- String? token,
- }) : super(
- token: token,
- );
- factory SetValidPatientRequest.fromJson(Map<String, dynamic> map) {
- return SetValidPatientRequest(
- newPatientCode: map['NewPatientCode'],
- oldPatientCode: map['OldPatientCode'],
- isFinishExam: map['IsFinishExam'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(newPatientCode != null)
- map['NewPatientCode'] = newPatientCode;
- if(oldPatientCode != null)
- map['OldPatientCode'] = oldPatientCode;
- map['IsFinishExam'] = isFinishExam;
- return map;
- }
- }
- class RemovePatientsRequest extends TokenRequest{
- List<String >? patientCodes;
- RemovePatientsRequest({
- this.patientCodes,
- String? token,
- }) : super(
- token: token,
- );
- factory RemovePatientsRequest.fromJson(Map<String, dynamic> map) {
- return RemovePatientsRequest(
- patientCodes: map['PatientCodes'] != null ? map['PatientCodes'].cast<String>().toList() : null,
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(patientCodes != null)
- map['PatientCodes'] = patientCodes;
- return map;
- }
- }
|