123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289 |
- import 'liveConsultation.m.dart';
- import 'notification.m.dart';
- import 'package:fis_jsonrpc/utils.dart';
- 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 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 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;
- }
- }
- enum QualifiedState {
- UnSet,
- Qualified,
- UnQualified,
- }
- enum QualityType {
- None,
- Qualified,
- InformationUnCompleted,
- ImageNotClear,
- PositiveSiteNotClear,
- }
- 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;
- }
- }
|