12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390 |
- 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<String, dynamic> map) {
- return AppletAPIBaseRequest(
- openId: map['OpenId'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<String, dynamic> map) {
- return LiveMemberLeaveRequest(
- consultationId: map['ConsultationId'],
- openId: map['OpenId'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return LiveMemberRejectRequest(
- consultationId: map['ConsultationId'],
- userId: map['UserId'],
- openId: map['OpenId'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return LiveMemberAcceptRequest(
- consultationId: map['ConsultationId'],
- userId: map['UserId'],
- openId: map['OpenId'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return LiveMemberTimeoutRequest(
- consultationId: map['ConsultationId'],
- userId: map['UserId'],
- openId: map['OpenId'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return GetUserInfoByOpenIdResult(
- nickName: map['NickName'],
- hospital: map['Hospital'],
- userId: map['UserId'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<String, dynamic> map) {
- return GetUserInfoByOpenIdRequest(
- openId: map['OpenId'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return BindVcloudAccountAndOpenIdRequest(
- account: map['Account'],
- password: map['Password'],
- openId: map['OpenId'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<String, dynamic> 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<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<String, dynamic> map) {
- return AppletAPIPageRequest(
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- openId: map['OpenId'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> 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<String, dynamic> toJson() {
- final map = super.toJson();
- if (keyWord != null)
- map['KeyWord'] = keyWord;
- if (startTime != null)
- map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
- if (endTime != null)
- map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
- return map;
- }
- }
- class ImageFile {
- String? id;
- String? fileUrl;
- DateTime? createTime;
- ImageFile({
- this.id,
- this.fileUrl,
- this.createTime,
- });
- factory ImageFile.fromJson(Map<String, dynamic> map) {
- return ImageFile(
- id: map['Id'],
- fileUrl: map['FileUrl'],
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<String, dynamic> 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<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<String, dynamic> map) {
- return GetRemedicalDataListRequest(
- remedicalRecordId: map['RemedicalRecordId'],
- openId: map['OpenId'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return ReportImageInfo(
- examDataId: map['ExamDataId'],
- fileUrl: map['FileUrl'],
- type: AppletAPIImageType.values.firstWhere((e) => e.index == map['Type']),
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (examDataId != null) {
- map['ExamDataId'] = examDataId;
- }
- if (fileUrl != null) {
- map['FileUrl'] = fileUrl;
- }
- map['Type'] = type.index;
- return map;
- }
- }
- class ReportInfo {
- String? id;
- List<ReportImageInfo>? previewImages;
- String? reportPreviewJpg;
- ReportInfo({
- this.id,
- this.previewImages,
- this.reportPreviewJpg,
- });
- factory ReportInfo.fromJson(Map<String, dynamic> map) {
- return ReportInfo(
- id: map['Id'],
- previewImages: map['PreviewImages'] != null ? (map['PreviewImages'] as List).map((e)=>ReportImageInfo.fromJson(e as Map<String,dynamic>)).toList() : null,
- reportPreviewJpg: map['ReportPreviewJpg'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<String, dynamic> map) {
- return GetRemedicalReportListRequest(
- remedicalRecordId: map['RemedicalRecordId'],
- openId: map['OpenId'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return ImageTokenInfo(
- imageToken: map['ImageToken'],
- previewToken: map['PreviewToken'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<String, dynamic> map) {
- return VideoTokenInfo(
- videoToken: map['VideoToken'],
- previewToken: map['PreviewToken'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<String, dynamic> map) {
- return ReportPreviewPdf(
- reportId: map['ReportId'],
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- previewPdfUrl: map['PreviewPdfUrl'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<ImageTokenInfo>? imageTokens;
- List<VideoTokenInfo>? videoInfos;
- List<ReportPreviewPdf>? 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<String, dynamic> 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<String,dynamic>)).toList() : null,
- videoInfos: map['VideoInfos'] != null ? (map['VideoInfos'] as List).map((e)=>VideoTokenInfo.fromJson(e as Map<String,dynamic>)).toList() : null,
- reportPreviewPdfs: map['ReportPreviewPdfs'] != null ? (map['ReportPreviewPdfs'] as List).map((e)=>ReportPreviewPdf.fromJson(e as Map<String,dynamic>)).toList() : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<String, dynamic> 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<String, dynamic> toJson() {
- final map = super.toJson();
- if (keyWord != null)
- map['KeyWord'] = keyWord;
- if (startTime != null)
- map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
- if (endTime != null)
- map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
- return map;
- }
- }
- class GetConsultationReportListRequest extends AppletAPIBaseRequest{
- String? consultationId;
- GetConsultationReportListRequest({
- this.consultationId,
- String? openId,
- }) : super(
- openId: openId,
- );
- factory GetConsultationReportListRequest.fromJson(Map<String, dynamic> map) {
- return GetConsultationReportListRequest(
- consultationId: map['ConsultationId'],
- openId: map['OpenId'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> map) {
- return ArrangeConsultationRequest(
- consultationId: map['ConsultationId'],
- appointDate: map['AppointDate'] != null ? DateTime.parse(map['AppointDate']) : null,
- expertId: map['ExpertId'],
- openId: map['OpenId'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return OrganBaseInfo(
- organizationId: map['OrganizationId'],
- name: map['Name'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<String, dynamic> map) {
- return GetHospitalsRequest(
- openId: map['OpenId'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return DoctorInfo(
- id: map['Id'],
- displayName: map['DisplayName'],
- fullName: map['FullName'],
- electronSignUrl: map['ElectronSignUrl'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<String, dynamic> map) {
- return GetExpertsRequest(
- organizationId: map['OrganizationId'],
- openId: map['OpenId'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> 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<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<String, dynamic> map) {
- return GetTerminalListRequest(
- openId: map['OpenId'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- return map;
- }
- }
- class GetScanLocationsRequest extends AppletAPIBaseRequest{
- GetScanLocationsRequest({
- String? openId,
- }) : super(
- openId: openId,
- );
- factory GetScanLocationsRequest.fromJson(Map<String, dynamic> map) {
- return GetScanLocationsRequest(
- openId: map['OpenId'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> 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<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<String, dynamic> 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<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<LiveTerminalInfo2>? terminalInfos;
- List<MeetingMemberInfo2>? meetingMemberInfos;
- StartConsultationResult({
- this.roomId,
- this.state = LiveStates.OK,
- this.integerRoomId = 0,
- this.appId = 0,
- this.terminalInfos,
- this.meetingMemberInfos,
- });
- factory StartConsultationResult.fromJson(Map<String, dynamic> 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<String,dynamic>)).toList() : null,
- meetingMemberInfos: map['MeetingMemberInfos'] != null ? (map['MeetingMemberInfos'] as List).map((e)=>MeetingMemberInfo2.fromJson(e as Map<String,dynamic>)).toList() : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<String, dynamic> map) {
- return StartConsultationRequest(
- consultationId: map['ConsultationId'],
- openId: map['OpenId'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return CancelStartConsultationResult(
- liveStates: LiveStates.values.firstWhere((e) => e.index == map['LiveStates']),
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- map['LiveStates'] = liveStates.index;
- return map;
- }
- }
- class CancelStartConsultationRequest extends AppletAPIBaseRequest{
- String? roomId;
- CancelStartConsultationRequest({
- this.roomId,
- String? openId,
- }) : super(
- openId: openId,
- );
- factory CancelStartConsultationRequest.fromJson(Map<String, dynamic> map) {
- return CancelStartConsultationRequest(
- roomId: map['RoomId'],
- openId: map['OpenId'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return ExitConsultationResult(
- liveStates: LiveStates.values.firstWhere((e) => e.index == map['LiveStates']),
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<String, dynamic> map) {
- return ExitConsultationRequest(
- roomId: map['RoomId'],
- consultationId: map['ConsultationId'],
- openId: map['OpenId'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return ConsultationHeartRateRequest(
- consultationId: map['ConsultationId'],
- openId: map['OpenId'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationId != null)
- map['ConsultationId'] = consultationId;
- return map;
- }
- }
- class AppletAPIDownloadFileResult {
- String? fileString;
- AppletAPIDownloadFileResult({
- this.fileString,
- });
- factory AppletAPIDownloadFileResult.fromJson(Map<String, dynamic> map) {
- return AppletAPIDownloadFileResult(
- fileString: map['FileString'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<String, dynamic> map) {
- return DownloadFileRequest(
- fileToken: map['FileToken'],
- openId: map['OpenId'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return VinnoTemplateInfo(
- templateName: map['TemplateName'],
- templateUrl: map['TemplateUrl'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<String, dynamic> map) {
- return GetReportTemplatesRequest(
- languageCode: map['LanguageCode'],
- openId: map['OpenId'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return GetThesaurusTemplatesRequest(
- languageCode: map['LanguageCode'],
- openId: map['OpenId'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return ReportElementTagMessage(
- id: map['Id'],
- name: map['Name'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (id != null) {
- map['Id'] = id;
- }
- if (name != null) {
- map['Name'] = name;
- }
- return map;
- }
- }
- class ReportBaseElementValueMessage {
- ReportBaseElementValueMessage();
- factory ReportBaseElementValueMessage.fromJson(Map<String, dynamic> map) {
- return ReportBaseElementValueMessage(
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- return map;
- }
- }
- class ReportTextElementValueMessage extends ReportBaseElementValueMessage{
- String? text;
- ReportTextElementValueMessage({
- this.text,
- }) : super(
- );
- factory ReportTextElementValueMessage.fromJson(Map<String, dynamic> map) {
- return ReportTextElementValueMessage(
- text: map['Text'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return ReportIntegerElementValueMessage(
- value: map['Value'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return ReportFloatElementValueMessage(
- value: double.parse(map['Value'].toString()),
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- map['Value'] = value;
- return map;
- }
- }
- class ReportBufferImageElementValueMessage extends ReportBaseElementValueMessage{
- List<int>? value;
- ReportBufferImageElementValueMessage({
- this.value,
- }) : super(
- );
- factory ReportBufferImageElementValueMessage.fromJson(Map<String, dynamic> map) {
- final valueData = map['Value'];
- return ReportBufferImageElementValueMessage(
- value: valueData != null ? (valueData as List).map((e) => e as int).toList(): null,
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return ReportDateTimeElementValueMessage(
- value: map['Value'] != null ? DateTime.parse(map['Value']) : null,
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return ReportFileElementValueMessage(
- value: map['Value'],
- examDataId: map['ExamDataId'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (value != null)
- map['Value'] = value;
- if (examDataId != null)
- map['ExamDataId'] = examDataId;
- return map;
- }
- }
- class ReportImageListElementValueMessage extends ReportBaseElementValueMessage{
- List<ReportFileElementValueMessage>? value;
- ReportImageListElementValueMessage({
- this.value,
- }) : super(
- );
- factory ReportImageListElementValueMessage.fromJson(Map<String, dynamic> map) {
- return ReportImageListElementValueMessage(
- value: map['Value'] != null ? (map['Value'] as List).map((e)=>ReportFileElementValueMessage.fromJson(e as Map<String,dynamic>)).toList() : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (value != null)
- map['Value'] = value;
- return map;
- }
- }
- class ReportStringListElementValueMessage extends ReportBaseElementValueMessage{
- List<ReportTextElementValueMessage>? value;
- ReportStringListElementValueMessage({
- this.value,
- }) : super(
- );
- factory ReportStringListElementValueMessage.fromJson(Map<String, dynamic> map) {
- return ReportStringListElementValueMessage(
- value: map['Value'] != null ? (map['Value'] as List).map((e)=>ReportTextElementValueMessage.fromJson(e as Map<String,dynamic>)).toList() : null,
- );
- }
- Map<String, dynamic> 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<String, dynamic> 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<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<String, dynamic> map) {
- return ReportElementMessage(
- elementTag: map['ElementTag'] != null ? ReportElementTagMessage.fromJson(map['ElementTag']) : null,
- reportElementValue: map['ReportElementValue'] != null ? ReportElementValues.fromJson(map['ReportElementValue']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (elementTag != null) {
- map['ElementTag'] = elementTag;
- }
- if (reportElementValue != null) {
- map['ReportElementValue'] = reportElementValue;
- }
- return map;
- }
- }
- class IReadOnlyCollection<T> {
- int count;
- IReadOnlyCollection({
- this.count = 0,
- });
- factory IReadOnlyCollection.fromJson(Map<String, dynamic> map) {
- return IReadOnlyCollection(
- count: map['Count'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- map['Count'] = count;
- return map;
- }
- }
- class ReportMeasureTagMessage {
- IReadOnlyCollection<String>? 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<String, dynamic> map) {
- return ReportMeasureTagMessage(
- availableMethods: map['AvailableMethods']?.cast<String>().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<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<String, dynamic> map) {
- return ReportMeasrueElementValueMessage(
- measureTag: map['MeasureTag'] != null ? ReportMeasureTagMessage.fromJson(map['MeasureTag']) : null,
- elementValue: map['ElementValue'] != null ? ReportTextElementValueMessage.fromJson(map['ElementValue']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (measureTag != null) {
- map['MeasureTag'] = measureTag;
- }
- if (elementValue != null) {
- map['ElementValue'] = elementValue;
- }
- return map;
- }
- }
- class ReportMeasureElementMessage {
- ReportElementTagMessage? elementTag;
- List<ReportMeasrueElementValueMessage>? reportElementValues;
- ReportMeasureElementMessage({
- this.elementTag,
- this.reportElementValues,
- });
- factory ReportMeasureElementMessage.fromJson(Map<String, dynamic> 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<String,dynamic>)).toList() : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (elementTag != null) {
- map['ElementTag'] = elementTag;
- }
- if (reportElementValues != null) {
- map['ReportElementValues'] = reportElementValues;
- }
- return map;
- }
- }
- class ReportResultInfo {
- String? id;
- List<ReportImageInfo>? previewImages;
- String? template;
- List<ReportElementMessage>? reportElementValues;
- List<ReportMeasureElementMessage>? reportMeasureElementValues;
- List<String>? 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<String, dynamic> map) {
- return ReportResultInfo(
- id: map['Id'],
- previewImages: map['PreviewImages'] != null ? (map['PreviewImages'] as List).map((e)=>ReportImageInfo.fromJson(e as Map<String,dynamic>)).toList() : null,
- template: map['Template'],
- reportElementValues: map['ReportElementValues'] != null ? (map['ReportElementValues'] as List).map((e)=>ReportElementMessage.fromJson(e as Map<String,dynamic>)).toList() : null,
- reportMeasureElementValues: map['ReportMeasureElementValues'] != null ? (map['ReportMeasureElementValues'] as List).map((e)=>ReportMeasureElementMessage.fromJson(e as Map<String,dynamic>)).toList() : null,
- tagCodeList: map['TagCodeList']?.cast<String>().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<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<ReportImageInfo>? previewImages,
- String? template,
- List<ReportElementMessage>? reportElementValues,
- List<ReportMeasureElementMessage>? reportMeasureElementValues,
- List<String>? 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<String, dynamic> 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<String,dynamic>)).toList() : null,
- template: map['Template'],
- reportElementValues: map['ReportElementValues'] != null ? (map['ReportElementValues'] as List).map((e)=>ReportElementMessage.fromJson(e as Map<String,dynamic>)).toList() : null,
- reportMeasureElementValues: map['ReportMeasureElementValues'] != null ? (map['ReportMeasureElementValues'] as List).map((e)=>ReportMeasureElementMessage.fromJson(e as Map<String,dynamic>)).toList() : null,
- tagCodeList: map['TagCodeList']?.cast<String>().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<String, dynamic> 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<String, dynamic> map) {
- return GetAppletReportRequest(
- recordId: map['RecordId'],
- reportId: map['ReportId'],
- openId: map['OpenId'],
- );
- }
- Map<String, dynamic> 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<ReportImageInfo>? previewImages,
- String? template,
- List<ReportElementMessage>? reportElementValues,
- List<ReportMeasureElementMessage>? reportMeasureElementValues,
- List<String>? 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<String, dynamic> 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<String,dynamic>)).toList() : null,
- template: map['Template'],
- reportElementValues: map['ReportElementValues'] != null ? (map['ReportElementValues'] as List).map((e)=>ReportElementMessage.fromJson(e as Map<String,dynamic>)).toList() : null,
- reportMeasureElementValues: map['ReportMeasureElementValues'] != null ? (map['ReportMeasureElementValues'] as List).map((e)=>ReportMeasureElementMessage.fromJson(e as Map<String,dynamic>)).toList() : null,
- tagCodeList: map['TagCodeList']?.cast<String>().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<String, dynamic> 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;
- }
- }
|