import 'liveConsultation.m.dart'; import 'recordInfo.m.dart'; import 'notification.m.dart'; import 'organization.m.dart'; import 'patient.m.dart'; import 'education.m.dart'; import 'aIDiagnosis.m.dart'; import 'package:fis_jsonrpc/utils.dart'; class CreateExaminfoResult { String? examCode; CreateExaminfoResult({ this.examCode, }); factory CreateExaminfoResult.fromJson(Map map) { return CreateExaminfoResult( examCode: map['ExamCode'], ); } Map toJson() { final map = Map(); if(examCode != null) map['ExamCode'] = examCode; return map; } } class CreateExaminfoRequest extends TokenRequest{ String? patientType; String? examRecordCode; List? patientInfo; List? patientScanInfoList; CreateExaminfoRequest({ this.patientType, this.examRecordCode, this.patientInfo, this.patientScanInfoList, String? token, }) : super( token: token, ); factory CreateExaminfoRequest.fromJson(Map map) { return CreateExaminfoRequest( patientType: map['PatientType'], examRecordCode: map['ExamRecordCode'], patientInfo: map['PatientInfo'] != null ? (map['PatientInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map)).toList() : null, patientScanInfoList: map['PatientScanInfoList'] != null ? (map['PatientScanInfoList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map)).toList() : null, token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(patientType != null) map['PatientType'] = patientType; if(examRecordCode != null) map['ExamRecordCode'] = examRecordCode; if(patientInfo != null) map['PatientInfo'] = patientInfo; if(patientScanInfoList != null) map['PatientScanInfoList'] = patientScanInfoList; return map; } } class UploadExamDataRequest extends TokenRequest{ String? examCode; String? previewFileToken; String? fileToken; int fileSize; String? coverImageToken; String? applicationCategory; String? application; RemedicalFileDataTypeEnum fileDataType; MeasuredResultsDTO? measuredResult; ScanImageDTO? commentResult; ImageLocationDTO? imageLocation; UploadExamDataRequest({ this.examCode, this.previewFileToken, this.fileToken, this.fileSize = 0, this.coverImageToken, this.applicationCategory, this.application, this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle, this.measuredResult, this.commentResult, this.imageLocation, String? token, }) : super( token: token, ); factory UploadExamDataRequest.fromJson(Map map) { return UploadExamDataRequest( examCode: map['ExamCode'], previewFileToken: map['PreviewFileToken'], fileToken: map['FileToken'], fileSize: map['FileSize'], coverImageToken: map['CoverImageToken'], applicationCategory: map['ApplicationCategory'], application: map['Application'], fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']), measuredResult: map['MeasuredResult'] != null ? MeasuredResultsDTO.fromJson(map['MeasuredResult']) : null, commentResult: map['CommentResult'] != null ? ScanImageDTO.fromJson(map['CommentResult']) : null, imageLocation: map['ImageLocation'] != null ? ImageLocationDTO.fromJson(map['ImageLocation']) : null, token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(examCode != null) map['ExamCode'] = examCode; if(previewFileToken != null) map['PreviewFileToken'] = previewFileToken; if(fileToken != null) map['FileToken'] = fileToken; map['FileSize'] = fileSize; if(coverImageToken != null) map['CoverImageToken'] = coverImageToken; if(applicationCategory != null) map['ApplicationCategory'] = applicationCategory; if(application != null) map['Application'] = application; map['FileDataType'] = fileDataType.index; if(measuredResult != null) map['MeasuredResult'] = measuredResult; if(commentResult != null) map['CommentResult'] = commentResult; if(imageLocation != null) map['ImageLocation'] = imageLocation; return map; } } class FindRemedicalByCodeRequest extends TokenRequest{ String? remedicalCode; bool existDiagnosisResult; FindRemedicalByCodeRequest({ this.remedicalCode, this.existDiagnosisResult = false, String? token, }) : super( token: token, ); factory FindRemedicalByCodeRequest.fromJson(Map map) { return FindRemedicalByCodeRequest( remedicalCode: map['RemedicalCode'], existDiagnosisResult: map['ExistDiagnosisResult'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(remedicalCode != null) map['RemedicalCode'] = remedicalCode; map['ExistDiagnosisResult'] = existDiagnosisResult; return map; } } class AddToRemedicalDiagnosisRequest extends TokenRequest{ String? remedicalCode; AddToRemedicalDiagnosisRequest({ this.remedicalCode, String? token, }) : super( token: token, ); factory AddToRemedicalDiagnosisRequest.fromJson(Map map) { return AddToRemedicalDiagnosisRequest( remedicalCode: map['RemedicalCode'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(remedicalCode != null) map['RemedicalCode'] = remedicalCode; return map; } } class RemedicalItemList { String? patientScanTypeDesc; List? patientScanTypeList; String? applicationCategory; String? application; List? remedicalList; RemedicalItemList({ this.patientScanTypeDesc, this.patientScanTypeList, this.applicationCategory, this.application, this.remedicalList, }); factory RemedicalItemList.fromJson(Map map) { return RemedicalItemList( patientScanTypeDesc: map['PatientScanTypeDesc'], patientScanTypeList: map['PatientScanTypeList'] != null ? map['PatientScanTypeList'].cast().toList() : null, applicationCategory: map['ApplicationCategory'], application: map['Application'], remedicalList: map['RemedicalList'] != null ? (map['RemedicalList'] as List).map((e)=>RemedicalInfoDTO.fromJson(e as Map)).toList() : null, ); } Map toJson() { final map = Map(); if(patientScanTypeDesc != null) map['PatientScanTypeDesc'] = patientScanTypeDesc; if(patientScanTypeList != null) map['PatientScanTypeList'] = patientScanTypeList; if(applicationCategory != null) map['ApplicationCategory'] = applicationCategory; if(application != null) map['Application'] = application; if(remedicalList != null) map['RemedicalList'] = remedicalList; return map; } } class RemedicalListResult { String? scanDate; String? recordCode; List? remedicalItemList; RemedicalListResult({ this.scanDate, this.recordCode, this.remedicalItemList, }); factory RemedicalListResult.fromJson(Map map) { return RemedicalListResult( scanDate: map['ScanDate'], recordCode: map['RecordCode'], remedicalItemList: map['RemedicalItemList'] != null ? (map['RemedicalItemList'] as List).map((e)=>RemedicalItemList.fromJson(e as Map)).toList() : null, ); } Map toJson() { final map = Map(); if(scanDate != null) map['ScanDate'] = scanDate; if(recordCode != null) map['RecordCode'] = recordCode; if(remedicalItemList != null) map['RemedicalItemList'] = remedicalItemList; return map; } } enum QueryDropdownListEnum { Org, } class QueryDropdownListReuqest extends TokenRequest{ QueryDropdownListEnum queryType; String? queryValue; QueryDropdownListReuqest({ this.queryType = QueryDropdownListEnum.Org, this.queryValue, String? token, }) : super( token: token, ); factory QueryDropdownListReuqest.fromJson(Map map) { return QueryDropdownListReuqest( queryType: QueryDropdownListEnum.values.firstWhere((e) => e.index == map['QueryType']), queryValue: map['QueryValue'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); map['QueryType'] = queryType.index; if(queryValue != null) map['QueryValue'] = queryValue; return map; } } class RservationResult { String? reservationCode; List? patientInfo; List? patientInfoExtList; String? dataSource; RservationResult({ this.reservationCode, this.patientInfo, this.patientInfoExtList, this.dataSource, }); factory RservationResult.fromJson(Map map) { return RservationResult( reservationCode: map['ReservationCode'], patientInfo: map['PatientInfo'] != null ? (map['PatientInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map)).toList() : null, patientInfoExtList: map['PatientInfoExtList'] != null ? (map['PatientInfoExtList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map)).toList() : null, dataSource: map['DataSource'], ); } Map toJson() { final map = Map(); if(reservationCode != null) map['ReservationCode'] = reservationCode; if(patientInfo != null) map['PatientInfo'] = patientInfo; if(patientInfoExtList != null) map['PatientInfoExtList'] = patientInfoExtList; if(dataSource != null) map['DataSource'] = dataSource; return map; } } class QueryReservationResult { List? reservationList; QueryReservationResult({ this.reservationList, }); factory QueryReservationResult.fromJson(Map map) { return QueryReservationResult( reservationList: map['ReservationList'] != null ? (map['ReservationList'] as List).map((e)=>RservationResult.fromJson(e as Map)).toList() : null, ); } Map toJson() { final map = Map(); if(reservationList != null) map['ReservationList'] = reservationList; return map; } } class QueryReservationRequest extends TokenRequest{ DateTime? createTime; QueryReservationRequest({ this.createTime, String? token, }) : super( token: token, ); factory QueryReservationRequest.fromJson(Map map) { return QueryReservationRequest( createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null, token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(createTime != null) map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!); return map; } } class FinishExamNotifyDetail { String? recordCode; RecordStatusEnum recordStatus; FinishExamNotifyDetail({ this.recordCode, this.recordStatus = RecordStatusEnum.NotScanned, }); factory FinishExamNotifyDetail.fromJson(Map map) { return FinishExamNotifyDetail( recordCode: map['RecordCode'], recordStatus: RecordStatusEnum.values.firstWhere((e) => e.index == map['RecordStatus']), ); } Map toJson() { final map = Map(); if(recordCode != null) map['RecordCode'] = recordCode; map['RecordStatus'] = recordStatus.index; return map; } } class PushFinishExamNotifyToClientRequest { List? records; String? userCode; PushFinishExamNotifyToClientRequest({ this.records, this.userCode, }); factory PushFinishExamNotifyToClientRequest.fromJson(Map map) { return PushFinishExamNotifyToClientRequest( records: map['Records'] != null ? (map['Records'] as List).map((e)=>FinishExamNotifyDetail.fromJson(e as Map)).toList() : null, userCode: map['UserCode'], ); } Map toJson() { final map = Map(); if(records != null) map['Records'] = records; if(userCode != null) map['UserCode'] = userCode; return map; } } class DeviceFinishExamRequest extends TokenRequest{ List? records; DeviceFinishExamRequest({ this.records, String? token, }) : super( token: token, ); factory DeviceFinishExamRequest.fromJson(Map map) { return DeviceFinishExamRequest( records: map['Records'] != null ? map['Records'].cast().toList() : null, token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(records != null) map['Records'] = records; return map; } } class QueryExamListItemResult { String? examCode; String? patientName; String? age; List? ageInfo; String? sex; List? associatedExamCodes; DateTime? createTime; QueryExamListItemResult({ this.examCode, this.patientName, this.age, this.ageInfo, this.sex, this.associatedExamCodes, this.createTime, }); factory QueryExamListItemResult.fromJson(Map map) { return QueryExamListItemResult( examCode: map['ExamCode'], patientName: map['PatientName'], age: map['Age'], ageInfo: map['AgeInfo'] != null ? (map['AgeInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map)).toList() : null, sex: map['Sex'], associatedExamCodes: map['AssociatedExamCodes'] != null ? map['AssociatedExamCodes'].cast().toList() : null, createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null, ); } Map toJson() { final map = Map(); if(examCode != null) map['ExamCode'] = examCode; if(patientName != null) map['PatientName'] = patientName; if(age != null) map['Age'] = age; if(ageInfo != null) map['AgeInfo'] = ageInfo; if(sex != null) map['Sex'] = sex; if(associatedExamCodes != null) map['AssociatedExamCodes'] = associatedExamCodes; if(createTime != null) map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!); return map; } } enum ExamStatusEnum { Wait, Done, } class QueryExamListRequest extends PageRequest{ String? patientName; DateTime? startTime; DateTime? endTime; ExamStatusEnum examStatus; QueryExamListRequest({ this.patientName, this.startTime, this.endTime, this.examStatus = ExamStatusEnum.Wait, int pageIndex = 0, int pageSize = 0, String? token, }) : super( pageIndex: pageIndex, pageSize: pageSize, token: token, ); factory QueryExamListRequest.fromJson(Map map) { return QueryExamListRequest( patientName: map['PatientName'], startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null, endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null, examStatus: ExamStatusEnum.values.firstWhere((e) => e.index == map['ExamStatus']), pageIndex: map['PageIndex'], pageSize: map['PageSize'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(patientName != null) map['PatientName'] = patientName; if(startTime != null) map['StartTime'] = JsonRpcUtils.dateFormat(startTime!); if(endTime != null) map['EndTime'] = JsonRpcUtils.dateFormat(endTime!); map['ExamStatus'] = examStatus.index; return map; } } class QueryExamInfoResult { DateTime? createTime; String? deptName; String? patientName; String? patientAge; List? patientAgeInfo; String? patientSex; List? patientInfoExtList; List? associatedExamCodes; RecordStatusEnum examStatus; QueryExamInfoResult({ this.createTime, this.deptName, this.patientName, this.patientAge, this.patientAgeInfo, this.patientSex, this.patientInfoExtList, this.associatedExamCodes, this.examStatus = RecordStatusEnum.NotScanned, }); factory QueryExamInfoResult.fromJson(Map map) { return QueryExamInfoResult( createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null, deptName: map['DeptName'], patientName: map['PatientName'], patientAge: map['PatientAge'], patientAgeInfo: map['PatientAgeInfo'] != null ? (map['PatientAgeInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map)).toList() : null, patientSex: map['PatientSex'], patientInfoExtList: map['PatientInfoExtList'] != null ? (map['PatientInfoExtList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map)).toList() : null, associatedExamCodes: map['AssociatedExamCodes'] != null ? map['AssociatedExamCodes'].cast().toList() : null, examStatus: RecordStatusEnum.values.firstWhere((e) => e.index == map['ExamStatus']), ); } Map toJson() { final map = Map(); if(createTime != null) map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!); if(deptName != null) map['DeptName'] = deptName; if(patientName != null) map['PatientName'] = patientName; if(patientAge != null) map['PatientAge'] = patientAge; if(patientAgeInfo != null) map['PatientAgeInfo'] = patientAgeInfo; if(patientSex != null) map['PatientSex'] = patientSex; if(patientInfoExtList != null) map['PatientInfoExtList'] = patientInfoExtList; if(associatedExamCodes != null) map['AssociatedExamCodes'] = associatedExamCodes; map['ExamStatus'] = examStatus.index; return map; } } class QueryExamInfoRequest extends TokenRequest{ String? examCode; QueryExamInfoRequest({ this.examCode, String? token, }) : super( token: token, ); factory QueryExamInfoRequest.fromJson(Map map) { return QueryExamInfoRequest( examCode: map['ExamCode'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(examCode != null) map['ExamCode'] = examCode; return map; } } class OutputItemMetaDTO { String? name; String? description; int unit; bool? isWorking; OutputItemMetaDTO({ this.name, this.description, this.unit = 0, this.isWorking, }); factory OutputItemMetaDTO.fromJson(Map map) { return OutputItemMetaDTO( name: map['Name'], description: map['Description'], unit: map['Unit'], isWorking: map['IsWorking'], ); } Map toJson() { final map = Map(); if(name != null) map['Name'] = name; if(description != null) map['Description'] = description; map['Unit'] = unit; if(isWorking != null) map['IsWorking'] = isWorking; return map; } } class CalculatorMetaDTO { List? availableOutputs; CalculatorMetaDTO({ this.availableOutputs, }); factory CalculatorMetaDTO.fromJson(Map map) { return CalculatorMetaDTO( availableOutputs: map['AvailableOutputs'] != null ? (map['AvailableOutputs'] as List).map((e)=>OutputItemMetaDTO.fromJson(e as Map)).toList() : null, ); } Map toJson() { final map = Map(); if(availableOutputs != null) map['AvailableOutputs'] = availableOutputs; return map; } } class ChildItemMetaDTO { String? name; String? description; bool isWorking; List? childItems; CalculatorMetaDTO? calculator; String? measureTypeName; ChildItemMetaDTO({ this.name, this.description, this.isWorking = false, this.childItems, this.calculator, this.measureTypeName, }); factory ChildItemMetaDTO.fromJson(Map map) { return ChildItemMetaDTO( name: map['Name'], description: map['Description'], isWorking: map['IsWorking'], childItems: map['ChildItems'] != null ? (map['ChildItems'] as List).map((e)=>ChildItemMetaDTO.fromJson(e as Map)).toList() : null, calculator: map['Calculator'] != null ? CalculatorMetaDTO.fromJson(map['Calculator']) : null, measureTypeName: map['MeasureTypeName'], ); } Map toJson() { final map = Map(); if(name != null) map['Name'] = name; if(description != null) map['Description'] = description; map['IsWorking'] = isWorking; if(childItems != null) map['ChildItems'] = childItems; if(calculator != null) map['Calculator'] = calculator; if(measureTypeName != null) map['MeasureTypeName'] = measureTypeName; return map; } } class ItemMetaDTO { String? name; String? description; String? briefAnnotation; String? measureTypeName; List? categories; CalculatorMetaDTO? calculator; List? multiMethodItems; List? methodChildItems; ItemMetaDTO({ this.name, this.description, this.briefAnnotation, this.measureTypeName, this.categories, this.calculator, this.multiMethodItems, this.methodChildItems, }); factory ItemMetaDTO.fromJson(Map map) { return ItemMetaDTO( name: map['Name'], description: map['Description'], briefAnnotation: map['BriefAnnotation'], measureTypeName: map['MeasureTypeName'], categories: map['Categories'] != null ? map['Categories'].cast().toList() : null, calculator: map['Calculator'] != null ? CalculatorMetaDTO.fromJson(map['Calculator']) : null, multiMethodItems: map['MultiMethodItems'] != null ? (map['MultiMethodItems'] as List).map((e)=>ChildItemMetaDTO.fromJson(e as Map)).toList() : null, methodChildItems: map['MethodChildItems'] != null ? (map['MethodChildItems'] as List).map((e)=>ChildItemMetaDTO.fromJson(e as Map)).toList() : null, ); } Map toJson() { final map = Map(); if(name != null) map['Name'] = name; if(description != null) map['Description'] = description; if(briefAnnotation != null) map['BriefAnnotation'] = briefAnnotation; if(measureTypeName != null) map['MeasureTypeName'] = measureTypeName; if(categories != null) map['Categories'] = categories; if(calculator != null) map['Calculator'] = calculator; if(multiMethodItems != null) map['MultiMethodItems'] = multiMethodItems; if(methodChildItems != null) map['MethodChildItems'] = methodChildItems; return map; } } class MeasureFolderDTO { String? name; List? workingItemNames; List? availableItems; MeasureFolderDTO({ this.name, this.workingItemNames, this.availableItems, }); factory MeasureFolderDTO.fromJson(Map map) { return MeasureFolderDTO( name: map['Name'], workingItemNames: map['WorkingItemNames'] != null ? map['WorkingItemNames'].cast().toList() : null, availableItems: map['AvailableItems'] != null ? (map['AvailableItems'] as List).map((e)=>ItemMetaDTO.fromJson(e as Map)).toList() : null, ); } Map toJson() { final map = Map(); if(name != null) map['Name'] = name; if(workingItemNames != null) map['WorkingItemNames'] = workingItemNames; if(availableItems != null) map['AvailableItems'] = availableItems; return map; } } class MeasureGroupDTO { String? name; String? description; List? availableFolders; MeasureGroupDTO({ this.name, this.description, this.availableFolders, }); factory MeasureGroupDTO.fromJson(Map map) { return MeasureGroupDTO( name: map['Name'], description: map['Description'], availableFolders: map['AvailableFolders'] != null ? (map['AvailableFolders'] as List).map((e)=>MeasureFolderDTO.fromJson(e as Map)).toList() : null, ); } Map toJson() { final map = Map(); if(name != null) map['Name'] = name; if(description != null) map['Description'] = description; if(availableFolders != null) map['AvailableFolders'] = availableFolders; return map; } } class MeasureModeDTO { String? modeName; List? availableGroups; MeasureModeDTO({ this.modeName, this.availableGroups, }); factory MeasureModeDTO.fromJson(Map map) { return MeasureModeDTO( modeName: map['ModeName'], availableGroups: map['AvailableGroups'] != null ? (map['AvailableGroups'] as List).map((e)=>MeasureGroupDTO.fromJson(e as Map)).toList() : null, ); } Map toJson() { final map = Map(); if(modeName != null) map['ModeName'] = modeName; if(availableGroups != null) map['AvailableGroups'] = availableGroups; return map; } } class MeasureApplicationDTO { String? version; String? id; String? description; List? availableModes; MeasureApplicationDTO({ this.version, this.id, this.description, this.availableModes, }); factory MeasureApplicationDTO.fromJson(Map map) { return MeasureApplicationDTO( version: map['Version'], id: map['Id'], description: map['Description'], availableModes: map['AvailableModes'] != null ? (map['AvailableModes'] as List).map((e)=>MeasureModeDTO.fromJson(e as Map)).toList() : null, ); } Map toJson() { final map = Map(); if(version != null) map['Version'] = version; if(id != null) map['Id'] = id; if(description != null) map['Description'] = description; if(availableModes != null) map['AvailableModes'] = availableModes; return map; } } class GetMeasureApplicationRequest extends TokenRequest{ String? applicationName; String? categoryName; List? measureModes; GetMeasureApplicationRequest({ this.applicationName, this.categoryName, this.measureModes, String? token, }) : super( token: token, ); factory GetMeasureApplicationRequest.fromJson(Map map) { return GetMeasureApplicationRequest( applicationName: map['ApplicationName'], categoryName: map['CategoryName'], measureModes: map['MeasureModes'] != null ? map['MeasureModes'].cast().toList() : null, token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(applicationName != null) map['ApplicationName'] = applicationName; if(categoryName != null) map['CategoryName'] = categoryName; if(measureModes != null) map['MeasureModes'] = measureModes; return map; } } class CommentItemDTO { String? text; CommentItemDTO({ this.text, }); factory CommentItemDTO.fromJson(Map map) { return CommentItemDTO( text: map['Text'], ); } Map toJson() { final map = Map(); if(text != null) map['Text'] = text; return map; } } class CommentItemResultDTO { String? version; List? commentItems; CommentItemResultDTO({ this.version, this.commentItems, }); factory CommentItemResultDTO.fromJson(Map map) { return CommentItemResultDTO( version: map['Version'], commentItems: map['CommentItems'] != null ? (map['CommentItems'] as List).map((e)=>CommentItemDTO.fromJson(e as Map)).toList() : null, ); } Map toJson() { final map = Map(); if(version != null) map['Version'] = version; if(commentItems != null) map['CommentItems'] = commentItems; return map; } } class GetCommentsByApplicationRequest extends TokenRequest{ String? languageCode; String? applicationName; String? categoryName; GetCommentsByApplicationRequest({ this.languageCode, this.applicationName, this.categoryName, String? token, }) : super( token: token, ); factory GetCommentsByApplicationRequest.fromJson(Map map) { return GetCommentsByApplicationRequest( languageCode: map['LanguageCode'], applicationName: map['ApplicationName'], categoryName: map['CategoryName'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(languageCode != null) map['LanguageCode'] = languageCode; if(applicationName != null) map['ApplicationName'] = applicationName; if(categoryName != null) map['CategoryName'] = categoryName; return map; } } class PresetCommentItemDTO { List? categoryList; String? text; PresetCommentItemDTO({ this.categoryList, this.text, }); factory PresetCommentItemDTO.fromJson(Map map) { return PresetCommentItemDTO( categoryList: map['CategoryList'] != null ? map['CategoryList'].cast().toList() : null, text: map['Text'], ); } Map toJson() { final map = Map(); if(categoryList != null) map['CategoryList'] = categoryList; if(text != null) map['Text'] = text; return map; } } class PresetCommentItemResultDTO { String? version; List? presetCommentItems; PresetCommentItemResultDTO({ this.version, this.presetCommentItems, }); factory PresetCommentItemResultDTO.fromJson(Map map) { return PresetCommentItemResultDTO( version: map['Version'], presetCommentItems: map['PresetCommentItems'] != null ? (map['PresetCommentItems'] as List).map((e)=>PresetCommentItemDTO.fromJson(e as Map)).toList() : null, ); } Map toJson() { final map = Map(); if(version != null) map['Version'] = version; if(presetCommentItems != null) map['PresetCommentItems'] = presetCommentItems; return map; } } class GetPresetCommentsRequest extends TokenRequest{ String? languageCode; GetPresetCommentsRequest({ this.languageCode, String? token, }) : super( token: token, ); factory GetPresetCommentsRequest.fromJson(Map map) { return GetPresetCommentsRequest( languageCode: map['LanguageCode'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(languageCode != null) map['LanguageCode'] = languageCode; return map; } } class GetReportElementByLanguageRequest extends TokenRequest{ String? reportDatasJosn; String? language; GetReportElementByLanguageRequest({ this.reportDatasJosn, this.language, String? token, }) : super( token: token, ); factory GetReportElementByLanguageRequest.fromJson(Map map) { return GetReportElementByLanguageRequest( reportDatasJosn: map['ReportDatasJosn'], language: map['Language'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(reportDatasJosn != null) map['ReportDatasJosn'] = reportDatasJosn; if(language != null) map['Language'] = language; return map; } } class UpdateCommentItemDTO { String? oldText; String? newText; UpdateCommentItemDTO({ this.oldText, this.newText, }); factory UpdateCommentItemDTO.fromJson(Map map) { return UpdateCommentItemDTO( oldText: map['OldText'], newText: map['NewText'], ); } Map toJson() { final map = Map(); if(oldText != null) map['OldText'] = oldText; if(newText != null) map['NewText'] = newText; return map; } } class SaveUserDefinedCommentsRequest extends TokenRequest{ String? version; String? languageCode; String? applicationName; String? categoryName; List? addCommentItems; List? deletedCommentItems; List? updateCommentItems; SaveUserDefinedCommentsRequest({ this.version, this.languageCode, this.applicationName, this.categoryName, this.addCommentItems, this.deletedCommentItems, this.updateCommentItems, String? token, }) : super( token: token, ); factory SaveUserDefinedCommentsRequest.fromJson(Map map) { return SaveUserDefinedCommentsRequest( version: map['Version'], languageCode: map['LanguageCode'], applicationName: map['ApplicationName'], categoryName: map['CategoryName'], addCommentItems: map['AddCommentItems'] != null ? (map['AddCommentItems'] as List).map((e)=>CommentItemDTO.fromJson(e as Map)).toList() : null, deletedCommentItems: map['DeletedCommentItems'] != null ? (map['DeletedCommentItems'] as List).map((e)=>CommentItemDTO.fromJson(e as Map)).toList() : null, updateCommentItems: map['UpdateCommentItems'] != null ? (map['UpdateCommentItems'] as List).map((e)=>UpdateCommentItemDTO.fromJson(e as Map)).toList() : null, token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(version != null) map['Version'] = version; if(languageCode != null) map['LanguageCode'] = languageCode; if(applicationName != null) map['ApplicationName'] = applicationName; if(categoryName != null) map['CategoryName'] = categoryName; if(addCommentItems != null) map['AddCommentItems'] = addCommentItems; if(deletedCommentItems != null) map['DeletedCommentItems'] = deletedCommentItems; if(updateCommentItems != null) map['UpdateCommentItems'] = updateCommentItems; return map; } } class ResetUserCommentsRequest extends TokenRequest{ bool isAllReset; String? applicationName; String? categoryName; ResetUserCommentsRequest({ this.isAllReset = false, this.applicationName, this.categoryName, String? token, }) : super( token: token, ); factory ResetUserCommentsRequest.fromJson(Map map) { return ResetUserCommentsRequest( isAllReset: map['IsAllReset'], applicationName: map['ApplicationName'], categoryName: map['CategoryName'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); map['IsAllReset'] = isAllReset; if(applicationName != null) map['ApplicationName'] = applicationName; if(categoryName != null) map['CategoryName'] = categoryName; return map; } } class UserDefinedItemMetaDTO { String? name; String? workingMethodItem; UserDefinedItemMetaDTO({ this.name, this.workingMethodItem, }); factory UserDefinedItemMetaDTO.fromJson(Map map) { return UserDefinedItemMetaDTO( name: map['Name'], workingMethodItem: map['WorkingMethodItem'], ); } Map toJson() { final map = Map(); if(name != null) map['Name'] = name; if(workingMethodItem != null) map['WorkingMethodItem'] = workingMethodItem; return map; } } class UserDefinedMeasureFolderDTO { String? name; List? workingItemNames; String? defaultItem; List? multiMethodItemMetas; UserDefinedMeasureFolderDTO({ this.name, this.workingItemNames, this.defaultItem, this.multiMethodItemMetas, }); factory UserDefinedMeasureFolderDTO.fromJson(Map map) { return UserDefinedMeasureFolderDTO( name: map['Name'], workingItemNames: map['WorkingItemNames'] != null ? map['WorkingItemNames'].cast().toList() : null, defaultItem: map['DefaultItem'], multiMethodItemMetas: map['MultiMethodItemMetas'] != null ? (map['MultiMethodItemMetas'] as List).map((e)=>UserDefinedItemMetaDTO.fromJson(e as Map)).toList() : null, ); } Map toJson() { final map = Map(); if(name != null) map['Name'] = name; if(workingItemNames != null) map['WorkingItemNames'] = workingItemNames; if(defaultItem != null) map['DefaultItem'] = defaultItem; if(multiMethodItemMetas != null) map['MultiMethodItemMetas'] = multiMethodItemMetas; return map; } } class UserDefinedMeasureGroupDTO { String? name; List? folders; UserDefinedMeasureGroupDTO({ this.name, this.folders, }); factory UserDefinedMeasureGroupDTO.fromJson(Map map) { return UserDefinedMeasureGroupDTO( name: map['Name'], folders: map['Folders'] != null ? (map['Folders'] as List).map((e)=>UserDefinedMeasureFolderDTO.fromJson(e as Map)).toList() : null, ); } Map toJson() { final map = Map(); if(name != null) map['Name'] = name; if(folders != null) map['Folders'] = folders; return map; } } class UserDefinedMeasureModeDTO { String? modeName; List? workingGroups; UserDefinedMeasureModeDTO({ this.modeName, this.workingGroups, }); factory UserDefinedMeasureModeDTO.fromJson(Map map) { return UserDefinedMeasureModeDTO( modeName: map['ModeName'], workingGroups: map['WorkingGroups'] != null ? (map['WorkingGroups'] as List).map((e)=>UserDefinedMeasureGroupDTO.fromJson(e as Map)).toList() : null, ); } Map toJson() { final map = Map(); if(modeName != null) map['ModeName'] = modeName; if(workingGroups != null) map['WorkingGroups'] = workingGroups; return map; } } class SaveUserDefinedMeasureApplicationRequest extends TokenRequest{ String? version; String? applicationName; String? categoryName; UserDefinedMeasureModeDTO? workingMode; SaveUserDefinedMeasureApplicationRequest({ this.version, this.applicationName, this.categoryName, this.workingMode, String? token, }) : super( token: token, ); factory SaveUserDefinedMeasureApplicationRequest.fromJson(Map map) { return SaveUserDefinedMeasureApplicationRequest( version: map['Version'], applicationName: map['ApplicationName'], categoryName: map['CategoryName'], workingMode: map['WorkingMode'] != null ? UserDefinedMeasureModeDTO.fromJson(map['WorkingMode']) : null, token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(version != null) map['Version'] = version; if(applicationName != null) map['ApplicationName'] = applicationName; if(categoryName != null) map['CategoryName'] = categoryName; if(workingMode != null) map['WorkingMode'] = workingMode; return map; } } enum CursorTypeEnum { CursorType1Icon, CursorType2Icon, CursorType3Icon, CursorType4Icon, CursorType5Icon, } class MeasureSystemSettingDTO { String? version; CursorTypeEnum cursorType; int cursorSize; int shapeCursorSize; String? cursorColor; bool showResultWindow; int showResultLocation; int fontSize; bool showCursorLine; bool holdMeasureLine; bool showDepthGuideline; bool showBriefAnnotation; String? minCursorDistance; String? autoSnapDistance; int annotationFontSize; bool showProtocolInWorkSheet; bool showAnnotation; MeasureSystemSettingDTO({ this.version, this.cursorType = CursorTypeEnum.CursorType1Icon, this.cursorSize = 0, this.shapeCursorSize = 0, this.cursorColor, this.showResultWindow = false, this.showResultLocation = 0, this.fontSize = 0, this.showCursorLine = false, this.holdMeasureLine = false, this.showDepthGuideline = false, this.showBriefAnnotation = false, this.minCursorDistance, this.autoSnapDistance, this.annotationFontSize = 0, this.showProtocolInWorkSheet = false, this.showAnnotation = false, }); factory MeasureSystemSettingDTO.fromJson(Map map) { return MeasureSystemSettingDTO( version: map['Version'], cursorType: CursorTypeEnum.values.firstWhere((e) => e.index == map['CursorType']), cursorSize: map['CursorSize'], shapeCursorSize: map['ShapeCursorSize'], cursorColor: map['CursorColor'], showResultWindow: map['ShowResultWindow'], showResultLocation: map['ShowResultLocation'], fontSize: map['FontSize'], showCursorLine: map['ShowCursorLine'], holdMeasureLine: map['HoldMeasureLine'], showDepthGuideline: map['ShowDepthGuideline'], showBriefAnnotation: map['ShowBriefAnnotation'], minCursorDistance: map['MinCursorDistance'], autoSnapDistance: map['AutoSnapDistance'], annotationFontSize: map['AnnotationFontSize'], showProtocolInWorkSheet: map['ShowProtocolInWorkSheet'], showAnnotation: map['ShowAnnotation'], ); } Map toJson() { final map = Map(); if(version != null) map['Version'] = version; map['CursorType'] = cursorType.index; map['CursorSize'] = cursorSize; map['ShapeCursorSize'] = shapeCursorSize; if(cursorColor != null) map['CursorColor'] = cursorColor; map['ShowResultWindow'] = showResultWindow; map['ShowResultLocation'] = showResultLocation; map['FontSize'] = fontSize; map['ShowCursorLine'] = showCursorLine; map['HoldMeasureLine'] = holdMeasureLine; map['ShowDepthGuideline'] = showDepthGuideline; map['ShowBriefAnnotation'] = showBriefAnnotation; if(minCursorDistance != null) map['MinCursorDistance'] = minCursorDistance; if(autoSnapDistance != null) map['AutoSnapDistance'] = autoSnapDistance; map['AnnotationFontSize'] = annotationFontSize; map['ShowProtocolInWorkSheet'] = showProtocolInWorkSheet; map['ShowAnnotation'] = showAnnotation; return map; } } class GetMeasureSystemSettingRequest extends TokenRequest{ GetMeasureSystemSettingRequest({ String? token, }) : super( token: token, ); factory GetMeasureSystemSettingRequest.fromJson(Map map) { return GetMeasureSystemSettingRequest( token: map['Token'], ); } Map toJson() { final map = super.toJson(); return map; } } class SaveMeasureSystemSettingRequest extends TokenRequest{ MeasureSystemSettingDTO? systemSetting; SaveMeasureSystemSettingRequest({ this.systemSetting, String? token, }) : super( token: token, ); factory SaveMeasureSystemSettingRequest.fromJson(Map map) { return SaveMeasureSystemSettingRequest( systemSetting: map['SystemSetting'] != null ? MeasureSystemSettingDTO.fromJson(map['SystemSetting']) : null, token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(systemSetting != null) map['SystemSetting'] = systemSetting; return map; } } enum RecordCreateTypeEnum { Reservation, Normal, } class RecordInfoDTO extends BaseDTO{ String? recordCode; String? patientCode; String? deviceCode; RecordStatusEnum recordStatus; String? creatorCode; String? tags; RecordCreateTypeEnum createType; List? patientInfo; List? patientInfoExtList; String? devicePatientID; String? patientType; List? readUsers; String? rootOrganizationCode; String? organizationCode; List? associatedExamCodes; DiagnosisStatusEnum diagnosisStatus; List? diagnosisInfos; bool isCollecting; DateTime? startCollectingTime; RecordInfoDTO({ this.recordCode, this.patientCode, this.deviceCode, this.recordStatus = RecordStatusEnum.NotScanned, this.creatorCode, this.tags, this.createType = RecordCreateTypeEnum.Reservation, this.patientInfo, this.patientInfoExtList, this.devicePatientID, this.patientType, this.readUsers, this.rootOrganizationCode, this.organizationCode, this.associatedExamCodes, this.diagnosisStatus = DiagnosisStatusEnum.NotRequired, this.diagnosisInfos, this.isCollecting = false, this.startCollectingTime, DateTime? createTime, DateTime? updateTime, }) : super( createTime: createTime, updateTime: updateTime, ); factory RecordInfoDTO.fromJson(Map map) { return RecordInfoDTO( recordCode: map['RecordCode'], patientCode: map['PatientCode'], deviceCode: map['DeviceCode'], recordStatus: RecordStatusEnum.values.firstWhere((e) => e.index == map['RecordStatus']), creatorCode: map['CreatorCode'], tags: map['Tags'], createType: RecordCreateTypeEnum.values.firstWhere((e) => e.index == map['CreateType']), patientInfo: map['PatientInfo'] != null ? (map['PatientInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map)).toList() : null, patientInfoExtList: map['PatientInfoExtList'] != null ? (map['PatientInfoExtList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map)).toList() : null, devicePatientID: map['DevicePatientID'], patientType: map['PatientType'], readUsers: map['ReadUsers'] != null ? map['ReadUsers'].cast().toList() : null, rootOrganizationCode: map['RootOrganizationCode'], organizationCode: map['OrganizationCode'], associatedExamCodes: map['AssociatedExamCodes'] != null ? map['AssociatedExamCodes'].cast().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)).toList() : null, isCollecting: map['IsCollecting'], startCollectingTime: map['StartCollectingTime'] != null ? DateTime.parse(map['StartCollectingTime']) : null, createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null, updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null, ); } Map toJson() { final map = super.toJson(); if(recordCode != null) map['RecordCode'] = recordCode; if(patientCode != null) map['PatientCode'] = patientCode; if(deviceCode != null) map['DeviceCode'] = deviceCode; map['RecordStatus'] = recordStatus.index; if(creatorCode != null) map['CreatorCode'] = creatorCode; if(tags != null) map['Tags'] = tags; map['CreateType'] = createType.index; if(patientInfo != null) map['PatientInfo'] = patientInfo; if(patientInfoExtList != null) map['PatientInfoExtList'] = patientInfoExtList; if(devicePatientID != null) map['DevicePatientID'] = devicePatientID; if(patientType != null) map['PatientType'] = patientType; if(readUsers != null) map['ReadUsers'] = readUsers; if(rootOrganizationCode != null) map['RootOrganizationCode'] = rootOrganizationCode; if(organizationCode != null) map['OrganizationCode'] = organizationCode; if(associatedExamCodes != null) map['AssociatedExamCodes'] = associatedExamCodes; map['DiagnosisStatus'] = diagnosisStatus.index; if(diagnosisInfos != null) map['DiagnosisInfos'] = diagnosisInfos; map['IsCollecting'] = isCollecting; if(startCollectingTime != null) map['StartCollectingTime'] = JsonRpcUtils.dateFormat(startCollectingTime!); return map; } } class RecordData { String? patientName; String? patientCode; List? recordItemList; RecordData({ this.patientName, this.patientCode, this.recordItemList, }); factory RecordData.fromJson(Map map) { return RecordData( patientName: map['PatientName'], patientCode: map['PatientCode'], recordItemList: map['RecordItemList'] != null ? (map['RecordItemList'] as List).map((e)=>RecordInfoDTO.fromJson(e as Map)).toList() : null, ); } Map toJson() { final map = Map(); if(patientName != null) map['PatientName'] = patientName; if(patientCode != null) map['PatientCode'] = patientCode; if(recordItemList != null) map['RecordItemList'] = recordItemList; return map; } } class ReportItem { String? recordCode; String? fileToken; ReportItem({ this.recordCode, this.fileToken, }); factory ReportItem.fromJson(Map map) { return ReportItem( recordCode: map['RecordCode'], fileToken: map['FileToken'], ); } Map toJson() { final map = Map(); if(recordCode != null) map['RecordCode'] = recordCode; if(fileToken != null) map['FileToken'] = fileToken; return map; } } class ReportData { String? patientName; String? patientCode; List? reportItemList; ReportData({ this.patientName, this.patientCode, this.reportItemList, }); factory ReportData.fromJson(Map map) { return ReportData( patientName: map['PatientName'], patientCode: map['PatientCode'], reportItemList: map['ReportItemList'] != null ? (map['ReportItemList'] as List).map((e)=>ReportItem.fromJson(e as Map)).toList() : null, ); } Map toJson() { final map = Map(); if(patientName != null) map['PatientName'] = patientName; if(patientCode != null) map['PatientCode'] = patientCode; if(reportItemList != null) map['ReportItemList'] = reportItemList; return map; } } class RemedicalItem { String? recordCode; String? fileToken; RemedicalFileDataTypeEnum fileDataType; RemedicalItem({ this.recordCode, this.fileToken, this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle, }); factory RemedicalItem.fromJson(Map map) { return RemedicalItem( recordCode: map['RecordCode'], fileToken: map['FileToken'], fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']), ); } Map toJson() { final map = Map(); if(recordCode != null) map['RecordCode'] = recordCode; if(fileToken != null) map['FileToken'] = fileToken; map['FileDataType'] = fileDataType.index; return map; } } class RemedicalData { String? patientName; String? patientCode; List? remedicalItemList; RemedicalData({ this.patientName, this.patientCode, this.remedicalItemList, }); factory RemedicalData.fromJson(Map map) { return RemedicalData( patientName: map['PatientName'], patientCode: map['PatientCode'], remedicalItemList: map['RemedicalItemList'] != null ? (map['RemedicalItemList'] as List).map((e)=>RemedicalItem.fromJson(e as Map)).toList() : null, ); } Map toJson() { final map = Map(); if(patientName != null) map['PatientName'] = patientName; if(patientCode != null) map['PatientCode'] = patientCode; if(remedicalItemList != null) map['RemedicalItemList'] = remedicalItemList; return map; } } class ExportRemedicalDataResult { List? recordList; List? reportList; List? remedicalList; ExportRemedicalDataResult({ this.recordList, this.reportList, this.remedicalList, }); factory ExportRemedicalDataResult.fromJson(Map map) { return ExportRemedicalDataResult( recordList: map['RecordList'] != null ? (map['RecordList'] as List).map((e)=>RecordData.fromJson(e as Map)).toList() : null, reportList: map['ReportList'] != null ? (map['ReportList'] as List).map((e)=>ReportData.fromJson(e as Map)).toList() : null, remedicalList: map['RemedicalList'] != null ? (map['RemedicalList'] as List).map((e)=>RemedicalData.fromJson(e as Map)).toList() : null, ); } Map toJson() { final map = Map(); if(recordList != null) map['RecordList'] = recordList; if(reportList != null) map['ReportList'] = reportList; if(remedicalList != null) map['RemedicalList'] = remedicalList; return map; } } class ExportRemedicalDataRequest extends TokenRequest{ DateTime? startTime; DateTime? endTime; bool isExportReport; bool isExportRecord; bool isExportRemedicalData; List? patientCodes; ExportRemedicalDataRequest({ this.startTime, this.endTime, this.isExportReport = false, this.isExportRecord = false, this.isExportRemedicalData = false, this.patientCodes, String? token, }) : super( token: token, ); factory ExportRemedicalDataRequest.fromJson(Map map) { return ExportRemedicalDataRequest( startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null, endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null, isExportReport: map['IsExportReport'], isExportRecord: map['IsExportRecord'], isExportRemedicalData: map['IsExportRemedicalData'], patientCodes: map['PatientCodes'] != null ? map['PatientCodes'].cast().toList() : null, token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(startTime != null) map['StartTime'] = JsonRpcUtils.dateFormat(startTime!); if(endTime != null) map['EndTime'] = JsonRpcUtils.dateFormat(endTime!); map['IsExportReport'] = isExportReport; map['IsExportRecord'] = isExportRecord; map['IsExportRemedicalData'] = isExportRemedicalData; if(patientCodes != null) map['PatientCodes'] = patientCodes; return map; } } class FindCacheByCodeRequest extends TokenRequest{ String? cacheCode; FindCacheByCodeRequest({ this.cacheCode, String? token, }) : super( token: token, ); factory FindCacheByCodeRequest.fromJson(Map map) { return FindCacheByCodeRequest( cacheCode: map['CacheCode'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(cacheCode != null) map['CacheCode'] = cacheCode; return map; } } class CreateReferralRecordRequest extends TokenRequest{ String? patientCode; String? subjectMatter; String? referralOrganizationCode; String? referralUserCode; String? referralRecordCode; CreateReferralRecordRequest({ this.patientCode, this.subjectMatter, this.referralOrganizationCode, this.referralUserCode, this.referralRecordCode, String? token, }) : super( token: token, ); factory CreateReferralRecordRequest.fromJson(Map map) { return CreateReferralRecordRequest( patientCode: map['PatientCode'], subjectMatter: map['SubjectMatter'], referralOrganizationCode: map['ReferralOrganizationCode'], referralUserCode: map['ReferralUserCode'], referralRecordCode: map['ReferralRecordCode'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(patientCode != null) map['PatientCode'] = patientCode; if(subjectMatter != null) map['SubjectMatter'] = subjectMatter; if(referralOrganizationCode != null) map['ReferralOrganizationCode'] = referralOrganizationCode; if(referralUserCode != null) map['ReferralUserCode'] = referralUserCode; if(referralRecordCode != null) map['ReferralRecordCode'] = referralRecordCode; return map; } } class ModifyReferralRecordRequest extends TokenRequest{ String? patientCode; String? subjectMatter; String? referralOrganizationCode; String? referralUserCode; String? referralRecordCode; ModifyReferralRecordRequest({ this.patientCode, this.subjectMatter, this.referralOrganizationCode, this.referralUserCode, this.referralRecordCode, String? token, }) : super( token: token, ); factory ModifyReferralRecordRequest.fromJson(Map map) { return ModifyReferralRecordRequest( patientCode: map['PatientCode'], subjectMatter: map['SubjectMatter'], referralOrganizationCode: map['ReferralOrganizationCode'], referralUserCode: map['ReferralUserCode'], referralRecordCode: map['ReferralRecordCode'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(patientCode != null) map['PatientCode'] = patientCode; if(subjectMatter != null) map['SubjectMatter'] = subjectMatter; if(referralOrganizationCode != null) map['ReferralOrganizationCode'] = referralOrganizationCode; if(referralUserCode != null) map['ReferralUserCode'] = referralUserCode; if(referralRecordCode != null) map['ReferralRecordCode'] = referralRecordCode; return map; } } class QueryReferralRecordPageDTO extends ClientPatientInfoBaseDTO{ String? code; String? outUserName; String? inUserName; QueryReferralRecordPageDTO({ this.code, this.outUserName, this.inUserName, String? patientCode, bool isValid = false, List? patientData, int unReadRecordCount = 0, bool isReferral = false, List? devicePatientIDs, DateTime? createTime, DateTime? updateTime, }) : super( patientCode: patientCode, isValid: isValid, patientData: patientData, unReadRecordCount: unReadRecordCount, isReferral: isReferral, devicePatientIDs: devicePatientIDs, createTime: createTime, updateTime: updateTime, ); factory QueryReferralRecordPageDTO.fromJson(Map map) { return QueryReferralRecordPageDTO( code: map['Code'], outUserName: map['OutUserName'], inUserName: map['InUserName'], patientCode: map['PatientCode'], isValid: map['IsValid'], patientData: map['PatientData'] != null ? (map['PatientData'] as List).map((e)=>DataItemDTO.fromJson(e as Map)).toList() : null, unReadRecordCount: map['UnReadRecordCount'], isReferral: map['IsReferral'], devicePatientIDs: map['DevicePatientIDs'] != null ? map['DevicePatientIDs'].cast().toList() : null, createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null, updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null, ); } Map toJson() { final map = super.toJson(); if(code != null) map['Code'] = code; if(outUserName != null) map['OutUserName'] = outUserName; if(inUserName != null) map['InUserName'] = inUserName; return map; } } class QueryReferralRecordListRequest extends PageRequest{ String? keyWord; DateTime? startTime; DateTime? endTime; PatientValidStatusEnum isValid; QueryReferralRecordListRequest({ 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 QueryReferralRecordListRequest.fromJson(Map map) { return QueryReferralRecordListRequest( 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 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 AuditReferralRecordRequest extends TokenRequest{ String? referralRecordCode; bool isReceive; String? rejectReason; AuditReferralRecordRequest({ this.referralRecordCode, this.isReceive = false, this.rejectReason, String? token, }) : super( token: token, ); factory AuditReferralRecordRequest.fromJson(Map map) { return AuditReferralRecordRequest( referralRecordCode: map['ReferralRecordCode'], isReceive: map['IsReceive'], rejectReason: map['RejectReason'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(referralRecordCode != null) map['ReferralRecordCode'] = referralRecordCode; map['IsReceive'] = isReceive; if(rejectReason != null) map['RejectReason'] = rejectReason; return map; } } class WithdrawReferralRecordRequest extends TokenRequest{ String? referralRecordCode; WithdrawReferralRecordRequest({ this.referralRecordCode, String? token, }) : super( token: token, ); factory WithdrawReferralRecordRequest.fromJson(Map map) { return WithdrawReferralRecordRequest( referralRecordCode: map['ReferralRecordCode'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(referralRecordCode != null) map['ReferralRecordCode'] = referralRecordCode; return map; } } class ReferralOrganizationsQueryRequest extends TokenRequest{ String? keyword; ReferralOrganizationsQueryRequest({ this.keyword, String? token, }) : super( token: token, ); factory ReferralOrganizationsQueryRequest.fromJson(Map map) { return ReferralOrganizationsQueryRequest( keyword: map['Keyword'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(keyword != null) map['Keyword'] = keyword; return map; } } class QueryReferralPatientByCodeRequest extends FindPatientByCodeRequest{ String? referralRecordCode; QueryReferralPatientByCodeRequest({ this.referralRecordCode, String? code, String? token, }) : super( code: code, token: token, ); factory QueryReferralPatientByCodeRequest.fromJson(Map map) { return QueryReferralPatientByCodeRequest( referralRecordCode: map['ReferralRecordCode'], code: map['Code'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(referralRecordCode != null) map['ReferralRecordCode'] = referralRecordCode; return map; } } class CreateReportClass { String? referralCode; String? creatorCode; String? reportCode; CreateReportClass({ this.referralCode, this.creatorCode, this.reportCode, }); factory CreateReportClass.fromJson(Map map) { return CreateReportClass( referralCode: map['ReferralCode'], creatorCode: map['CreatorCode'], reportCode: map['ReportCode'], ); } Map toJson() { final map = Map(); if(referralCode != null) map['ReferralCode'] = referralCode; if(creatorCode != null) map['CreatorCode'] = creatorCode; if(reportCode != null) map['ReportCode'] = reportCode; return map; } } class ReferralRecordDTO extends BaseDTO{ String? code; String? patientCode; DateTime? referralOutTime; String? referralOutOrganizationCode; String? subjectMatter; String? creator; String? referralInOrganizationCode; String? referralInUserCode; ReferralStatusEnum referralStatus; String? rejectReason; List? referralCodeList; PatientInfoDTO? patientInfo; List? recordCodeList; List? reportCodeList; List? remedicalDataCodeList; List? createReportCodeList; ReferralRecordDTO({ this.code, this.patientCode, this.referralOutTime, this.referralOutOrganizationCode, this.subjectMatter, this.creator, this.referralInOrganizationCode, this.referralInUserCode, this.referralStatus = ReferralStatusEnum.Wait, this.rejectReason, this.referralCodeList, this.patientInfo, this.recordCodeList, this.reportCodeList, this.remedicalDataCodeList, this.createReportCodeList, DateTime? createTime, DateTime? updateTime, }) : super( createTime: createTime, updateTime: updateTime, ); factory ReferralRecordDTO.fromJson(Map map) { return ReferralRecordDTO( code: map['Code'], patientCode: map['PatientCode'], referralOutTime: map['ReferralOutTime'] != null ? DateTime.parse(map['ReferralOutTime']) : null, referralOutOrganizationCode: map['ReferralOutOrganizationCode'], subjectMatter: map['SubjectMatter'], creator: map['Creator'], referralInOrganizationCode: map['ReferralInOrganizationCode'], referralInUserCode: map['ReferralInUserCode'], referralStatus: ReferralStatusEnum.values.firstWhere((e) => e.index == map['ReferralStatus']), rejectReason: map['RejectReason'], referralCodeList: map['ReferralCodeList'] != null ? map['ReferralCodeList'].cast().toList() : null, patientInfo: map['PatientInfo'] != null ? PatientInfoDTO.fromJson(map['PatientInfo']) : null, recordCodeList: map['RecordCodeList'] != null ? map['RecordCodeList'].cast().toList() : null, reportCodeList: map['ReportCodeList'] != null ? map['ReportCodeList'].cast().toList() : null, remedicalDataCodeList: map['RemedicalDataCodeList'] != null ? map['RemedicalDataCodeList'].cast().toList() : null, createReportCodeList: map['CreateReportCodeList'] != null ? (map['CreateReportCodeList'] as List).map((e)=>CreateReportClass.fromJson(e as Map)).toList() : null, createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null, updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null, ); } Map toJson() { final map = super.toJson(); if(code != null) map['Code'] = code; if(patientCode != null) map['PatientCode'] = patientCode; if(referralOutTime != null) map['ReferralOutTime'] = JsonRpcUtils.dateFormat(referralOutTime!); if(referralOutOrganizationCode != null) map['ReferralOutOrganizationCode'] = referralOutOrganizationCode; if(subjectMatter != null) map['SubjectMatter'] = subjectMatter; if(creator != null) map['Creator'] = creator; if(referralInOrganizationCode != null) map['ReferralInOrganizationCode'] = referralInOrganizationCode; if(referralInUserCode != null) map['ReferralInUserCode'] = referralInUserCode; map['ReferralStatus'] = referralStatus.index; if(rejectReason != null) map['RejectReason'] = rejectReason; if(referralCodeList != null) map['ReferralCodeList'] = referralCodeList; if(patientInfo != null) map['PatientInfo'] = patientInfo; if(recordCodeList != null) map['RecordCodeList'] = recordCodeList; if(reportCodeList != null) map['ReportCodeList'] = reportCodeList; if(remedicalDataCodeList != null) map['RemedicalDataCodeList'] = remedicalDataCodeList; if(createReportCodeList != null) map['CreateReportCodeList'] = createReportCodeList; return map; } } class ReferralRecordDetailDTO extends ReferralRecordDTO{ String? referralOutOrganizationName; String? creatorName; String? referralInOrganizationName; String? referralInUserName; ReferralRecordDetailDTO({ this.referralOutOrganizationName, this.creatorName, this.referralInOrganizationName, this.referralInUserName, String? code, String? patientCode, DateTime? referralOutTime, String? referralOutOrganizationCode, String? subjectMatter, String? creator, String? referralInOrganizationCode, String? referralInUserCode, ReferralStatusEnum referralStatus = ReferralStatusEnum.Wait, String? rejectReason, List? referralCodeList, PatientInfoDTO? patientInfo, List? recordCodeList, List? reportCodeList, List? remedicalDataCodeList, List? createReportCodeList, DateTime? createTime, DateTime? updateTime, }) : super( code: code, patientCode: patientCode, referralOutTime: referralOutTime, referralOutOrganizationCode: referralOutOrganizationCode, subjectMatter: subjectMatter, creator: creator, referralInOrganizationCode: referralInOrganizationCode, referralInUserCode: referralInUserCode, referralStatus: referralStatus, rejectReason: rejectReason, referralCodeList: referralCodeList, patientInfo: patientInfo, recordCodeList: recordCodeList, reportCodeList: reportCodeList, remedicalDataCodeList: remedicalDataCodeList, createReportCodeList: createReportCodeList, createTime: createTime, updateTime: updateTime, ); factory ReferralRecordDetailDTO.fromJson(Map map) { return ReferralRecordDetailDTO( referralOutOrganizationName: map['ReferralOutOrganizationName'], creatorName: map['CreatorName'], referralInOrganizationName: map['ReferralInOrganizationName'], referralInUserName: map['ReferralInUserName'], code: map['Code'], patientCode: map['PatientCode'], referralOutTime: map['ReferralOutTime'] != null ? DateTime.parse(map['ReferralOutTime']) : null, referralOutOrganizationCode: map['ReferralOutOrganizationCode'], subjectMatter: map['SubjectMatter'], creator: map['Creator'], referralInOrganizationCode: map['ReferralInOrganizationCode'], referralInUserCode: map['ReferralInUserCode'], referralStatus: ReferralStatusEnum.values.firstWhere((e) => e.index == map['ReferralStatus']), rejectReason: map['RejectReason'], referralCodeList: map['ReferralCodeList'] != null ? map['ReferralCodeList'].cast().toList() : null, patientInfo: map['PatientInfo'] != null ? PatientInfoDTO.fromJson(map['PatientInfo']) : null, recordCodeList: map['RecordCodeList'] != null ? map['RecordCodeList'].cast().toList() : null, reportCodeList: map['ReportCodeList'] != null ? map['ReportCodeList'].cast().toList() : null, remedicalDataCodeList: map['RemedicalDataCodeList'] != null ? map['RemedicalDataCodeList'].cast().toList() : null, createReportCodeList: map['CreateReportCodeList'] != null ? (map['CreateReportCodeList'] as List).map((e)=>CreateReportClass.fromJson(e as Map)).toList() : null, createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null, updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null, ); } Map toJson() { final map = super.toJson(); if(referralOutOrganizationName != null) map['ReferralOutOrganizationName'] = referralOutOrganizationName; if(creatorName != null) map['CreatorName'] = creatorName; if(referralInOrganizationName != null) map['ReferralInOrganizationName'] = referralInOrganizationName; if(referralInUserName != null) map['ReferralInUserName'] = referralInUserName; return map; } } class FindPatientReferralRecordRequest extends TokenRequest{ String? patientCode; FindPatientReferralRecordRequest({ this.patientCode, String? token, }) : super( token: token, ); factory FindPatientReferralRecordRequest.fromJson(Map map) { return FindPatientReferralRecordRequest( patientCode: map['PatientCode'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(patientCode != null) map['PatientCode'] = patientCode; return map; } } class FindReferralInRecordRequest extends TokenRequest{ String? referralRecordCode; FindReferralInRecordRequest({ this.referralRecordCode, String? token, }) : super( token: token, ); factory FindReferralInRecordRequest.fromJson(Map map) { return FindReferralInRecordRequest( referralRecordCode: map['ReferralRecordCode'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(referralRecordCode != null) map['ReferralRecordCode'] = referralRecordCode; return map; } } class QueryReferralRecordsPageRequest extends GetRecordsPageRequest{ String? referralRecordCode; QueryReferralRecordsPageRequest({ this.referralRecordCode, String? patientCode, QueryRecordStatusEnum queryRecordStatus = QueryRecordStatusEnum.All, QueryRecordCreateTypeEnum queryRecordCreateType = QueryRecordCreateTypeEnum.All, int pageIndex = 0, int pageSize = 0, String? token, }) : super( patientCode: patientCode, queryRecordStatus: queryRecordStatus, queryRecordCreateType: queryRecordCreateType, pageIndex: pageIndex, pageSize: pageSize, token: token, ); factory QueryReferralRecordsPageRequest.fromJson(Map map) { return QueryReferralRecordsPageRequest( referralRecordCode: map['ReferralRecordCode'], patientCode: map['PatientCode'], queryRecordStatus: QueryRecordStatusEnum.values.firstWhere((e) => e.index == map['QueryRecordStatus']), queryRecordCreateType: QueryRecordCreateTypeEnum.values.firstWhere((e) => e.index == map['QueryRecordCreateType']), pageIndex: map['PageIndex'], pageSize: map['PageSize'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(referralRecordCode != null) map['ReferralRecordCode'] = referralRecordCode; return map; } } class ReportPreviewDTO { String? fileToken; String? thumbnailToken; String? language; UploadFileTypeEnum fileType; ReportPreviewDTO({ this.fileToken, this.thumbnailToken, this.language, this.fileType = UploadFileTypeEnum.Unknown, }); factory ReportPreviewDTO.fromJson(Map map) { return ReportPreviewDTO( fileToken: map['FileToken'], thumbnailToken: map['ThumbnailToken'], language: map['Language'], fileType: UploadFileTypeEnum.values.firstWhere((e) => e.index == map['FileType']), ); } Map toJson() { final map = Map(); if(fileToken != null) map['FileToken'] = fileToken; if(thumbnailToken != null) map['ThumbnailToken'] = thumbnailToken; if(language != null) map['Language'] = language; map['FileType'] = fileType.index; return map; } } enum ReportTypeEnum { RemoteDiagnosis, LiveConsultation, } class ReportBaseDTO extends BaseDTO{ String? reportCode; String? recordCode; String? reportUserCode; String? deviceCode; String? patientCode; String? patientId; String? patientName; List? reportLabels; List? platformLabels; List? diagnosisLabels; DiagnosisOrganEnum reportOrgan; DateTime? reportTime; String? reportUserName; List? reportPreviewList; String? referralRecordCode; ReportTypeEnum reportType; ReportBaseDTO({ this.reportCode, this.recordCode, this.reportUserCode, this.deviceCode, this.patientCode, this.patientId, this.patientName, this.reportLabels, this.platformLabels, this.diagnosisLabels, this.reportOrgan = DiagnosisOrganEnum.Null, this.reportTime, this.reportUserName, this.reportPreviewList, this.referralRecordCode, this.reportType = ReportTypeEnum.RemoteDiagnosis, DateTime? createTime, DateTime? updateTime, }) : super( createTime: createTime, updateTime: updateTime, ); factory ReportBaseDTO.fromJson(Map map) { return ReportBaseDTO( reportCode: map['ReportCode'], recordCode: map['RecordCode'], reportUserCode: map['ReportUserCode'], deviceCode: map['DeviceCode'], patientCode: map['PatientCode'], patientId: map['PatientId'], patientName: map['PatientName'], reportLabels: map['ReportLabels'] != null ? map['ReportLabels'].cast().toList() : null, platformLabels: map['PlatformLabels'] != null ? map['PlatformLabels'].cast().toList() : null, diagnosisLabels: map['DiagnosisLabels'] != null ? map['DiagnosisLabels'].cast().toList() : null, reportOrgan: DiagnosisOrganEnum.values.firstWhere((e) => e.index == map['ReportOrgan']), reportTime: map['ReportTime'] != null ? DateTime.parse(map['ReportTime']) : null, reportUserName: map['ReportUserName'], reportPreviewList: map['ReportPreviewList'] != null ? (map['ReportPreviewList'] as List).map((e)=>ReportPreviewDTO.fromJson(e as Map)).toList() : null, referralRecordCode: map['ReferralRecordCode'], reportType: ReportTypeEnum.values.firstWhere((e) => e.index == map['ReportType']), createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null, updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null, ); } Map toJson() { final map = super.toJson(); if(reportCode != null) map['ReportCode'] = reportCode; if(recordCode != null) map['RecordCode'] = recordCode; if(reportUserCode != null) map['ReportUserCode'] = reportUserCode; if(deviceCode != null) map['DeviceCode'] = deviceCode; if(patientCode != null) map['PatientCode'] = patientCode; if(patientId != null) map['PatientId'] = patientId; if(patientName != null) map['PatientName'] = patientName; if(reportLabels != null) map['ReportLabels'] = reportLabels; if(platformLabels != null) map['PlatformLabels'] = platformLabels; if(diagnosisLabels != null) map['DiagnosisLabels'] = diagnosisLabels; map['ReportOrgan'] = reportOrgan.index; if(reportTime != null) map['ReportTime'] = JsonRpcUtils.dateFormat(reportTime!); if(reportUserName != null) map['ReportUserName'] = reportUserName; if(reportPreviewList != null) map['ReportPreviewList'] = reportPreviewList; if(referralRecordCode != null) map['ReferralRecordCode'] = referralRecordCode; map['ReportType'] = reportType.index; return map; } } class ReportDTO extends ReportBaseDTO{ String? reportTemplateJson; String? reportDatasJson; String? encryptPatientName; bool canEditReport; String? deviceName; String? reportTemplateName; DateTime? examDate; ReportDTO({ this.reportTemplateJson, this.reportDatasJson, this.encryptPatientName, this.canEditReport = false, this.deviceName, this.reportTemplateName, this.examDate, String? reportCode, String? recordCode, String? reportUserCode, String? deviceCode, String? patientCode, String? patientId, String? patientName, List? reportLabels, List? platformLabels, List? diagnosisLabels, DiagnosisOrganEnum reportOrgan = DiagnosisOrganEnum.Null, DateTime? reportTime, String? reportUserName, List? reportPreviewList, String? referralRecordCode, ReportTypeEnum reportType = ReportTypeEnum.RemoteDiagnosis, DateTime? createTime, DateTime? updateTime, }) : super( reportCode: reportCode, recordCode: recordCode, reportUserCode: reportUserCode, deviceCode: deviceCode, patientCode: patientCode, patientId: patientId, patientName: patientName, reportLabels: reportLabels, platformLabels: platformLabels, diagnosisLabels: diagnosisLabels, reportOrgan: reportOrgan, reportTime: reportTime, reportUserName: reportUserName, reportPreviewList: reportPreviewList, referralRecordCode: referralRecordCode, reportType: reportType, createTime: createTime, updateTime: updateTime, ); factory ReportDTO.fromJson(Map map) { return ReportDTO( reportTemplateJson: map['ReportTemplateJson'], reportDatasJson: map['ReportDatasJson'], encryptPatientName: map['EncryptPatientName'], canEditReport: map['CanEditReport'], deviceName: map['DeviceName'], reportTemplateName: map['ReportTemplateName'], examDate: map['ExamDate'] != null ? DateTime.parse(map['ExamDate']) : null, reportCode: map['ReportCode'], recordCode: map['RecordCode'], reportUserCode: map['ReportUserCode'], deviceCode: map['DeviceCode'], patientCode: map['PatientCode'], patientId: map['PatientId'], patientName: map['PatientName'], reportLabels: map['ReportLabels'] != null ? map['ReportLabels'].cast().toList() : null, platformLabels: map['PlatformLabels'] != null ? map['PlatformLabels'].cast().toList() : null, diagnosisLabels: map['DiagnosisLabels'] != null ? map['DiagnosisLabels'].cast().toList() : null, reportOrgan: DiagnosisOrganEnum.values.firstWhere((e) => e.index == map['ReportOrgan']), reportTime: map['ReportTime'] != null ? DateTime.parse(map['ReportTime']) : null, reportUserName: map['ReportUserName'], reportPreviewList: map['ReportPreviewList'] != null ? (map['ReportPreviewList'] as List).map((e)=>ReportPreviewDTO.fromJson(e as Map)).toList() : null, referralRecordCode: map['ReferralRecordCode'], reportType: ReportTypeEnum.values.firstWhere((e) => e.index == map['ReportType']), createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null, updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null, ); } Map toJson() { final map = super.toJson(); if(reportTemplateJson != null) map['ReportTemplateJson'] = reportTemplateJson; if(reportDatasJson != null) map['ReportDatasJson'] = reportDatasJson; if(encryptPatientName != null) map['EncryptPatientName'] = encryptPatientName; map['CanEditReport'] = canEditReport; if(deviceName != null) map['DeviceName'] = deviceName; if(reportTemplateName != null) map['ReportTemplateName'] = reportTemplateName; if(examDate != null) map['ExamDate'] = JsonRpcUtils.dateFormat(examDate!); return map; } } class FindReportsRequest extends TokenRequest{ String? recordCode; FindReportsRequest({ this.recordCode, String? token, }) : super( token: token, ); factory FindReportsRequest.fromJson(Map map) { return FindReportsRequest( recordCode: map['RecordCode'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(recordCode != null) map['RecordCode'] = recordCode; return map; } } class QueryReferralExamReportRequest extends FindReportsRequest{ String? referralRecordCode; QueryReferralExamReportRequest({ this.referralRecordCode, String? recordCode, String? token, }) : super( recordCode: recordCode, token: token, ); factory QueryReferralExamReportRequest.fromJson(Map map) { return QueryReferralExamReportRequest( referralRecordCode: map['ReferralRecordCode'], recordCode: map['RecordCode'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(referralRecordCode != null) map['ReferralRecordCode'] = referralRecordCode; return map; } } class QueryShareExamPageResult { String? shareExamPageUrl; QueryShareExamPageResult({ this.shareExamPageUrl, }); factory QueryShareExamPageResult.fromJson(Map map) { return QueryShareExamPageResult( shareExamPageUrl: map['ShareExamPageUrl'], ); } Map toJson() { final map = Map(); if(shareExamPageUrl != null) map['ShareExamPageUrl'] = shareExamPageUrl; return map; } } class QueryShareExamPageRequest extends TokenRequest{ String? examFileToken; String? languageCode; QueryShareExamPageRequest({ this.examFileToken, this.languageCode, String? token, }) : super( token: token, ); factory QueryShareExamPageRequest.fromJson(Map map) { return QueryShareExamPageRequest( examFileToken: map['ExamFileToken'], languageCode: map['LanguageCode'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(examFileToken != null) map['ExamFileToken'] = examFileToken; if(languageCode != null) map['LanguageCode'] = languageCode; return map; } } class MeasureExportDetailDTO { int sortNum; String? remedicalMeasuredInfoCode; MeasureExportDetailDTO({ this.sortNum = 0, this.remedicalMeasuredInfoCode, }); factory MeasureExportDetailDTO.fromJson(Map map) { return MeasureExportDetailDTO( sortNum: map['SortNum'], remedicalMeasuredInfoCode: map['RemedicalMeasuredInfoCode'], ); } Map toJson() { final map = Map(); map['SortNum'] = sortNum; if(remedicalMeasuredInfoCode != null) map['RemedicalMeasuredInfoCode'] = remedicalMeasuredInfoCode; return map; } } class BatchExportMeasureResultRequest extends TokenRequest{ List? remedicalMeasuredInfoCodes; BusinessTypeEnum businessType; String? recordCode; String? languageCode; BatchExportMeasureResultRequest({ this.remedicalMeasuredInfoCodes, this.businessType = BusinessTypeEnum.RemoteDiagnosis, this.recordCode, this.languageCode, String? token, }) : super( token: token, ); factory BatchExportMeasureResultRequest.fromJson(Map map) { return BatchExportMeasureResultRequest( remedicalMeasuredInfoCodes: map['RemedicalMeasuredInfoCodes'] != null ? (map['RemedicalMeasuredInfoCodes'] as List).map((e)=>MeasureExportDetailDTO.fromJson(e as Map)).toList() : null, businessType: BusinessTypeEnum.values.firstWhere((e) => e.index == map['BusinessType']), recordCode: map['RecordCode'], languageCode: map['LanguageCode'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(remedicalMeasuredInfoCodes != null) map['RemedicalMeasuredInfoCodes'] = remedicalMeasuredInfoCodes; map['BusinessType'] = businessType.index; if(recordCode != null) map['RecordCode'] = recordCode; if(languageCode != null) map['LanguageCode'] = languageCode; return map; } } class GetRemedicalDiagnosisDataRequest extends TokenRequest{ String? remedicalCode; int frameIndex; GetRemedicalDiagnosisDataRequest({ this.remedicalCode, this.frameIndex = 0, String? token, }) : super( token: token, ); factory GetRemedicalDiagnosisDataRequest.fromJson(Map map) { return GetRemedicalDiagnosisDataRequest( remedicalCode: map['RemedicalCode'], frameIndex: map['FrameIndex'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(remedicalCode != null) map['RemedicalCode'] = remedicalCode; map['FrameIndex'] = frameIndex; return map; } } class RemedicalAISelectedInfoDTO { String? remedicalAISelectedInfoCode; String? patientCode; String? recordCode; String? remedicalCode; int frameIndex; String? userCode; String? orginalFileToken; String? cdnFileToken; String? aIFileToken; String? aICdnFileToken; RecommendedDownloadModeEnum recommendedDownloadMode; String? previewFileToken; String? diagnosisData; DiagnosisConclusionEnum diagnosisConclusion; List? diagnosisOrgans; RemedicalAISelectedInfoDTO({ this.remedicalAISelectedInfoCode, this.patientCode, this.recordCode, this.remedicalCode, this.frameIndex = 0, this.userCode, this.orginalFileToken, this.cdnFileToken, this.aIFileToken, this.aICdnFileToken, this.recommendedDownloadMode = RecommendedDownloadModeEnum.Origin, this.previewFileToken, this.diagnosisData, this.diagnosisConclusion = DiagnosisConclusionEnum.NotRequired, this.diagnosisOrgans, }); factory RemedicalAISelectedInfoDTO.fromJson(Map map) { return RemedicalAISelectedInfoDTO( remedicalAISelectedInfoCode: map['RemedicalAISelectedInfoCode'], patientCode: map['PatientCode'], recordCode: map['RecordCode'], remedicalCode: map['RemedicalCode'], frameIndex: map['FrameIndex'], userCode: map['UserCode'], orginalFileToken: map['OrginalFileToken'], cdnFileToken: map['CdnFileToken'], aIFileToken: map['AIFileToken'], aICdnFileToken: map['AICdnFileToken'], recommendedDownloadMode: RecommendedDownloadModeEnum.values.firstWhere((e) => e.index == map['RecommendedDownloadMode']), previewFileToken: map['PreviewFileToken'], diagnosisData: map['DiagnosisData'], diagnosisConclusion: DiagnosisConclusionEnum.values.firstWhere((e) => e.index == map['DiagnosisConclusion']), diagnosisOrgans: map['DiagnosisOrgans'] != null ? (map['DiagnosisOrgans'] as List).map((e)=>DiagnosisOrganEnum.values.firstWhere((i) => i.index == e)).toList() : null, ); } Map toJson() { final map = Map(); if(remedicalAISelectedInfoCode != null) map['RemedicalAISelectedInfoCode'] = remedicalAISelectedInfoCode; if(patientCode != null) map['PatientCode'] = patientCode; if(recordCode != null) map['RecordCode'] = recordCode; if(remedicalCode != null) map['RemedicalCode'] = remedicalCode; map['FrameIndex'] = frameIndex; if(userCode != null) map['UserCode'] = userCode; if(orginalFileToken != null) map['OrginalFileToken'] = orginalFileToken; if(cdnFileToken != null) map['CdnFileToken'] = cdnFileToken; if(aIFileToken != null) map['AIFileToken'] = aIFileToken; if(aICdnFileToken != null) map['AICdnFileToken'] = aICdnFileToken; map['RecommendedDownloadMode'] = recommendedDownloadMode.index; if(previewFileToken != null) map['PreviewFileToken'] = previewFileToken; if(diagnosisData != null) map['DiagnosisData'] = diagnosisData; map['DiagnosisConclusion'] = diagnosisConclusion.index; if(diagnosisOrgans != null) map['DiagnosisOrgans'] = diagnosisOrgans; return map; } } class GetPatientAISelectedInfosRequest extends TokenRequest{ String? patientCode; String? recordCode; GetPatientAISelectedInfosRequest({ this.patientCode, this.recordCode, String? token, }) : super( token: token, ); factory GetPatientAISelectedInfosRequest.fromJson(Map map) { return GetPatientAISelectedInfosRequest( patientCode: map['PatientCode'], recordCode: map['RecordCode'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(patientCode != null) map['PatientCode'] = patientCode; if(recordCode != null) map['RecordCode'] = recordCode; return map; } } class GetRemedicalAISelectedInfoRequest extends TokenRequest{ String? code; GetRemedicalAISelectedInfoRequest({ this.code, String? token, }) : super( token: token, ); factory GetRemedicalAISelectedInfoRequest.fromJson(Map map) { return GetRemedicalAISelectedInfoRequest( code: map['Code'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(code != null) map['Code'] = code; return map; } } class SaveRemedicalAISelectedInfoRequest extends TokenRequest{ String? code; String? remedicalCode; int frameIndex; String? aIFileToken; String? previewFileToken; String? diagnosisData; DiagnosisConclusionEnum diagnosisConclusion; List? diagnosisOrgans; SaveRemedicalAISelectedInfoRequest({ this.code, this.remedicalCode, this.frameIndex = 0, this.aIFileToken, this.previewFileToken, this.diagnosisData, this.diagnosisConclusion = DiagnosisConclusionEnum.NotRequired, this.diagnosisOrgans, String? token, }) : super( token: token, ); factory SaveRemedicalAISelectedInfoRequest.fromJson(Map map) { return SaveRemedicalAISelectedInfoRequest( code: map['Code'], remedicalCode: map['RemedicalCode'], frameIndex: map['FrameIndex'], aIFileToken: map['AIFileToken'], previewFileToken: map['PreviewFileToken'], diagnosisData: map['DiagnosisData'], diagnosisConclusion: DiagnosisConclusionEnum.values.firstWhere((e) => e.index == map['DiagnosisConclusion']), diagnosisOrgans: map['DiagnosisOrgans'] != null ? (map['DiagnosisOrgans'] as List).map((e)=>DiagnosisOrganEnum.values.firstWhere((i) => i.index == e)).toList() : null, token: map['Token'], ); } Map toJson() { final map = super.toJson(); if(code != null) map['Code'] = code; if(remedicalCode != null) map['RemedicalCode'] = remedicalCode; map['FrameIndex'] = frameIndex; if(aIFileToken != null) map['AIFileToken'] = aIFileToken; if(previewFileToken != null) map['PreviewFileToken'] = previewFileToken; if(diagnosisData != null) map['DiagnosisData'] = diagnosisData; map['DiagnosisConclusion'] = diagnosisConclusion.index; if(diagnosisOrgans != null) map['DiagnosisOrgans'] = diagnosisOrgans; return map; } } class SyncRemedicalRecordRequest { String? code; String? organizationCode; String? deviceCode; bool isUploadReport; List? patientInfo; DiagnosisStatusEnum diagnosisStatus; List? aIDiagnosisInfos; DateTime? createTime; DateTime? updateTime; String? creator; SyncRemedicalRecordRequest({ this.code, this.organizationCode, this.deviceCode, this.isUploadReport = false, this.patientInfo, this.diagnosisStatus = DiagnosisStatusEnum.NotRequired, this.aIDiagnosisInfos, this.createTime, this.updateTime, this.creator, }); factory SyncRemedicalRecordRequest.fromJson(Map map) { return SyncRemedicalRecordRequest( code: map['Code'], organizationCode: map['OrganizationCode'], deviceCode: map['DeviceCode'], isUploadReport: map['IsUploadReport'], patientInfo: map['PatientInfo'] != null ? (map['PatientInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map)).toList() : null, diagnosisStatus: DiagnosisStatusEnum.values.firstWhere((e) => e.index == map['DiagnosisStatus']), aIDiagnosisInfos: map['AIDiagnosisInfos'] != null ? (map['AIDiagnosisInfos'] as List).map((e)=>DiagnosisInfoDTO.fromJson(e as Map)).toList() : null, createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null, updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null, creator: map['Creator'], ); } Map toJson() { final map = Map(); if(code != null) map['Code'] = code; if(organizationCode != null) map['OrganizationCode'] = organizationCode; if(deviceCode != null) map['DeviceCode'] = deviceCode; map['IsUploadReport'] = isUploadReport; if(patientInfo != null) map['PatientInfo'] = patientInfo; map['DiagnosisStatus'] = diagnosisStatus.index; if(aIDiagnosisInfos != null) map['AIDiagnosisInfos'] = aIDiagnosisInfos; if(createTime != null) map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!); if(updateTime != null) map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!); if(creator != null) map['Creator'] = creator; return map; } } class SyncBatchRemedicalRecordRequest { SyncDBEnum syncType; List? remedicalRecordList; SyncBatchRemedicalRecordRequest({ this.syncType = SyncDBEnum.Migrate, this.remedicalRecordList, }); factory SyncBatchRemedicalRecordRequest.fromJson(Map map) { return SyncBatchRemedicalRecordRequest( syncType: SyncDBEnum.values.firstWhere((e) => e.index == map['SyncType']), remedicalRecordList: map['RemedicalRecordList'] != null ? (map['RemedicalRecordList'] as List).map((e)=>SyncRemedicalRecordRequest.fromJson(e as Map)).toList() : null, ); } Map toJson() { final map = Map(); map['SyncType'] = syncType.index; if(remedicalRecordList != null) map['RemedicalRecordList'] = remedicalRecordList; return map; } } class SyncUploadRemedicalDataRequest { String? code; DateTime? createTime; DateTime? updateTime; String? examCode; String? deviceCode; String? previewFileToken; String? fileToken; int fileSize; String? coverImageToken; String? applicationCategory; String? application; RemedicalFileDataTypeEnum fileDataType; ImageLocationDTO? imageLocation; SyncUploadRemedicalDataRequest({ this.code, this.createTime, this.updateTime, this.examCode, this.deviceCode, this.previewFileToken, this.fileToken, this.fileSize = 0, this.coverImageToken, this.applicationCategory, this.application, this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle, this.imageLocation, }); factory SyncUploadRemedicalDataRequest.fromJson(Map map) { return SyncUploadRemedicalDataRequest( code: map['Code'], createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null, updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null, examCode: map['ExamCode'], deviceCode: map['DeviceCode'], previewFileToken: map['PreviewFileToken'], fileToken: map['FileToken'], fileSize: map['FileSize'], coverImageToken: map['CoverImageToken'], applicationCategory: map['ApplicationCategory'], application: map['Application'], fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']), imageLocation: map['ImageLocation'] != null ? ImageLocationDTO.fromJson(map['ImageLocation']) : null, ); } Map toJson() { final map = Map(); if(code != null) map['Code'] = code; if(createTime != null) map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!); if(updateTime != null) map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!); if(examCode != null) map['ExamCode'] = examCode; if(deviceCode != null) map['DeviceCode'] = deviceCode; if(previewFileToken != null) map['PreviewFileToken'] = previewFileToken; if(fileToken != null) map['FileToken'] = fileToken; map['FileSize'] = fileSize; if(coverImageToken != null) map['CoverImageToken'] = coverImageToken; if(applicationCategory != null) map['ApplicationCategory'] = applicationCategory; if(application != null) map['Application'] = application; map['FileDataType'] = fileDataType.index; if(imageLocation != null) map['ImageLocation'] = imageLocation; return map; } } class SyncBatchUploadRemedicalDatasRequest { SyncDBEnum syncType; List? syncUploadRemedicalDataList; SyncBatchUploadRemedicalDatasRequest({ this.syncType = SyncDBEnum.Migrate, this.syncUploadRemedicalDataList, }); factory SyncBatchUploadRemedicalDatasRequest.fromJson(Map map) { return SyncBatchUploadRemedicalDatasRequest( syncType: SyncDBEnum.values.firstWhere((e) => e.index == map['SyncType']), syncUploadRemedicalDataList: map['SyncUploadRemedicalDataList'] != null ? (map['SyncUploadRemedicalDataList'] as List).map((e)=>SyncUploadRemedicalDataRequest.fromJson(e as Map)).toList() : null, ); } Map toJson() { final map = Map(); map['SyncType'] = syncType.index; if(syncUploadRemedicalDataList != null) map['SyncUploadRemedicalDataList'] = syncUploadRemedicalDataList; return map; } } class SyncAIResultRequest { String? remedicalCode; String? diagnosisResult; DateTime? createTime; DateTime? updateTime; SyncAIResultRequest({ this.remedicalCode, this.diagnosisResult, this.createTime, this.updateTime, }); factory SyncAIResultRequest.fromJson(Map map) { return SyncAIResultRequest( remedicalCode: map['RemedicalCode'], diagnosisResult: map['DiagnosisResult'], createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null, updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null, ); } Map toJson() { final map = Map(); if(remedicalCode != null) map['RemedicalCode'] = remedicalCode; if(diagnosisResult != null) map['DiagnosisResult'] = diagnosisResult; if(createTime != null) map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!); if(updateTime != null) map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!); return map; } } class SyncBatchAIResultRequest { SyncDBEnum syncType; List? syncAIResultList; SyncBatchAIResultRequest({ this.syncType = SyncDBEnum.Migrate, this.syncAIResultList, }); factory SyncBatchAIResultRequest.fromJson(Map map) { return SyncBatchAIResultRequest( syncType: SyncDBEnum.values.firstWhere((e) => e.index == map['SyncType']), syncAIResultList: map['SyncAIResultList'] != null ? (map['SyncAIResultList'] as List).map((e)=>SyncAIResultRequest.fromJson(e as Map)).toList() : null, ); } Map toJson() { final map = Map(); map['SyncType'] = syncType.index; if(syncAIResultList != null) map['SyncAIResultList'] = syncAIResultList; return map; } } class SyncBatchCarotidResultRequest { SyncDBEnum syncType; List? syncCarotidResultRequest; SyncBatchCarotidResultRequest({ this.syncType = SyncDBEnum.Migrate, this.syncCarotidResultRequest, }); factory SyncBatchCarotidResultRequest.fromJson(Map map) { return SyncBatchCarotidResultRequest( syncType: SyncDBEnum.values.firstWhere((e) => e.index == map['SyncType']), syncCarotidResultRequest: map['SyncCarotidResultRequest'] != null ? (map['SyncCarotidResultRequest'] as List).map((e)=>GetCarotidResultRequest.fromJson(e as Map)).toList() : null, ); } Map toJson() { final map = Map(); map['SyncType'] = syncType.index; if(syncCarotidResultRequest != null) map['SyncCarotidResultRequest'] = syncCarotidResultRequest; return map; } }