import 'liveConsultation.m.dart'; import 'notification.m.dart'; import 'package:fis_jsonrpc/utils.dart'; class AppletAPIBaseRequest { String? openId; AppletAPIBaseRequest({ this.openId, }); factory AppletAPIBaseRequest.fromJson(Map map) { return AppletAPIBaseRequest( openId: map['OpenId'], ); } Map toJson() { final map = Map(); if (openId != null) { map['OpenId'] = openId; } return map; } } class LiveMemberLeaveRequest extends AppletAPIBaseRequest{ String? consultationId; LiveMemberLeaveRequest({ this.consultationId, String? openId, }) : super( openId: openId, ); factory LiveMemberLeaveRequest.fromJson(Map map) { return LiveMemberLeaveRequest( consultationId: map['ConsultationId'], openId: map['OpenId'], ); } Map toJson() { final map = super.toJson(); if (consultationId != null) map['ConsultationId'] = consultationId; return map; } } class LiveMemberRejectRequest extends AppletAPIBaseRequest{ String? consultationId; String? userId; LiveMemberRejectRequest({ this.consultationId, this.userId, String? openId, }) : super( openId: openId, ); factory LiveMemberRejectRequest.fromJson(Map map) { return LiveMemberRejectRequest( consultationId: map['ConsultationId'], userId: map['UserId'], openId: map['OpenId'], ); } Map toJson() { final map = super.toJson(); if (consultationId != null) map['ConsultationId'] = consultationId; if (userId != null) map['UserId'] = userId; return map; } } class LiveMemberAcceptRequest extends AppletAPIBaseRequest{ String? consultationId; String? userId; LiveMemberAcceptRequest({ this.consultationId, this.userId, String? openId, }) : super( openId: openId, ); factory LiveMemberAcceptRequest.fromJson(Map map) { return LiveMemberAcceptRequest( consultationId: map['ConsultationId'], userId: map['UserId'], openId: map['OpenId'], ); } Map toJson() { final map = super.toJson(); if (consultationId != null) map['ConsultationId'] = consultationId; if (userId != null) map['UserId'] = userId; return map; } } class LiveMemberTimeoutRequest extends AppletAPIBaseRequest{ String? consultationId; String? userId; LiveMemberTimeoutRequest({ this.consultationId, this.userId, String? openId, }) : super( openId: openId, ); factory LiveMemberTimeoutRequest.fromJson(Map map) { return LiveMemberTimeoutRequest( consultationId: map['ConsultationId'], userId: map['UserId'], openId: map['OpenId'], ); } Map toJson() { final map = super.toJson(); if (consultationId != null) map['ConsultationId'] = consultationId; if (userId != null) map['UserId'] = userId; return map; } } class GetUserInfoByOpenIdResult { String? nickName; String? hospital; String? userId; GetUserInfoByOpenIdResult({ this.nickName, this.hospital, this.userId, }); factory GetUserInfoByOpenIdResult.fromJson(Map map) { return GetUserInfoByOpenIdResult( nickName: map['NickName'], hospital: map['Hospital'], userId: map['UserId'], ); } Map toJson() { final map = Map(); if (nickName != null) { map['NickName'] = nickName; } if (hospital != null) { map['Hospital'] = hospital; } if (userId != null) { map['UserId'] = userId; } return map; } } class GetUserInfoByOpenIdRequest extends AppletAPIBaseRequest{ GetUserInfoByOpenIdRequest({ String? openId, }) : super( openId: openId, ); factory GetUserInfoByOpenIdRequest.fromJson(Map map) { return GetUserInfoByOpenIdRequest( openId: map['OpenId'], ); } Map toJson() { final map = super.toJson(); return map; } } class BindVcloudAccountAndOpenIdRequest { String? account; String? password; String? openId; BindVcloudAccountAndOpenIdRequest({ this.account, this.password, this.openId, }); factory BindVcloudAccountAndOpenIdRequest.fromJson(Map map) { return BindVcloudAccountAndOpenIdRequest( account: map['Account'], password: map['Password'], openId: map['OpenId'], ); } Map toJson() { final map = Map(); if (account != null) { map['Account'] = account; } if (password != null) { map['Password'] = password; } if (openId != null) { map['OpenId'] = openId; } return map; } } enum PatientGenderEnum { NotFilled, Male, Female, } enum RemedicalAIDiagnosisStatusEnum { Null, NoObviousLesion, Benign, Malignant, BenignAndMalignant, } class RemedicalRecordInfo { String? remedicalRecordId; String? terminalDesc; String? organizationDesc; DateTime? createTime; String? patientId; String? patientName; PatientGenderEnum patientGender; String? patientAge; String? examDoctor; String? customDoctor; bool reportUploadStatus; RemedicalAIDiagnosisStatusEnum aIDiagnosisStatus; RemedicalRecordInfo({ this.remedicalRecordId, this.terminalDesc, this.organizationDesc, this.createTime, this.patientId, this.patientName, this.patientGender = PatientGenderEnum.NotFilled, this.patientAge, this.examDoctor, this.customDoctor, this.reportUploadStatus = false, this.aIDiagnosisStatus = RemedicalAIDiagnosisStatusEnum.Null, }); factory RemedicalRecordInfo.fromJson(Map map) { return RemedicalRecordInfo( remedicalRecordId: map['RemedicalRecordId'], terminalDesc: map['TerminalDesc'], organizationDesc: map['OrganizationDesc'], createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null, patientId: map['PatientId'], patientName: map['PatientName'], patientGender: PatientGenderEnum.values.firstWhere((e) => e.index == map['PatientGender']), patientAge: map['PatientAge'], examDoctor: map['ExamDoctor'], customDoctor: map['CustomDoctor'], reportUploadStatus: map['ReportUploadStatus'], aIDiagnosisStatus: RemedicalAIDiagnosisStatusEnum.values.firstWhere((e) => e.index == map['AIDiagnosisStatus']), ); } Map toJson() { final map = Map(); if (remedicalRecordId != null) { map['RemedicalRecordId'] = remedicalRecordId; } if (terminalDesc != null) { map['TerminalDesc'] = terminalDesc; } if (organizationDesc != null) { map['OrganizationDesc'] = organizationDesc; } if (createTime != null) { map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!); } if (patientId != null) { map['PatientId'] = patientId; } if (patientName != null) { map['PatientName'] = patientName; } map['PatientGender'] = patientGender.index; if (patientAge != null) { map['PatientAge'] = patientAge; } if (examDoctor != null) { map['ExamDoctor'] = examDoctor; } if (customDoctor != null) { map['CustomDoctor'] = customDoctor; } map['ReportUploadStatus'] = reportUploadStatus; map['AIDiagnosisStatus'] = aIDiagnosisStatus.index; return map; } } class AppletAPIPageRequest extends AppletAPIBaseRequest{ int pageIndex; int pageSize; AppletAPIPageRequest({ this.pageIndex = 0, this.pageSize = 0, String? openId, }) : super( openId: openId, ); factory AppletAPIPageRequest.fromJson(Map map) { return AppletAPIPageRequest( pageIndex: map['PageIndex'], pageSize: map['PageSize'], openId: map['OpenId'], ); } Map toJson() { final map = super.toJson(); map['PageIndex'] = pageIndex; map['PageSize'] = pageSize; return map; } } class GetRemedicalRecordListRequest extends AppletAPIPageRequest{ String? keyWord; DateTime? startTime; DateTime? endTime; GetRemedicalRecordListRequest({ this.keyWord, this.startTime, this.endTime, int pageIndex = 0, int pageSize = 0, String? openId, }) : super( pageIndex: pageIndex, pageSize: pageSize, openId: openId, ); factory GetRemedicalRecordListRequest.fromJson(Map map) { return GetRemedicalRecordListRequest( keyWord: map['KeyWord'], startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null, endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null, pageIndex: map['PageIndex'], pageSize: map['PageSize'], openId: map['OpenId'], ); } 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!); return map; } } class ImageFile { String? id; String? fileUrl; DateTime? createTime; ImageFile({ this.id, this.fileUrl, this.createTime, }); factory ImageFile.fromJson(Map map) { return ImageFile( id: map['Id'], fileUrl: map['FileUrl'], createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null, ); } Map toJson() { final map = Map(); if (id != null) { map['Id'] = id; } if (fileUrl != null) { map['FileUrl'] = fileUrl; } if (createTime != null) { map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!); } return map; } } class ImageData { String? id; RemedicalFileDataTypeEnum dataType; String? application; String? previewFileToken; DateTime? createTime; ImageFile? file; ImageData({ this.id, this.dataType = RemedicalFileDataTypeEnum.VinnoVidSingle, this.application, this.previewFileToken, this.createTime, this.file, }); factory ImageData.fromJson(Map map) { return ImageData( id: map['Id'], dataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['DataType']), application: map['Application'], previewFileToken: map['PreviewFileToken'], createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null, file: map['File'] != null ? ImageFile.fromJson(map['File']) : null, ); } Map toJson() { final map = Map(); if (id != null) { map['Id'] = id; } map['DataType'] = dataType.index; if (application != null) { map['Application'] = application; } if (previewFileToken != null) { map['PreviewFileToken'] = previewFileToken; } if (createTime != null) { map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!); } if (file != null) { map['File'] = file; } return map; } } class GetRemedicalDataListRequest extends AppletAPIBaseRequest{ String? remedicalRecordId; GetRemedicalDataListRequest({ this.remedicalRecordId, String? openId, }) : super( openId: openId, ); factory GetRemedicalDataListRequest.fromJson(Map map) { return GetRemedicalDataListRequest( remedicalRecordId: map['RemedicalRecordId'], openId: map['OpenId'], ); } Map toJson() { final map = super.toJson(); if (remedicalRecordId != null) map['RemedicalRecordId'] = remedicalRecordId; return map; } } enum AppletAPIImageType { placeHolder_0, Local, Ob, WorkSheet, Remote, DigitalSignature, AIDiagnosis, } class ReportImageInfo { String? examDataId; String? fileUrl; AppletAPIImageType type; ReportImageInfo({ this.examDataId, this.fileUrl, this.type = AppletAPIImageType.Local, }); factory ReportImageInfo.fromJson(Map map) { return ReportImageInfo( examDataId: map['ExamDataId'], fileUrl: map['FileUrl'], type: AppletAPIImageType.values.firstWhere((e) => e.index == map['Type']), ); } Map toJson() { final map = Map(); if (examDataId != null) { map['ExamDataId'] = examDataId; } if (fileUrl != null) { map['FileUrl'] = fileUrl; } map['Type'] = type.index; return map; } } class ReportInfo { String? id; List? previewImages; String? reportPreviewJpg; ReportInfo({ this.id, this.previewImages, this.reportPreviewJpg, }); factory ReportInfo.fromJson(Map map) { return ReportInfo( id: map['Id'], previewImages: map['PreviewImages'] != null ? (map['PreviewImages'] as List).map((e)=>ReportImageInfo.fromJson(e as Map)).toList() : null, reportPreviewJpg: map['ReportPreviewJpg'], ); } Map toJson() { final map = Map(); if (id != null) { map['Id'] = id; } if (previewImages != null) { map['PreviewImages'] = previewImages; } if (reportPreviewJpg != null) { map['ReportPreviewJpg'] = reportPreviewJpg; } return map; } } class GetRemedicalReportListRequest extends AppletAPIBaseRequest{ String? remedicalRecordId; GetRemedicalReportListRequest({ this.remedicalRecordId, String? openId, }) : super( openId: openId, ); factory GetRemedicalReportListRequest.fromJson(Map map) { return GetRemedicalReportListRequest( remedicalRecordId: map['RemedicalRecordId'], openId: map['OpenId'], ); } Map toJson() { final map = super.toJson(); if (remedicalRecordId != null) map['RemedicalRecordId'] = remedicalRecordId; return map; } } enum ConsultationState { Unhandled, Withdrawn, Handled, Started, WaitForReportUpload, ReportUploading, ReportUploaded, ReportUploadFailed, Expired, Qualified, UnQualified, } class ImageTokenInfo { String? imageToken; String? previewToken; ImageTokenInfo({ this.imageToken, this.previewToken, }); factory ImageTokenInfo.fromJson(Map map) { return ImageTokenInfo( imageToken: map['ImageToken'], previewToken: map['PreviewToken'], ); } Map toJson() { final map = Map(); if (imageToken != null) { map['ImageToken'] = imageToken; } if (previewToken != null) { map['PreviewToken'] = previewToken; } return map; } } class VideoTokenInfo { String? videoToken; String? previewToken; VideoTokenInfo({ this.videoToken, this.previewToken, }); factory VideoTokenInfo.fromJson(Map map) { return VideoTokenInfo( videoToken: map['VideoToken'], previewToken: map['PreviewToken'], ); } Map toJson() { final map = Map(); if (videoToken != null) { map['VideoToken'] = videoToken; } if (previewToken != null) { map['PreviewToken'] = previewToken; } return map; } } class ReportPreviewPdf { String? reportId; DateTime? updateTime; String? previewPdfUrl; ReportPreviewPdf({ this.reportId, this.updateTime, this.previewPdfUrl, }); factory ReportPreviewPdf.fromJson(Map map) { return ReportPreviewPdf( reportId: map['ReportId'], updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null, previewPdfUrl: map['PreviewPdfUrl'], ); } Map toJson() { final map = Map(); if (reportId != null) { map['ReportId'] = reportId; } if (updateTime != null) { map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!); } if (previewPdfUrl != null) { map['PreviewPdfUrl'] = previewPdfUrl; } return map; } } class ConsultationInfo { String? consultationId; ConsultationState state; String? patientName; PatientGenderEnum patientSex; String? patientAge; DateTime? birthday; String? contactInfo; String? patientID; String? history; String? primaryDiagnosis; String? hospitalId; String? hospitalName; String? applyHospitalId; String? applyHospitalName; String? expertId; String? expertName; DateTime? consultationDate; String? inspectionItems; String? scanDoctorName; String? deviceModel; String? terminalId; List? imageTokens; List? videoInfos; List? reportPreviewPdfs; ConsultationInfo({ this.consultationId, this.state = ConsultationState.Unhandled, this.patientName, this.patientSex = PatientGenderEnum.NotFilled, this.patientAge, this.birthday, this.contactInfo, this.patientID, this.history, this.primaryDiagnosis, this.hospitalId, this.hospitalName, this.applyHospitalId, this.applyHospitalName, this.expertId, this.expertName, this.consultationDate, this.inspectionItems, this.scanDoctorName, this.deviceModel, this.terminalId, this.imageTokens, this.videoInfos, this.reportPreviewPdfs, }); factory ConsultationInfo.fromJson(Map map) { return ConsultationInfo( consultationId: map['ConsultationId'], state: ConsultationState.values.firstWhere((e) => e.index == map['State']), patientName: map['PatientName'], patientSex: PatientGenderEnum.values.firstWhere((e) => e.index == map['PatientSex']), patientAge: map['PatientAge'], birthday: map['Birthday'] != null ? DateTime.parse(map['Birthday']) : null, contactInfo: map['ContactInfo'], patientID: map['PatientID'], history: map['History'], primaryDiagnosis: map['PrimaryDiagnosis'], hospitalId: map['HospitalId'], hospitalName: map['HospitalName'], applyHospitalId: map['ApplyHospitalId'], applyHospitalName: map['ApplyHospitalName'], expertId: map['ExpertId'], expertName: map['ExpertName'], consultationDate: map['ConsultationDate'] != null ? DateTime.parse(map['ConsultationDate']) : null, inspectionItems: map['InspectionItems'], scanDoctorName: map['ScanDoctorName'], deviceModel: map['DeviceModel'], terminalId: map['TerminalId'], imageTokens: map['ImageTokens'] != null ? (map['ImageTokens'] as List).map((e)=>ImageTokenInfo.fromJson(e as Map)).toList() : null, videoInfos: map['VideoInfos'] != null ? (map['VideoInfos'] as List).map((e)=>VideoTokenInfo.fromJson(e as Map)).toList() : null, reportPreviewPdfs: map['ReportPreviewPdfs'] != null ? (map['ReportPreviewPdfs'] as List).map((e)=>ReportPreviewPdf.fromJson(e as Map)).toList() : null, ); } Map toJson() { final map = Map(); if (consultationId != null) { map['ConsultationId'] = consultationId; } map['State'] = state.index; if (patientName != null) { map['PatientName'] = patientName; } map['PatientSex'] = patientSex.index; if (patientAge != null) { map['PatientAge'] = patientAge; } if (birthday != null) { map['Birthday'] = JsonRpcUtils.dateFormat(birthday!); } if (contactInfo != null) { map['ContactInfo'] = contactInfo; } if (patientID != null) { map['PatientID'] = patientID; } if (history != null) { map['History'] = history; } if (primaryDiagnosis != null) { map['PrimaryDiagnosis'] = primaryDiagnosis; } if (hospitalId != null) { map['HospitalId'] = hospitalId; } if (hospitalName != null) { map['HospitalName'] = hospitalName; } if (applyHospitalId != null) { map['ApplyHospitalId'] = applyHospitalId; } if (applyHospitalName != null) { map['ApplyHospitalName'] = applyHospitalName; } if (expertId != null) { map['ExpertId'] = expertId; } if (expertName != null) { map['ExpertName'] = expertName; } if (consultationDate != null) { map['ConsultationDate'] = JsonRpcUtils.dateFormat(consultationDate!); } if (inspectionItems != null) { map['InspectionItems'] = inspectionItems; } if (scanDoctorName != null) { map['ScanDoctorName'] = scanDoctorName; } if (deviceModel != null) { map['DeviceModel'] = deviceModel; } if (terminalId != null) { map['TerminalId'] = terminalId; } if (imageTokens != null) { map['ImageTokens'] = imageTokens; } if (videoInfos != null) { map['VideoInfos'] = videoInfos; } if (reportPreviewPdfs != null) { map['ReportPreviewPdfs'] = reportPreviewPdfs; } return map; } } class GetConsultationListRequest extends AppletAPIPageRequest{ String? keyWord; DateTime? startTime; DateTime? endTime; GetConsultationListRequest({ this.keyWord, this.startTime, this.endTime, int pageIndex = 0, int pageSize = 0, String? openId, }) : super( pageIndex: pageIndex, pageSize: pageSize, openId: openId, ); factory GetConsultationListRequest.fromJson(Map map) { return GetConsultationListRequest( keyWord: map['KeyWord'], startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null, endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null, pageIndex: map['PageIndex'], pageSize: map['PageSize'], openId: map['OpenId'], ); } 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!); return map; } } class GetConsultationReportListRequest extends AppletAPIBaseRequest{ String? consultationId; GetConsultationReportListRequest({ this.consultationId, String? openId, }) : super( openId: openId, ); factory GetConsultationReportListRequest.fromJson(Map map) { return GetConsultationReportListRequest( consultationId: map['ConsultationId'], openId: map['OpenId'], ); } Map toJson() { final map = super.toJson(); if (consultationId != null) map['ConsultationId'] = consultationId; return map; } } class CreateConsultationRequest extends AppletAPIBaseRequest{ String? patientName; PatientGenderEnum patientSex; String? patientAge; DateTime? birthday; String? contactInfo; String? patientID; String? history; String? primaryDiagnosis; String? hospitalId; String? expertId; DateTime? consultationDate; String? inspectionItems; String? scanDoctorName; String? deviceModel; String? terminalId; CreateConsultationRequest({ this.patientName, this.patientSex = PatientGenderEnum.NotFilled, this.patientAge, this.birthday, this.contactInfo, this.patientID, this.history, this.primaryDiagnosis, this.hospitalId, this.expertId, this.consultationDate, this.inspectionItems, this.scanDoctorName, this.deviceModel, this.terminalId, String? openId, }) : super( openId: openId, ); factory CreateConsultationRequest.fromJson(Map map) { return CreateConsultationRequest( patientName: map['PatientName'], patientSex: PatientGenderEnum.values.firstWhere((e) => e.index == map['PatientSex']), patientAge: map['PatientAge'], birthday: map['Birthday'] != null ? DateTime.parse(map['Birthday']) : null, contactInfo: map['ContactInfo'], patientID: map['PatientID'], history: map['History'], primaryDiagnosis: map['PrimaryDiagnosis'], hospitalId: map['HospitalId'], expertId: map['ExpertId'], consultationDate: map['ConsultationDate'] != null ? DateTime.parse(map['ConsultationDate']) : null, inspectionItems: map['InspectionItems'], scanDoctorName: map['ScanDoctorName'], deviceModel: map['DeviceModel'], terminalId: map['TerminalId'], openId: map['OpenId'], ); } Map toJson() { final map = super.toJson(); if (patientName != null) map['PatientName'] = patientName; map['PatientSex'] = patientSex.index; if (patientAge != null) map['PatientAge'] = patientAge; if (birthday != null) map['Birthday'] = JsonRpcUtils.dateFormat(birthday!); if (contactInfo != null) map['ContactInfo'] = contactInfo; if (patientID != null) map['PatientID'] = patientID; if (history != null) map['History'] = history; if (primaryDiagnosis != null) map['PrimaryDiagnosis'] = primaryDiagnosis; if (hospitalId != null) map['HospitalId'] = hospitalId; if (expertId != null) map['ExpertId'] = expertId; if (consultationDate != null) map['ConsultationDate'] = JsonRpcUtils.dateFormat(consultationDate!); if (inspectionItems != null) map['InspectionItems'] = inspectionItems; if (scanDoctorName != null) map['ScanDoctorName'] = scanDoctorName; if (deviceModel != null) map['DeviceModel'] = deviceModel; if (terminalId != null) map['TerminalId'] = terminalId; return map; } } class ArrangeConsultationRequest extends AppletAPIBaseRequest{ String? consultationId; DateTime? appointDate; String? expertId; ArrangeConsultationRequest({ this.consultationId, this.appointDate, this.expertId, String? openId, }) : super( openId: openId, ); factory ArrangeConsultationRequest.fromJson(Map map) { return ArrangeConsultationRequest( consultationId: map['ConsultationId'], appointDate: map['AppointDate'] != null ? DateTime.parse(map['AppointDate']) : null, expertId: map['ExpertId'], openId: map['OpenId'], ); } Map toJson() { final map = super.toJson(); if (consultationId != null) map['ConsultationId'] = consultationId; if (appointDate != null) map['AppointDate'] = JsonRpcUtils.dateFormat(appointDate!); if (expertId != null) map['ExpertId'] = expertId; return map; } } class OrganBaseInfo { String? organizationId; String? name; OrganBaseInfo({ this.organizationId, this.name, }); factory OrganBaseInfo.fromJson(Map map) { return OrganBaseInfo( organizationId: map['OrganizationId'], name: map['Name'], ); } Map toJson() { final map = Map(); if (organizationId != null) { map['OrganizationId'] = organizationId; } if (name != null) { map['Name'] = name; } return map; } } class GetHospitalsRequest extends AppletAPIBaseRequest{ GetHospitalsRequest({ String? openId, }) : super( openId: openId, ); factory GetHospitalsRequest.fromJson(Map map) { return GetHospitalsRequest( openId: map['OpenId'], ); } Map toJson() { final map = super.toJson(); return map; } } class DoctorInfo { String? id; String? displayName; String? fullName; String? electronSignUrl; DoctorInfo({ this.id, this.displayName, this.fullName, this.electronSignUrl, }); factory DoctorInfo.fromJson(Map map) { return DoctorInfo( id: map['Id'], displayName: map['DisplayName'], fullName: map['FullName'], electronSignUrl: map['ElectronSignUrl'], ); } Map toJson() { final map = Map(); if (id != null) { map['Id'] = id; } if (displayName != null) { map['DisplayName'] = displayName; } if (fullName != null) { map['FullName'] = fullName; } if (electronSignUrl != null) { map['ElectronSignUrl'] = electronSignUrl; } return map; } } class GetExpertsRequest extends AppletAPIBaseRequest{ String? organizationId; GetExpertsRequest({ this.organizationId, String? openId, }) : super( openId: openId, ); factory GetExpertsRequest.fromJson(Map map) { return GetExpertsRequest( organizationId: map['OrganizationId'], openId: map['OpenId'], ); } Map toJson() { final map = super.toJson(); if (organizationId != null) map['OrganizationId'] = organizationId; return map; } } class TerminalInfo { String? id; String? organizationId; String? organizationDecription; String? organizationName; String? name; String? model; String? description; String? uniqueId; TerminalInfo({ this.id, this.organizationId, this.organizationDecription, this.organizationName, this.name, this.model, this.description, this.uniqueId, }); factory TerminalInfo.fromJson(Map map) { return TerminalInfo( id: map['Id'], organizationId: map['OrganizationId'], organizationDecription: map['OrganizationDecription'], organizationName: map['OrganizationName'], name: map['Name'], model: map['Model'], description: map['Description'], uniqueId: map['UniqueId'], ); } Map toJson() { final map = Map(); if (id != null) { map['Id'] = id; } if (organizationId != null) { map['OrganizationId'] = organizationId; } if (organizationDecription != null) { map['OrganizationDecription'] = organizationDecription; } if (organizationName != null) { map['OrganizationName'] = organizationName; } if (name != null) { map['Name'] = name; } if (model != null) { map['Model'] = model; } if (description != null) { map['Description'] = description; } if (uniqueId != null) { map['UniqueId'] = uniqueId; } return map; } } class GetTerminalListRequest extends AppletAPIBaseRequest{ GetTerminalListRequest({ String? openId, }) : super( openId: openId, ); factory GetTerminalListRequest.fromJson(Map map) { return GetTerminalListRequest( openId: map['OpenId'], ); } Map toJson() { final map = super.toJson(); return map; } } class GetScanLocationsRequest extends AppletAPIBaseRequest{ GetScanLocationsRequest({ String? openId, }) : super( openId: openId, ); factory GetScanLocationsRequest.fromJson(Map map) { return GetScanLocationsRequest( openId: map['OpenId'], ); } Map toJson() { final map = super.toJson(); return map; } } class LiveTerminalInfo2 { bool terminalLiveEnabled; bool cameraLiveEnabled; bool isMergeChannel; int terminalWidth; int terminalHeight; String? cameraId; bool isMultiChannels; int cameraWidth; int cameraHeight; int integerRoomId; int terminalIntegerRoomId; LiveStates state; String? id; LiveTerminalInfo2({ this.terminalLiveEnabled = false, this.cameraLiveEnabled = false, this.isMergeChannel = false, this.terminalWidth = 0, this.terminalHeight = 0, this.cameraId, this.isMultiChannels = false, this.cameraWidth = 0, this.cameraHeight = 0, this.integerRoomId = 0, this.terminalIntegerRoomId = 0, this.state = LiveStates.OK, this.id, }); factory LiveTerminalInfo2.fromJson(Map map) { return LiveTerminalInfo2( terminalLiveEnabled: map['TerminalLiveEnabled'], cameraLiveEnabled: map['CameraLiveEnabled'], isMergeChannel: map['IsMergeChannel'], terminalWidth: map['TerminalWidth'], terminalHeight: map['TerminalHeight'], cameraId: map['CameraId'], isMultiChannels: map['IsMultiChannels'], cameraWidth: map['CameraWidth'], cameraHeight: map['CameraHeight'], integerRoomId: map['IntegerRoomId'], terminalIntegerRoomId: map['TerminalIntegerRoomId'], state: LiveStates.values.firstWhere((e) => e.index == map['State']), id: map['Id'], ); } Map toJson() { final map = Map(); map['TerminalLiveEnabled'] = terminalLiveEnabled; map['CameraLiveEnabled'] = cameraLiveEnabled; map['IsMergeChannel'] = isMergeChannel; map['TerminalWidth'] = terminalWidth; map['TerminalHeight'] = terminalHeight; if (cameraId != null) { map['CameraId'] = cameraId; } map['IsMultiChannels'] = isMultiChannels; map['CameraWidth'] = cameraWidth; map['CameraHeight'] = cameraHeight; map['IntegerRoomId'] = integerRoomId; map['TerminalIntegerRoomId'] = terminalIntegerRoomId; map['State'] = state.index; if (id != null) { map['Id'] = id; } return map; } } class MeetingMemberInfo2 { LiveStates state; String? id; String? name; String? displayName; String? avatar; String? userSign; MeetingMemberInfo2({ this.state = LiveStates.OK, this.id, this.name, this.displayName, this.avatar, this.userSign, }); factory MeetingMemberInfo2.fromJson(Map map) { return MeetingMemberInfo2( state: LiveStates.values.firstWhere((e) => e.index == map['State']), id: map['Id'], name: map['Name'], displayName: map['DisplayName'], avatar: map['Avatar'], userSign: map['UserSign'], ); } Map toJson() { final map = Map(); map['State'] = state.index; if (id != null) { map['Id'] = id; } if (name != null) { map['Name'] = name; } if (displayName != null) { map['DisplayName'] = displayName; } if (avatar != null) { map['Avatar'] = avatar; } if (userSign != null) { map['UserSign'] = userSign; } return map; } } class StartConsultationResult { String? roomId; LiveStates state; int integerRoomId; int appId; List? terminalInfos; List? meetingMemberInfos; StartConsultationResult({ this.roomId, this.state = LiveStates.OK, this.integerRoomId = 0, this.appId = 0, this.terminalInfos, this.meetingMemberInfos, }); factory StartConsultationResult.fromJson(Map map) { return StartConsultationResult( roomId: map['RoomId'], state: LiveStates.values.firstWhere((e) => e.index == map['State']), integerRoomId: map['IntegerRoomId'], appId: map['AppId'], terminalInfos: map['TerminalInfos'] != null ? (map['TerminalInfos'] as List).map((e)=>LiveTerminalInfo2.fromJson(e as Map)).toList() : null, meetingMemberInfos: map['MeetingMemberInfos'] != null ? (map['MeetingMemberInfos'] as List).map((e)=>MeetingMemberInfo2.fromJson(e as Map)).toList() : null, ); } Map toJson() { final map = Map(); if (roomId != null) { map['RoomId'] = roomId; } map['State'] = state.index; map['IntegerRoomId'] = integerRoomId; map['AppId'] = appId; if (terminalInfos != null) { map['TerminalInfos'] = terminalInfos; } if (meetingMemberInfos != null) { map['MeetingMemberInfos'] = meetingMemberInfos; } return map; } } class StartConsultationRequest extends AppletAPIBaseRequest{ String? consultationId; StartConsultationRequest({ this.consultationId, String? openId, }) : super( openId: openId, ); factory StartConsultationRequest.fromJson(Map map) { return StartConsultationRequest( consultationId: map['ConsultationId'], openId: map['OpenId'], ); } Map toJson() { final map = super.toJson(); if (consultationId != null) map['ConsultationId'] = consultationId; return map; } } class CancelStartConsultationResult { LiveStates liveStates; CancelStartConsultationResult({ this.liveStates = LiveStates.OK, }); factory CancelStartConsultationResult.fromJson(Map map) { return CancelStartConsultationResult( liveStates: LiveStates.values.firstWhere((e) => e.index == map['LiveStates']), ); } Map toJson() { final map = Map(); map['LiveStates'] = liveStates.index; return map; } } class CancelStartConsultationRequest extends AppletAPIBaseRequest{ String? roomId; CancelStartConsultationRequest({ this.roomId, String? openId, }) : super( openId: openId, ); factory CancelStartConsultationRequest.fromJson(Map map) { return CancelStartConsultationRequest( roomId: map['RoomId'], openId: map['OpenId'], ); } Map toJson() { final map = super.toJson(); if (roomId != null) map['RoomId'] = roomId; return map; } } class ExitConsultationResult { LiveStates liveStates; ExitConsultationResult({ this.liveStates = LiveStates.OK, }); factory ExitConsultationResult.fromJson(Map map) { return ExitConsultationResult( liveStates: LiveStates.values.firstWhere((e) => e.index == map['LiveStates']), ); } Map toJson() { final map = Map(); map['LiveStates'] = liveStates.index; return map; } } class ExitConsultationRequest extends AppletAPIBaseRequest{ String? roomId; String? consultationId; ExitConsultationRequest({ this.roomId, this.consultationId, String? openId, }) : super( openId: openId, ); factory ExitConsultationRequest.fromJson(Map map) { return ExitConsultationRequest( roomId: map['RoomId'], consultationId: map['ConsultationId'], openId: map['OpenId'], ); } Map toJson() { final map = super.toJson(); if (roomId != null) map['RoomId'] = roomId; if (consultationId != null) map['ConsultationId'] = consultationId; return map; } } class ConsultationHeartRateRequest extends AppletAPIBaseRequest{ String? consultationId; ConsultationHeartRateRequest({ this.consultationId, String? openId, }) : super( openId: openId, ); factory ConsultationHeartRateRequest.fromJson(Map map) { return ConsultationHeartRateRequest( consultationId: map['ConsultationId'], openId: map['OpenId'], ); } Map toJson() { final map = super.toJson(); if (consultationId != null) map['ConsultationId'] = consultationId; return map; } } class AppletAPIDownloadFileResult { String? fileString; AppletAPIDownloadFileResult({ this.fileString, }); factory AppletAPIDownloadFileResult.fromJson(Map map) { return AppletAPIDownloadFileResult( fileString: map['FileString'], ); } Map toJson() { final map = Map(); if (fileString != null) { map['FileString'] = fileString; } return map; } } class DownloadFileRequest extends AppletAPIBaseRequest{ String? fileToken; DownloadFileRequest({ this.fileToken, String? openId, }) : super( openId: openId, ); factory DownloadFileRequest.fromJson(Map map) { return DownloadFileRequest( fileToken: map['FileToken'], openId: map['OpenId'], ); } Map toJson() { final map = super.toJson(); if (fileToken != null) map['FileToken'] = fileToken; return map; } } class VinnoTemplateInfo { String? templateName; String? templateUrl; VinnoTemplateInfo({ this.templateName, this.templateUrl, }); factory VinnoTemplateInfo.fromJson(Map map) { return VinnoTemplateInfo( templateName: map['TemplateName'], templateUrl: map['TemplateUrl'], ); } Map toJson() { final map = Map(); if (templateName != null) { map['TemplateName'] = templateName; } if (templateUrl != null) { map['TemplateUrl'] = templateUrl; } return map; } } class GetReportTemplatesRequest extends AppletAPIBaseRequest{ String? languageCode; GetReportTemplatesRequest({ this.languageCode, String? openId, }) : super( openId: openId, ); factory GetReportTemplatesRequest.fromJson(Map map) { return GetReportTemplatesRequest( languageCode: map['LanguageCode'], openId: map['OpenId'], ); } Map toJson() { final map = super.toJson(); if (languageCode != null) map['LanguageCode'] = languageCode; return map; } } class GetThesaurusTemplatesRequest extends AppletAPIBaseRequest{ String? languageCode; GetThesaurusTemplatesRequest({ this.languageCode, String? openId, }) : super( openId: openId, ); factory GetThesaurusTemplatesRequest.fromJson(Map map) { return GetThesaurusTemplatesRequest( languageCode: map['LanguageCode'], openId: map['OpenId'], ); } Map toJson() { final map = super.toJson(); if (languageCode != null) map['LanguageCode'] = languageCode; return map; } } class ReportElementTagMessage { String? id; String? name; ReportElementTagMessage({ this.id, this.name, }); factory ReportElementTagMessage.fromJson(Map map) { return ReportElementTagMessage( id: map['Id'], name: map['Name'], ); } Map toJson() { final map = Map(); if (id != null) { map['Id'] = id; } if (name != null) { map['Name'] = name; } return map; } } class ReportBaseElementValueMessage { ReportBaseElementValueMessage(); factory ReportBaseElementValueMessage.fromJson(Map map) { return ReportBaseElementValueMessage( ); } Map toJson() { final map = Map(); return map; } } class ReportTextElementValueMessage extends ReportBaseElementValueMessage{ String? text; ReportTextElementValueMessage({ this.text, }) : super( ); factory ReportTextElementValueMessage.fromJson(Map map) { return ReportTextElementValueMessage( text: map['Text'], ); } Map toJson() { final map = super.toJson(); if (text != null) map['Text'] = text; return map; } } class ReportIntegerElementValueMessage extends ReportBaseElementValueMessage{ int value; ReportIntegerElementValueMessage({ this.value = 0, }) : super( ); factory ReportIntegerElementValueMessage.fromJson(Map map) { return ReportIntegerElementValueMessage( value: map['Value'], ); } Map toJson() { final map = super.toJson(); map['Value'] = value; return map; } } class ReportFloatElementValueMessage extends ReportBaseElementValueMessage{ double value; ReportFloatElementValueMessage({ this.value = 0, }) : super( ); factory ReportFloatElementValueMessage.fromJson(Map map) { return ReportFloatElementValueMessage( value: double.parse(map['Value'].toString()), ); } Map toJson() { final map = super.toJson(); map['Value'] = value; return map; } } class ReportBufferImageElementValueMessage extends ReportBaseElementValueMessage{ List? value; ReportBufferImageElementValueMessage({ this.value, }) : super( ); factory ReportBufferImageElementValueMessage.fromJson(Map map) { final valueData = map['Value']; return ReportBufferImageElementValueMessage( value: valueData != null ? (valueData as List).map((e) => e as int).toList(): null, ); } Map toJson() { final map = super.toJson(); if (value != null) map['Value'] = value; return map; } } class ReportDateTimeElementValueMessage extends ReportBaseElementValueMessage{ DateTime? value; ReportDateTimeElementValueMessage({ this.value, }) : super( ); factory ReportDateTimeElementValueMessage.fromJson(Map map) { return ReportDateTimeElementValueMessage( value: map['Value'] != null ? DateTime.parse(map['Value']) : null, ); } Map toJson() { final map = super.toJson(); if (value != null) map['Value'] = JsonRpcUtils.dateFormat(value!); return map; } } class ReportFileElementValueMessage extends ReportBaseElementValueMessage{ String? value; String? examDataId; ReportFileElementValueMessage({ this.value, this.examDataId, }) : super( ); factory ReportFileElementValueMessage.fromJson(Map map) { return ReportFileElementValueMessage( value: map['Value'], examDataId: map['ExamDataId'], ); } Map toJson() { final map = super.toJson(); if (value != null) map['Value'] = value; if (examDataId != null) map['ExamDataId'] = examDataId; return map; } } class ReportImageListElementValueMessage extends ReportBaseElementValueMessage{ List? value; ReportImageListElementValueMessage({ this.value, }) : super( ); factory ReportImageListElementValueMessage.fromJson(Map map) { return ReportImageListElementValueMessage( value: map['Value'] != null ? (map['Value'] as List).map((e)=>ReportFileElementValueMessage.fromJson(e as Map)).toList() : null, ); } Map toJson() { final map = super.toJson(); if (value != null) map['Value'] = value; return map; } } class ReportStringListElementValueMessage extends ReportBaseElementValueMessage{ List? value; ReportStringListElementValueMessage({ this.value, }) : super( ); factory ReportStringListElementValueMessage.fromJson(Map map) { return ReportStringListElementValueMessage( value: map['Value'] != null ? (map['Value'] as List).map((e)=>ReportTextElementValueMessage.fromJson(e as Map)).toList() : null, ); } Map toJson() { final map = super.toJson(); if (value != null) map['Value'] = value; return map; } } class ReportElementValues { ReportTextElementValueMessage? textElement; ReportIntegerElementValueMessage? integerElement; ReportFloatElementValueMessage? floatElement; ReportBufferImageElementValueMessage? bufferImageElement; ReportDateTimeElementValueMessage? dateTimeElement; ReportFileElementValueMessage? fileElement; ReportImageListElementValueMessage? imageListElement; ReportStringListElementValueMessage? stringListElement; ReportElementValues({ this.textElement, this.integerElement, this.floatElement, this.bufferImageElement, this.dateTimeElement, this.fileElement, this.imageListElement, this.stringListElement, }); factory ReportElementValues.fromJson(Map map) { return ReportElementValues( textElement: map['TextElement'] != null ? ReportTextElementValueMessage.fromJson(map['TextElement']) : null, integerElement: map['IntegerElement'] != null ? ReportIntegerElementValueMessage.fromJson(map['IntegerElement']) : null, floatElement: map['FloatElement'] != null ? ReportFloatElementValueMessage.fromJson(map['FloatElement']) : null, bufferImageElement: map['BufferImageElement'] != null ? ReportBufferImageElementValueMessage.fromJson(map['BufferImageElement']) : null, dateTimeElement: map['DateTimeElement'] != null ? ReportDateTimeElementValueMessage.fromJson(map['DateTimeElement']) : null, fileElement: map['FileElement'] != null ? ReportFileElementValueMessage.fromJson(map['FileElement']) : null, imageListElement: map['ImageListElement'] != null ? ReportImageListElementValueMessage.fromJson(map['ImageListElement']) : null, stringListElement: map['StringListElement'] != null ? ReportStringListElementValueMessage.fromJson(map['StringListElement']) : null, ); } Map toJson() { final map = Map(); if (textElement != null) { map['TextElement'] = textElement; } if (integerElement != null) { map['IntegerElement'] = integerElement; } if (floatElement != null) { map['FloatElement'] = floatElement; } if (bufferImageElement != null) { map['BufferImageElement'] = bufferImageElement; } if (dateTimeElement != null) { map['DateTimeElement'] = dateTimeElement; } if (fileElement != null) { map['FileElement'] = fileElement; } if (imageListElement != null) { map['ImageListElement'] = imageListElement; } if (stringListElement != null) { map['StringListElement'] = stringListElement; } return map; } } class ReportElementMessage { ReportElementTagMessage? elementTag; ReportElementValues? reportElementValue; ReportElementMessage({ this.elementTag, this.reportElementValue, }); factory ReportElementMessage.fromJson(Map map) { return ReportElementMessage( elementTag: map['ElementTag'] != null ? ReportElementTagMessage.fromJson(map['ElementTag']) : null, reportElementValue: map['ReportElementValue'] != null ? ReportElementValues.fromJson(map['ReportElementValue']) : null, ); } Map toJson() { final map = Map(); if (elementTag != null) { map['ElementTag'] = elementTag; } if (reportElementValue != null) { map['ReportElementValue'] = reportElementValue; } return map; } } class IReadOnlyCollection { int count; IReadOnlyCollection({ this.count = 0, }); factory IReadOnlyCollection.fromJson(Map map) { return IReadOnlyCollection( count: map['Count'], ); } Map toJson() { final map = Map(); map['Count'] = count; return map; } } class ReportMeasureTagMessage { IReadOnlyCollection? availableMethods; String? baseType; String? calculationId; String? matchId; String? method; String? mode; String? output; String? outputV2; String? unit; String? userId; ReportMeasureTagMessage({ this.availableMethods, this.baseType, this.calculationId, this.matchId, this.method, this.mode, this.output, this.outputV2, this.unit, this.userId, }); factory ReportMeasureTagMessage.fromJson(Map map) { return ReportMeasureTagMessage( availableMethods: map['AvailableMethods']?.cast().toList(), baseType: map['BaseType'], calculationId: map['CalculationId'], matchId: map['MatchId'], method: map['Method'], mode: map['Mode'], output: map['Output'], outputV2: map['OutputV2'], unit: map['Unit'], userId: map['UserId'], ); } Map toJson() { final map = Map(); if (availableMethods != null) { map['AvailableMethods'] = availableMethods; } if (baseType != null) { map['BaseType'] = baseType; } if (calculationId != null) { map['CalculationId'] = calculationId; } if (matchId != null) { map['MatchId'] = matchId; } if (method != null) { map['Method'] = method; } if (mode != null) { map['Mode'] = mode; } if (output != null) { map['Output'] = output; } if (outputV2 != null) { map['OutputV2'] = outputV2; } if (unit != null) { map['Unit'] = unit; } if (userId != null) { map['UserId'] = userId; } return map; } } class ReportMeasrueElementValueMessage { ReportMeasureTagMessage? measureTag; ReportTextElementValueMessage? elementValue; ReportMeasrueElementValueMessage({ this.measureTag, this.elementValue, }); factory ReportMeasrueElementValueMessage.fromJson(Map map) { return ReportMeasrueElementValueMessage( measureTag: map['MeasureTag'] != null ? ReportMeasureTagMessage.fromJson(map['MeasureTag']) : null, elementValue: map['ElementValue'] != null ? ReportTextElementValueMessage.fromJson(map['ElementValue']) : null, ); } Map toJson() { final map = Map(); if (measureTag != null) { map['MeasureTag'] = measureTag; } if (elementValue != null) { map['ElementValue'] = elementValue; } return map; } } class ReportMeasureElementMessage { ReportElementTagMessage? elementTag; List? reportElementValues; ReportMeasureElementMessage({ this.elementTag, this.reportElementValues, }); factory ReportMeasureElementMessage.fromJson(Map map) { return ReportMeasureElementMessage( elementTag: map['ElementTag'] != null ? ReportElementTagMessage.fromJson(map['ElementTag']) : null, reportElementValues: map['ReportElementValues'] != null ? (map['ReportElementValues'] as List).map((e)=>ReportMeasrueElementValueMessage.fromJson(e as Map)).toList() : null, ); } Map toJson() { final map = Map(); if (elementTag != null) { map['ElementTag'] = elementTag; } if (reportElementValues != null) { map['ReportElementValues'] = reportElementValues; } return map; } } class ReportResultInfo { String? id; List? previewImages; String? template; List? reportElementValues; List? reportMeasureElementValues; List? tagCodeList; DiagnosisOrganEnum organ; QualifiedState qualifiedState; QualityType qualityType; ReportResultInfo({ this.id, this.previewImages, this.template, this.reportElementValues, this.reportMeasureElementValues, this.tagCodeList, this.organ = DiagnosisOrganEnum.Null, this.qualifiedState = QualifiedState.UnSet, this.qualityType = QualityType.None, }); factory ReportResultInfo.fromJson(Map map) { return ReportResultInfo( id: map['Id'], previewImages: map['PreviewImages'] != null ? (map['PreviewImages'] as List).map((e)=>ReportImageInfo.fromJson(e as Map)).toList() : null, template: map['Template'], reportElementValues: map['ReportElementValues'] != null ? (map['ReportElementValues'] as List).map((e)=>ReportElementMessage.fromJson(e as Map)).toList() : null, reportMeasureElementValues: map['ReportMeasureElementValues'] != null ? (map['ReportMeasureElementValues'] as List).map((e)=>ReportMeasureElementMessage.fromJson(e as Map)).toList() : null, tagCodeList: map['TagCodeList']?.cast().toList(), organ: DiagnosisOrganEnum.values.firstWhere((e) => e.index == map['Organ']), qualifiedState: QualifiedState.values.firstWhere((e) => e.index == map['QualifiedState']), qualityType: QualityType.values.firstWhere((e) => e.index == map['QualityType']), ); } Map toJson() { final map = Map(); if (id != null) { map['Id'] = id; } if (previewImages != null) { map['PreviewImages'] = previewImages; } if (template != null) { map['Template'] = template; } if (reportElementValues != null) { map['ReportElementValues'] = reportElementValues; } if (reportMeasureElementValues != null) { map['ReportMeasureElementValues'] = reportMeasureElementValues; } if (tagCodeList != null) { map['TagCodeList'] = tagCodeList; } map['Organ'] = organ.index; map['QualifiedState'] = qualifiedState.index; map['QualityType'] = qualityType.index; return map; } } class SaveAppletReportRequest extends ReportResultInfo{ String? openId; String? terminalRecordId; SaveAppletReportRequest({ this.openId, this.terminalRecordId, String? id, List? previewImages, String? template, List? reportElementValues, List? reportMeasureElementValues, List? tagCodeList, DiagnosisOrganEnum organ = DiagnosisOrganEnum.Null, QualifiedState qualifiedState = QualifiedState.UnSet, QualityType qualityType = QualityType.None, }) : super( id: id, previewImages: previewImages, template: template, reportElementValues: reportElementValues, reportMeasureElementValues: reportMeasureElementValues, tagCodeList: tagCodeList, organ: organ, qualifiedState: qualifiedState, qualityType: qualityType, ); factory SaveAppletReportRequest.fromJson(Map map) { return SaveAppletReportRequest( openId: map['OpenId'], terminalRecordId: map['TerminalRecordId'], id: map['Id'], previewImages: map['PreviewImages'] != null ? (map['PreviewImages'] as List).map((e)=>ReportImageInfo.fromJson(e as Map)).toList() : null, template: map['Template'], reportElementValues: map['ReportElementValues'] != null ? (map['ReportElementValues'] as List).map((e)=>ReportElementMessage.fromJson(e as Map)).toList() : null, reportMeasureElementValues: map['ReportMeasureElementValues'] != null ? (map['ReportMeasureElementValues'] as List).map((e)=>ReportMeasureElementMessage.fromJson(e as Map)).toList() : null, tagCodeList: map['TagCodeList']?.cast().toList(), organ: DiagnosisOrganEnum.values.firstWhere((e) => e.index == map['Organ']), qualifiedState: QualifiedState.values.firstWhere((e) => e.index == map['QualifiedState']), qualityType: QualityType.values.firstWhere((e) => e.index == map['QualityType']), ); } Map toJson() { final map = super.toJson(); if (openId != null) map['OpenId'] = openId; if (terminalRecordId != null) map['TerminalRecordId'] = terminalRecordId; return map; } } class GetAppletReportRequest extends AppletAPIBaseRequest{ String? recordId; String? reportId; GetAppletReportRequest({ this.recordId, this.reportId, String? openId, }) : super( openId: openId, ); factory GetAppletReportRequest.fromJson(Map map) { return GetAppletReportRequest( recordId: map['RecordId'], reportId: map['ReportId'], openId: map['OpenId'], ); } Map toJson() { final map = super.toJson(); if (recordId != null) map['RecordId'] = recordId; if (reportId != null) map['ReportId'] = reportId; return map; } } class UploadConsultationImageRequest extends ReportResultInfo{ String? openId; String? consultationId; String? imageBase64; UploadConsultationImageRequest({ this.openId, this.consultationId, this.imageBase64, String? id, List? previewImages, String? template, List? reportElementValues, List? reportMeasureElementValues, List? tagCodeList, DiagnosisOrganEnum organ = DiagnosisOrganEnum.Null, QualifiedState qualifiedState = QualifiedState.UnSet, QualityType qualityType = QualityType.None, }) : super( id: id, previewImages: previewImages, template: template, reportElementValues: reportElementValues, reportMeasureElementValues: reportMeasureElementValues, tagCodeList: tagCodeList, organ: organ, qualifiedState: qualifiedState, qualityType: qualityType, ); factory UploadConsultationImageRequest.fromJson(Map map) { return UploadConsultationImageRequest( openId: map['OpenId'], consultationId: map['ConsultationId'], imageBase64: map['ImageBase64'], id: map['Id'], previewImages: map['PreviewImages'] != null ? (map['PreviewImages'] as List).map((e)=>ReportImageInfo.fromJson(e as Map)).toList() : null, template: map['Template'], reportElementValues: map['ReportElementValues'] != null ? (map['ReportElementValues'] as List).map((e)=>ReportElementMessage.fromJson(e as Map)).toList() : null, reportMeasureElementValues: map['ReportMeasureElementValues'] != null ? (map['ReportMeasureElementValues'] as List).map((e)=>ReportMeasureElementMessage.fromJson(e as Map)).toList() : null, tagCodeList: map['TagCodeList']?.cast().toList(), organ: DiagnosisOrganEnum.values.firstWhere((e) => e.index == map['Organ']), qualifiedState: QualifiedState.values.firstWhere((e) => e.index == map['QualifiedState']), qualityType: QualityType.values.firstWhere((e) => e.index == map['QualityType']), ); } Map toJson() { final map = super.toJson(); if (openId != null) map['OpenId'] = openId; if (consultationId != null) map['ConsultationId'] = consultationId; if (imageBase64 != null) map['ImageBase64'] = imageBase64; return map; } }