1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393 |
- import 'liveConsultation.m.dart';
- import 'patient.m.dart';
- import 'notification.m.dart';
- import 'package:fis_jsonrpc/utils.dart';
- class PatientInfoExt {
- String? patientScanType;
- List<DataItemDTO>? content;
- PatientInfoExt({
- this.patientScanType,
- this.content,
- });
- factory PatientInfoExt.fromJson(Map<String, dynamic> map) {
- return PatientInfoExt(
- patientScanType: map['PatientScanType'],
- content: map['Content'] != null ? (map['Content'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (patientScanType != null) {
- map['PatientScanType'] = patientScanType;
- }
- if (content != null) {
- map['Content'] = content;
- }
- return map;
- }
- }
- class CreateRecordRequest extends TokenRequest{
- String? patientCode;
- String? deviceCode;
- List<DataItemDTO>? patientDatas;
- List<PatientInfoExt>? patientInfoExtList;
- CreateRecordRequest({
- this.patientCode,
- this.deviceCode,
- this.patientDatas,
- this.patientInfoExtList,
- String? token,
- }) : super(
- token: token,
- );
- factory CreateRecordRequest.fromJson(Map<String, dynamic> map) {
- return CreateRecordRequest(
- patientCode: map['PatientCode'],
- deviceCode: map['DeviceCode'],
- patientDatas: map['PatientDatas'] != null ? (map['PatientDatas'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- patientInfoExtList: map['PatientInfoExtList'] != null ? (map['PatientInfoExtList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map<String,dynamic>)).toList() : null,
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (patientCode != null)
- map['PatientCode'] = patientCode;
- if (deviceCode != null)
- map['DeviceCode'] = deviceCode;
- if (patientDatas != null)
- map['PatientDatas'] = patientDatas;
- if (patientInfoExtList != null)
- map['PatientInfoExtList'] = patientInfoExtList;
- return map;
- }
- }
- class CreateExamDataRequest extends TokenRequest{
- String? recordCode;
- String? fileToken;
- int fileSize;
- RemedicalFileDataTypeEnum fileDataType;
- String? previewFileToken;
- String? coverImageToken;
- CreateExamDataRequest({
- this.recordCode,
- this.fileToken,
- this.fileSize = 0,
- this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
- this.previewFileToken,
- this.coverImageToken,
- String? token,
- }) : super(
- token: token,
- );
- factory CreateExamDataRequest.fromJson(Map<String, dynamic> map) {
- return CreateExamDataRequest(
- recordCode: map['RecordCode'],
- fileToken: map['FileToken'],
- fileSize: map['FileSize'],
- fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
- previewFileToken: map['PreviewFileToken'],
- coverImageToken: map['CoverImageToken'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (recordCode != null)
- map['RecordCode'] = recordCode;
- if (fileToken != null)
- map['FileToken'] = fileToken;
- map['FileSize'] = fileSize;
- map['FileDataType'] = fileDataType.index;
- if (previewFileToken != null)
- map['PreviewFileToken'] = previewFileToken;
- if (coverImageToken != null)
- map['CoverImageToken'] = coverImageToken;
- return map;
- }
- }
- enum QueryRecordStatusEnum {
- All,
- NotScanned,
- Uploaded,
- NotReport,
- Completed,
- NotCompleted,
- }
- enum QueryRecordCreateTypeEnum {
- All,
- Reservation,
- Normal,
- }
- class GetRecordsPageRequest extends PageRequest{
- String? patientCode;
- QueryRecordStatusEnum queryRecordStatus;
- QueryRecordCreateTypeEnum queryRecordCreateType;
- GetRecordsPageRequest({
- this.patientCode,
- this.queryRecordStatus = QueryRecordStatusEnum.All,
- this.queryRecordCreateType = QueryRecordCreateTypeEnum.All,
- int pageIndex = 0,
- int pageSize = 0,
- String? token,
- }) : super(
- pageIndex: pageIndex,
- pageSize: pageSize,
- token: token,
- );
- factory GetRecordsPageRequest.fromJson(Map<String, dynamic> map) {
- return GetRecordsPageRequest(
- patientCode: map['PatientCode'],
- queryRecordStatus: QueryRecordStatusEnum.values.firstWhere((e) => e.index == map['QueryRecordStatus']),
- queryRecordCreateType: QueryRecordCreateTypeEnum.values.firstWhere((e) => e.index == map['QueryRecordCreateType']),
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (patientCode != null)
- map['PatientCode'] = patientCode;
- map['QueryRecordStatus'] = queryRecordStatus.index;
- map['QueryRecordCreateType'] = queryRecordCreateType.index;
- return map;
- }
- }
- enum ReferralTypeEnum {
- Normal,
- ReferralIn,
- ReferralOut,
- }
- class QueryRecordResult {
- DateTime? createTime;
- String? deptName;
- String? patientName;
- String? patientAge;
- List<DataItemDTO>? patientAgeInfo;
- int patientSex;
- String? creatorName;
- String? deviceName;
- String? displayName;
- RecordStatusEnum recordStatus;
- List<PatientInfoExt>? patientInfoExtList;
- DiagnosisStatusEnum diagnosisStatus;
- List<DiagnosisInfoDTO>? diagnosisInfos;
- bool isCollecting;
- DateTime? startCollectingTime;
- String? customDoctor;
- String? customOrganzation;
- String? equipmentSN;
- String? deviceOrganzationName;
- bool isReferral;
- ReferralTypeEnum referralType;
- String? patientCode;
- bool canCreateReport;
- DateTime? examTime;
- bool isQualityControlled;
- double score;
- QueryRecordResult({
- this.createTime,
- this.deptName,
- this.patientName,
- this.patientAge,
- this.patientAgeInfo,
- this.patientSex = 0,
- this.creatorName,
- this.deviceName,
- this.displayName,
- this.recordStatus = RecordStatusEnum.NotScanned,
- this.patientInfoExtList,
- this.diagnosisStatus = DiagnosisStatusEnum.NotRequired,
- this.diagnosisInfos,
- this.isCollecting = false,
- this.startCollectingTime,
- this.customDoctor,
- this.customOrganzation,
- this.equipmentSN,
- this.deviceOrganzationName,
- this.isReferral = false,
- this.referralType = ReferralTypeEnum.Normal,
- this.patientCode,
- this.canCreateReport = false,
- this.examTime,
- this.isQualityControlled = false,
- this.score = 0,
- });
- factory QueryRecordResult.fromJson(Map<String, dynamic> map) {
- return QueryRecordResult(
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- deptName: map['DeptName'],
- patientName: map['PatientName'],
- patientAge: map['PatientAge'],
- patientAgeInfo: map['PatientAgeInfo'] != null ? (map['PatientAgeInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- patientSex: map['PatientSex'],
- creatorName: map['CreatorName'],
- deviceName: map['DeviceName'],
- displayName: map['DisplayName'],
- recordStatus: RecordStatusEnum.values.firstWhere((e) => e.index == map['RecordStatus']),
- patientInfoExtList: map['PatientInfoExtList'] != null ? (map['PatientInfoExtList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map<String,dynamic>)).toList() : null,
- diagnosisStatus: DiagnosisStatusEnum.values.firstWhere((e) => e.index == map['DiagnosisStatus']),
- diagnosisInfos: map['DiagnosisInfos'] != null ? (map['DiagnosisInfos'] as List).map((e)=>DiagnosisInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- isCollecting: map['IsCollecting'],
- startCollectingTime: map['StartCollectingTime'] != null ? DateTime.parse(map['StartCollectingTime']) : null,
- customDoctor: map['CustomDoctor'],
- customOrganzation: map['CustomOrganzation'],
- equipmentSN: map['EquipmentSN'],
- deviceOrganzationName: map['DeviceOrganzationName'],
- isReferral: map['IsReferral'],
- referralType: ReferralTypeEnum.values.firstWhere((e) => e.index == map['ReferralType']),
- patientCode: map['PatientCode'],
- canCreateReport: map['CanCreateReport'],
- examTime: map['ExamTime'] != null ? DateTime.parse(map['ExamTime']) : null,
- isQualityControlled: map['IsQualityControlled'],
- score: double.parse(map['Score'].toString()),
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (createTime != null) {
- map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
- }
- if (deptName != null) {
- map['DeptName'] = deptName;
- }
- if (patientName != null) {
- map['PatientName'] = patientName;
- }
- if (patientAge != null) {
- map['PatientAge'] = patientAge;
- }
- if (patientAgeInfo != null) {
- map['PatientAgeInfo'] = patientAgeInfo;
- }
- map['PatientSex'] = patientSex;
- if (creatorName != null) {
- map['CreatorName'] = creatorName;
- }
- if (deviceName != null) {
- map['DeviceName'] = deviceName;
- }
- if (displayName != null) {
- map['DisplayName'] = displayName;
- }
- map['RecordStatus'] = recordStatus.index;
- if (patientInfoExtList != null) {
- map['PatientInfoExtList'] = patientInfoExtList;
- }
- map['DiagnosisStatus'] = diagnosisStatus.index;
- if (diagnosisInfos != null) {
- map['DiagnosisInfos'] = diagnosisInfos;
- }
- map['IsCollecting'] = isCollecting;
- if (startCollectingTime != null) {
- map['StartCollectingTime'] = JsonRpcUtils.dateFormat(startCollectingTime!);
- }
- if (customDoctor != null) {
- map['CustomDoctor'] = customDoctor;
- }
- if (customOrganzation != null) {
- map['CustomOrganzation'] = customOrganzation;
- }
- if (equipmentSN != null) {
- map['EquipmentSN'] = equipmentSN;
- }
- if (deviceOrganzationName != null) {
- map['DeviceOrganzationName'] = deviceOrganzationName;
- }
- map['IsReferral'] = isReferral;
- map['ReferralType'] = referralType.index;
- if (patientCode != null) {
- map['PatientCode'] = patientCode;
- }
- map['CanCreateReport'] = canCreateReport;
- if (examTime != null) {
- map['ExamTime'] = JsonRpcUtils.dateFormat(examTime!);
- }
- map['IsQualityControlled'] = isQualityControlled;
- map['Score'] = score;
- return map;
- }
- }
- class QueryRecordRequest extends TokenRequest{
- String? recordCode;
- QueryRecordRequest({
- this.recordCode,
- String? token,
- }) : super(
- token: token,
- );
- factory QueryRecordRequest.fromJson(Map<String, dynamic> map) {
- return QueryRecordRequest(
- recordCode: map['RecordCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (recordCode != null)
- map['RecordCode'] = recordCode;
- return map;
- }
- }
- class ProcessRecordDataResult {
- List<DataItemDTO>? content;
- ProcessRecordDataResult({
- this.content,
- });
- factory ProcessRecordDataResult.fromJson(Map<String, dynamic> map) {
- return ProcessRecordDataResult(
- content: map['Content'] != null ? (map['Content'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (content != null) {
- map['Content'] = content;
- }
- return map;
- }
- }
- enum AnimalSpeciesEnum {
- Bovine,
- Canidae,
- Equidae,
- Felidae,
- Caprinae,
- Suidae,
- }
- class ProcessRecordDataRequest extends TokenRequest{
- String? methodName;
- List<DataItemDTO>? content;
- OrganizationPatientTypeEnum patientType;
- AnimalSpeciesEnum speciesEnum;
- ProcessRecordDataRequest({
- this.methodName,
- this.content,
- this.patientType = OrganizationPatientTypeEnum.Person,
- this.speciesEnum = AnimalSpeciesEnum.Bovine,
- String? token,
- }) : super(
- token: token,
- );
- factory ProcessRecordDataRequest.fromJson(Map<String, dynamic> map) {
- return ProcessRecordDataRequest(
- methodName: map['MethodName'],
- content: map['Content'] != null ? (map['Content'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- patientType: OrganizationPatientTypeEnum.values.firstWhere((e) => e.index == map['PatientType']),
- speciesEnum: AnimalSpeciesEnum.values.firstWhere((e) => e.index == map['SpeciesEnum']),
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (methodName != null)
- map['MethodName'] = methodName;
- if (content != null)
- map['Content'] = content;
- map['PatientType'] = patientType.index;
- map['SpeciesEnum'] = speciesEnum.index;
- return map;
- }
- }
- class RelevanceRecordRequest extends TokenRequest{
- String? examCode;
- String? rservationCode;
- RelevanceRecordRequest({
- this.examCode,
- this.rservationCode,
- String? token,
- }) : super(
- token: token,
- );
- factory RelevanceRecordRequest.fromJson(Map<String, dynamic> map) {
- return RelevanceRecordRequest(
- examCode: map['ExamCode'],
- rservationCode: map['RservationCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (examCode != null)
- map['ExamCode'] = examCode;
- if (rservationCode != null)
- map['RservationCode'] = rservationCode;
- return map;
- }
- }
- class DeleteRecordRequest extends TokenRequest{
- String? recordCode;
- DeleteRecordRequest({
- this.recordCode,
- String? token,
- }) : super(
- token: token,
- );
- factory DeleteRecordRequest.fromJson(Map<String, dynamic> map) {
- return DeleteRecordRequest(
- recordCode: map['RecordCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (recordCode != null)
- map['RecordCode'] = recordCode;
- return map;
- }
- }
- class FinishRecordRequest extends TokenRequest{
- String? recordCode;
- FinishRecordRequest({
- this.recordCode,
- String? token,
- }) : super(
- token: token,
- );
- factory FinishRecordRequest.fromJson(Map<String, dynamic> map) {
- return FinishRecordRequest(
- recordCode: map['RecordCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (recordCode != null)
- map['RecordCode'] = recordCode;
- return map;
- }
- }
- class AddRemedicalMeasuredInfoDTO {
- String? remedicalCode;
- int frameIndex;
- String? measuredFileToken;
- String? previewFileToken;
- String? measuredData;
- AddRemedicalMeasuredInfoDTO({
- this.remedicalCode,
- this.frameIndex = 0,
- this.measuredFileToken,
- this.previewFileToken,
- this.measuredData,
- });
- factory AddRemedicalMeasuredInfoDTO.fromJson(Map<String, dynamic> map) {
- return AddRemedicalMeasuredInfoDTO(
- remedicalCode: map['RemedicalCode'],
- frameIndex: map['FrameIndex'],
- measuredFileToken: map['MeasuredFileToken'],
- previewFileToken: map['PreviewFileToken'],
- measuredData: map['MeasuredData'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (remedicalCode != null) {
- map['RemedicalCode'] = remedicalCode;
- }
- map['FrameIndex'] = frameIndex;
- if (measuredFileToken != null) {
- map['MeasuredFileToken'] = measuredFileToken;
- }
- if (previewFileToken != null) {
- map['PreviewFileToken'] = previewFileToken;
- }
- if (measuredData != null) {
- map['MeasuredData'] = measuredData;
- }
- return map;
- }
- }
- class AddRemedicalMeasuredInfoRequest extends TokenRequest{
- BusinessTypeEnum businessType;
- String? recordCode;
- List<AddRemedicalMeasuredInfoDTO>? remedicalMeasuredInfos;
- AddRemedicalMeasuredInfoRequest({
- this.businessType = BusinessTypeEnum.RemoteDiagnosis,
- this.recordCode,
- this.remedicalMeasuredInfos,
- String? token,
- }) : super(
- token: token,
- );
- factory AddRemedicalMeasuredInfoRequest.fromJson(Map<String, dynamic> map) {
- return AddRemedicalMeasuredInfoRequest(
- businessType: BusinessTypeEnum.values.firstWhere((e) => e.index == map['BusinessType']),
- recordCode: map['RecordCode'],
- remedicalMeasuredInfos: map['RemedicalMeasuredInfos'] != null ? (map['RemedicalMeasuredInfos'] as List).map((e)=>AddRemedicalMeasuredInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- map['BusinessType'] = businessType.index;
- if (recordCode != null)
- map['RecordCode'] = recordCode;
- if (remedicalMeasuredInfos != null)
- map['RemedicalMeasuredInfos'] = remedicalMeasuredInfos;
- return map;
- }
- }
- class FindRemedicalMeasuredInfoRequest extends TokenRequest{
- BusinessTypeEnum businessType;
- String? recordCode;
- FindRemedicalMeasuredInfoRequest({
- this.businessType = BusinessTypeEnum.RemoteDiagnosis,
- this.recordCode,
- String? token,
- }) : super(
- token: token,
- );
- factory FindRemedicalMeasuredInfoRequest.fromJson(Map<String, dynamic> map) {
- return FindRemedicalMeasuredInfoRequest(
- businessType: BusinessTypeEnum.values.firstWhere((e) => e.index == map['BusinessType']),
- recordCode: map['RecordCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- map['BusinessType'] = businessType.index;
- if (recordCode != null)
- map['RecordCode'] = recordCode;
- return map;
- }
- }
- class CheckCollectingImgRequest extends TokenRequest{
- String? deviceCode;
- CheckCollectingImgRequest({
- this.deviceCode,
- String? token,
- }) : super(
- token: token,
- );
- factory CheckCollectingImgRequest.fromJson(Map<String, dynamic> map) {
- return CheckCollectingImgRequest(
- deviceCode: map['DeviceCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (deviceCode != null)
- map['DeviceCode'] = deviceCode;
- return map;
- }
- }
- class StartCollectingImgRequest extends TokenRequest{
- String? recordCode;
- StartCollectingImgRequest({
- this.recordCode,
- String? token,
- }) : super(
- token: token,
- );
- factory StartCollectingImgRequest.fromJson(Map<String, dynamic> map) {
- return StartCollectingImgRequest(
- recordCode: map['RecordCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (recordCode != null)
- map['RecordCode'] = recordCode;
- return map;
- }
- }
- class SimpleRecordInfoDTO extends BaseDTO{
- String? recordCode;
- RecordStatusEnum recordStatus;
- ReferralTypeEnum referralType;
- String? patientCode;
- String? patientName;
- String? age;
- String? sex;
- String? devicePatientID;
- String? deviceCode;
- String? deviceName;
- String? deviceHeadPicUrl;
- String? rootOrganizationCode;
- String? rootOrganizationName;
- String? languge;
- bool canCreateReport;
- bool isCollecting;
- bool canCollcetImg;
- String? customDoctor;
- String? customOrganzation;
- String? equipmentSN;
- List<DiagnosisInfoDTO>? diagnosisInfos;
- bool isQualityControlled;
- double score;
- bool canScreenshot;
- SimpleRecordInfoDTO({
- this.recordCode,
- this.recordStatus = RecordStatusEnum.NotScanned,
- this.referralType = ReferralTypeEnum.Normal,
- this.patientCode,
- this.patientName,
- this.age,
- this.sex,
- this.devicePatientID,
- this.deviceCode,
- this.deviceName,
- this.deviceHeadPicUrl,
- this.rootOrganizationCode,
- this.rootOrganizationName,
- this.languge,
- this.canCreateReport = false,
- this.isCollecting = false,
- this.canCollcetImg = false,
- this.customDoctor,
- this.customOrganzation,
- this.equipmentSN,
- this.diagnosisInfos,
- this.isQualityControlled = false,
- this.score = 0,
- this.canScreenshot = false,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- createTime: createTime,
- updateTime: updateTime,
- );
- factory SimpleRecordInfoDTO.fromJson(Map<String, dynamic> map) {
- return SimpleRecordInfoDTO(
- recordCode: map['RecordCode'],
- recordStatus: RecordStatusEnum.values.firstWhere((e) => e.index == map['RecordStatus']),
- referralType: ReferralTypeEnum.values.firstWhere((e) => e.index == map['ReferralType']),
- patientCode: map['PatientCode'],
- patientName: map['PatientName'],
- age: map['Age'],
- sex: map['Sex'],
- devicePatientID: map['DevicePatientID'],
- deviceCode: map['DeviceCode'],
- deviceName: map['DeviceName'],
- deviceHeadPicUrl: map['DeviceHeadPicUrl'],
- rootOrganizationCode: map['RootOrganizationCode'],
- rootOrganizationName: map['RootOrganizationName'],
- languge: map['Languge'],
- canCreateReport: map['CanCreateReport'],
- isCollecting: map['IsCollecting'],
- canCollcetImg: map['CanCollcetImg'],
- customDoctor: map['CustomDoctor'],
- customOrganzation: map['CustomOrganzation'],
- equipmentSN: map['EquipmentSN'],
- diagnosisInfos: map['DiagnosisInfos'] != null ? (map['DiagnosisInfos'] as List).map((e)=>DiagnosisInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- isQualityControlled: map['IsQualityControlled'],
- score: double.parse(map['Score'].toString()),
- canScreenshot: map['CanScreenshot'],
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (recordCode != null)
- map['RecordCode'] = recordCode;
- map['RecordStatus'] = recordStatus.index;
- map['ReferralType'] = referralType.index;
- if (patientCode != null)
- map['PatientCode'] = patientCode;
- if (patientName != null)
- map['PatientName'] = patientName;
- if (age != null)
- map['Age'] = age;
- if (sex != null)
- map['Sex'] = sex;
- if (devicePatientID != null)
- map['DevicePatientID'] = devicePatientID;
- if (deviceCode != null)
- map['DeviceCode'] = deviceCode;
- if (deviceName != null)
- map['DeviceName'] = deviceName;
- if (deviceHeadPicUrl != null)
- map['DeviceHeadPicUrl'] = deviceHeadPicUrl;
- if (rootOrganizationCode != null)
- map['RootOrganizationCode'] = rootOrganizationCode;
- if (rootOrganizationName != null)
- map['RootOrganizationName'] = rootOrganizationName;
- if (languge != null)
- map['Languge'] = languge;
- map['CanCreateReport'] = canCreateReport;
- map['IsCollecting'] = isCollecting;
- map['CanCollcetImg'] = canCollcetImg;
- if (customDoctor != null)
- map['CustomDoctor'] = customDoctor;
- if (customOrganzation != null)
- map['CustomOrganzation'] = customOrganzation;
- if (equipmentSN != null)
- map['EquipmentSN'] = equipmentSN;
- if (diagnosisInfos != null)
- map['DiagnosisInfos'] = diagnosisInfos;
- map['IsQualityControlled'] = isQualityControlled;
- map['Score'] = score;
- map['CanScreenshot'] = canScreenshot;
- return map;
- }
- }
- enum RecordQueryStateEnum {
- All,
- NotScanned,
- Uploaded,
- NotReport,
- Completed,
- }
- enum RecordProcessStateEnum {
- All,
- Wait,
- Done,
- ReferralOut,
- }
- class FindRecordPagesRequest extends PageRequest{
- List<String>? organizationCodes;
- List<String>? deviceCodes;
- RecordQueryStateEnum recordQueryState;
- RecordProcessStateEnum recordProcessState;
- String? language;
- String? keyWord;
- DateTime? startTime;
- DateTime? endTime;
- String? patientCode;
- FindRecordPagesRequest({
- this.organizationCodes,
- this.deviceCodes,
- this.recordQueryState = RecordQueryStateEnum.All,
- this.recordProcessState = RecordProcessStateEnum.All,
- this.language,
- this.keyWord,
- this.startTime,
- this.endTime,
- this.patientCode,
- int pageIndex = 0,
- int pageSize = 0,
- String? token,
- }) : super(
- pageIndex: pageIndex,
- pageSize: pageSize,
- token: token,
- );
- factory FindRecordPagesRequest.fromJson(Map<String, dynamic> map) {
- return FindRecordPagesRequest(
- organizationCodes: map['OrganizationCodes']?.cast<String>().toList(),
- deviceCodes: map['DeviceCodes']?.cast<String>().toList(),
- recordQueryState: RecordQueryStateEnum.values.firstWhere((e) => e.index == map['RecordQueryState']),
- recordProcessState: RecordProcessStateEnum.values.firstWhere((e) => e.index == map['RecordProcessState']),
- language: map['Language'],
- keyWord: map['KeyWord'],
- startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
- endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
- patientCode: map['PatientCode'],
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (organizationCodes != null)
- map['OrganizationCodes'] = organizationCodes;
- if (deviceCodes != null)
- map['DeviceCodes'] = deviceCodes;
- map['RecordQueryState'] = recordQueryState.index;
- map['RecordProcessState'] = recordProcessState.index;
- if (language != null)
- map['Language'] = language;
- if (keyWord != null)
- map['KeyWord'] = keyWord;
- if (startTime != null)
- map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
- if (endTime != null)
- map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
- if (patientCode != null)
- map['PatientCode'] = patientCode;
- return map;
- }
- }
- class CreateRecordNewRequest extends TokenRequest{
- String? patientCode;
- List<DataItemDTO>? patientDatas;
- String? deviceCode;
- List<PatientInfoExt>? patientInfoExtList;
- CreateRecordNewRequest({
- this.patientCode,
- this.patientDatas,
- this.deviceCode,
- this.patientInfoExtList,
- String? token,
- }) : super(
- token: token,
- );
- factory CreateRecordNewRequest.fromJson(Map<String, dynamic> map) {
- return CreateRecordNewRequest(
- patientCode: map['PatientCode'],
- patientDatas: map['PatientDatas'] != null ? (map['PatientDatas'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- deviceCode: map['DeviceCode'],
- patientInfoExtList: map['PatientInfoExtList'] != null ? (map['PatientInfoExtList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map<String,dynamic>)).toList() : null,
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (patientCode != null)
- map['PatientCode'] = patientCode;
- if (patientDatas != null)
- map['PatientDatas'] = patientDatas;
- if (deviceCode != null)
- map['DeviceCode'] = deviceCode;
- if (patientInfoExtList != null)
- map['PatientInfoExtList'] = patientInfoExtList;
- return map;
- }
- }
- class CreateReferralRecordNewRequest extends TokenRequest{
- String? recordCode;
- String? referralOrganizationCode;
- String? referralUserCode;
- String? subjectMatter;
- CreateReferralRecordNewRequest({
- this.recordCode,
- this.referralOrganizationCode,
- this.referralUserCode,
- this.subjectMatter,
- String? token,
- }) : super(
- token: token,
- );
- factory CreateReferralRecordNewRequest.fromJson(Map<String, dynamic> map) {
- return CreateReferralRecordNewRequest(
- recordCode: map['RecordCode'],
- referralOrganizationCode: map['ReferralOrganizationCode'],
- referralUserCode: map['ReferralUserCode'],
- subjectMatter: map['SubjectMatter'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (recordCode != null)
- map['RecordCode'] = recordCode;
- if (referralOrganizationCode != null)
- map['ReferralOrganizationCode'] = referralOrganizationCode;
- if (referralUserCode != null)
- map['ReferralUserCode'] = referralUserCode;
- if (subjectMatter != null)
- map['SubjectMatter'] = subjectMatter;
- return map;
- }
- }
- class WithdrawReferralForRecordListRequest extends TokenRequest{
- String? recordCode;
- WithdrawReferralForRecordListRequest({
- this.recordCode,
- String? token,
- }) : super(
- token: token,
- );
- factory WithdrawReferralForRecordListRequest.fromJson(Map<String, dynamic> map) {
- return WithdrawReferralForRecordListRequest(
- recordCode: map['RecordCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (recordCode != null)
- map['RecordCode'] = recordCode;
- return map;
- }
- }
- enum RecordReferralStatusEnum {
- ReferralIn,
- Processed,
- Withdrawn,
- }
- class ReferralData extends BaseDTO{
- String? patientName;
- String? code;
- String? recordCode;
- String? referralOutUserCode;
- String? referralOutOrganizationCode;
- String? referralInUserCode;
- String? referralInOrganizationCode;
- RecordReferralStatusEnum referralStatus;
- DateTime? referralTime;
- String? subjectMatter;
- ReferralData({
- this.patientName,
- this.code,
- this.recordCode,
- this.referralOutUserCode,
- this.referralOutOrganizationCode,
- this.referralInUserCode,
- this.referralInOrganizationCode,
- this.referralStatus = RecordReferralStatusEnum.ReferralIn,
- this.referralTime,
- this.subjectMatter,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- createTime: createTime,
- updateTime: updateTime,
- );
- factory ReferralData.fromJson(Map<String, dynamic> map) {
- return ReferralData(
- patientName: map['PatientName'],
- code: map['Code'],
- recordCode: map['RecordCode'],
- referralOutUserCode: map['ReferralOutUserCode'],
- referralOutOrganizationCode: map['ReferralOutOrganizationCode'],
- referralInUserCode: map['ReferralInUserCode'],
- referralInOrganizationCode: map['ReferralInOrganizationCode'],
- referralStatus: RecordReferralStatusEnum.values.firstWhere((e) => e.index == map['ReferralStatus']),
- referralTime: map['ReferralTime'] != null ? DateTime.parse(map['ReferralTime']) : null,
- subjectMatter: map['SubjectMatter'],
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (patientName != null)
- map['PatientName'] = patientName;
- if (code != null)
- map['Code'] = code;
- if (recordCode != null)
- map['RecordCode'] = recordCode;
- if (referralOutUserCode != null)
- map['ReferralOutUserCode'] = referralOutUserCode;
- if (referralOutOrganizationCode != null)
- map['ReferralOutOrganizationCode'] = referralOutOrganizationCode;
- if (referralInUserCode != null)
- map['ReferralInUserCode'] = referralInUserCode;
- if (referralInOrganizationCode != null)
- map['ReferralInOrganizationCode'] = referralInOrganizationCode;
- map['ReferralStatus'] = referralStatus.index;
- if (referralTime != null)
- map['ReferralTime'] = JsonRpcUtils.dateFormat(referralTime!);
- if (subjectMatter != null)
- map['SubjectMatter'] = subjectMatter;
- return map;
- }
- }
- class ReferralHistoryDetail extends ReferralData{
- String? referralOutOrganizationName;
- String? referralOutUserName;
- String? referralInOrganizationName;
- String? referralInUserName;
- ReferralHistoryDetail({
- this.referralOutOrganizationName,
- this.referralOutUserName,
- this.referralInOrganizationName,
- this.referralInUserName,
- String? patientName,
- String? code,
- String? recordCode,
- String? referralOutUserCode,
- String? referralOutOrganizationCode,
- String? referralInUserCode,
- String? referralInOrganizationCode,
- RecordReferralStatusEnum referralStatus = RecordReferralStatusEnum.ReferralIn,
- DateTime? referralTime,
- String? subjectMatter,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- patientName: patientName,
- code: code,
- recordCode: recordCode,
- referralOutUserCode: referralOutUserCode,
- referralOutOrganizationCode: referralOutOrganizationCode,
- referralInUserCode: referralInUserCode,
- referralInOrganizationCode: referralInOrganizationCode,
- referralStatus: referralStatus,
- referralTime: referralTime,
- subjectMatter: subjectMatter,
- createTime: createTime,
- updateTime: updateTime,
- );
- factory ReferralHistoryDetail.fromJson(Map<String, dynamic> map) {
- return ReferralHistoryDetail(
- referralOutOrganizationName: map['ReferralOutOrganizationName'],
- referralOutUserName: map['ReferralOutUserName'],
- referralInOrganizationName: map['ReferralInOrganizationName'],
- referralInUserName: map['ReferralInUserName'],
- patientName: map['PatientName'],
- code: map['Code'],
- recordCode: map['RecordCode'],
- referralOutUserCode: map['ReferralOutUserCode'],
- referralOutOrganizationCode: map['ReferralOutOrganizationCode'],
- referralInUserCode: map['ReferralInUserCode'],
- referralInOrganizationCode: map['ReferralInOrganizationCode'],
- referralStatus: RecordReferralStatusEnum.values.firstWhere((e) => e.index == map['ReferralStatus']),
- referralTime: map['ReferralTime'] != null ? DateTime.parse(map['ReferralTime']) : null,
- subjectMatter: map['SubjectMatter'],
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (referralOutOrganizationName != null)
- map['ReferralOutOrganizationName'] = referralOutOrganizationName;
- if (referralOutUserName != null)
- map['ReferralOutUserName'] = referralOutUserName;
- if (referralInOrganizationName != null)
- map['ReferralInOrganizationName'] = referralInOrganizationName;
- if (referralInUserName != null)
- map['ReferralInUserName'] = referralInUserName;
- return map;
- }
- }
- class FindReferralHistoryRequest extends TokenRequest{
- String? recordCode;
- String? languageCode;
- FindReferralHistoryRequest({
- this.recordCode,
- this.languageCode,
- String? token,
- }) : super(
- token: token,
- );
- factory FindReferralHistoryRequest.fromJson(Map<String, dynamic> map) {
- return FindReferralHistoryRequest(
- recordCode: map['RecordCode'],
- languageCode: map['LanguageCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (recordCode != null)
- map['RecordCode'] = recordCode;
- if (languageCode != null)
- map['LanguageCode'] = languageCode;
- return map;
- }
- }
- class AddRemedicalQualityRequest extends TokenRequest{
- String? recordCode;
- String? remedicalCode;
- List<QualityControlScoreItem>? qualityControlScoreList;
- String? opinion;
- AddRemedicalQualityRequest({
- this.recordCode,
- this.remedicalCode,
- this.qualityControlScoreList,
- this.opinion,
- String? token,
- }) : super(
- token: token,
- );
- factory AddRemedicalQualityRequest.fromJson(Map<String, dynamic> map) {
- return AddRemedicalQualityRequest(
- recordCode: map['RecordCode'],
- remedicalCode: map['RemedicalCode'],
- qualityControlScoreList: map['QualityControlScoreList'] != null ? (map['QualityControlScoreList'] as List).map((e)=>QualityControlScoreItem.fromJson(e as Map<String,dynamic>)).toList() : null,
- opinion: map['Opinion'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (recordCode != null)
- map['RecordCode'] = recordCode;
- if (remedicalCode != null)
- map['RemedicalCode'] = remedicalCode;
- if (qualityControlScoreList != null)
- map['QualityControlScoreList'] = qualityControlScoreList;
- if (opinion != null)
- map['Opinion'] = opinion;
- return map;
- }
- }
- class ModifyRemedicalQualityRequest extends TokenRequest{
- String? recordCode;
- String? remedicalCode;
- List<QualityControlScoreItem>? qualityControlScoreList;
- String? opinion;
- ModifyRemedicalQualityRequest({
- this.recordCode,
- this.remedicalCode,
- this.qualityControlScoreList,
- this.opinion,
- String? token,
- }) : super(
- token: token,
- );
- factory ModifyRemedicalQualityRequest.fromJson(Map<String, dynamic> map) {
- return ModifyRemedicalQualityRequest(
- recordCode: map['RecordCode'],
- remedicalCode: map['RemedicalCode'],
- qualityControlScoreList: map['QualityControlScoreList'] != null ? (map['QualityControlScoreList'] as List).map((e)=>QualityControlScoreItem.fromJson(e as Map<String,dynamic>)).toList() : null,
- opinion: map['Opinion'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (recordCode != null)
- map['RecordCode'] = recordCode;
- if (remedicalCode != null)
- map['RemedicalCode'] = remedicalCode;
- if (qualityControlScoreList != null)
- map['QualityControlScoreList'] = qualityControlScoreList;
- if (opinion != null)
- map['Opinion'] = opinion;
- return map;
- }
- }
- class DeleteRemedicalQualityRequest extends TokenRequest{
- String? recordCode;
- String? remedicalCode;
- DeleteRemedicalQualityRequest({
- this.recordCode,
- this.remedicalCode,
- String? token,
- }) : super(
- token: token,
- );
- factory DeleteRemedicalQualityRequest.fromJson(Map<String, dynamic> map) {
- return DeleteRemedicalQualityRequest(
- recordCode: map['RecordCode'],
- remedicalCode: map['RemedicalCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (recordCode != null)
- map['RecordCode'] = recordCode;
- if (remedicalCode != null)
- map['RemedicalCode'] = remedicalCode;
- return map;
- }
- }
- class AddRecordReportQualityRequest extends TokenRequest{
- String? recordCode;
- String? reportCode;
- List<QualityControlScoreItem>? qualityControlScoreList;
- String? opinion;
- AddRecordReportQualityRequest({
- this.recordCode,
- this.reportCode,
- this.qualityControlScoreList,
- this.opinion,
- String? token,
- }) : super(
- token: token,
- );
- factory AddRecordReportQualityRequest.fromJson(Map<String, dynamic> map) {
- return AddRecordReportQualityRequest(
- recordCode: map['RecordCode'],
- reportCode: map['ReportCode'],
- qualityControlScoreList: map['QualityControlScoreList'] != null ? (map['QualityControlScoreList'] as List).map((e)=>QualityControlScoreItem.fromJson(e as Map<String,dynamic>)).toList() : null,
- opinion: map['Opinion'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (recordCode != null)
- map['RecordCode'] = recordCode;
- if (reportCode != null)
- map['ReportCode'] = reportCode;
- if (qualityControlScoreList != null)
- map['QualityControlScoreList'] = qualityControlScoreList;
- if (opinion != null)
- map['Opinion'] = opinion;
- return map;
- }
- }
- class ModifyRecordReportQualityRequest extends TokenRequest{
- String? recordCode;
- String? reportCode;
- List<QualityControlScoreItem>? qualityControlScoreList;
- String? opinion;
- ModifyRecordReportQualityRequest({
- this.recordCode,
- this.reportCode,
- this.qualityControlScoreList,
- this.opinion,
- String? token,
- }) : super(
- token: token,
- );
- factory ModifyRecordReportQualityRequest.fromJson(Map<String, dynamic> map) {
- return ModifyRecordReportQualityRequest(
- recordCode: map['RecordCode'],
- reportCode: map['ReportCode'],
- qualityControlScoreList: map['QualityControlScoreList'] != null ? (map['QualityControlScoreList'] as List).map((e)=>QualityControlScoreItem.fromJson(e as Map<String,dynamic>)).toList() : null,
- opinion: map['Opinion'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (recordCode != null)
- map['RecordCode'] = recordCode;
- if (reportCode != null)
- map['ReportCode'] = reportCode;
- if (qualityControlScoreList != null)
- map['QualityControlScoreList'] = qualityControlScoreList;
- if (opinion != null)
- map['Opinion'] = opinion;
- return map;
- }
- }
- class DeleteRecordReportQualityRequest extends TokenRequest{
- String? recordCode;
- String? reportCode;
- DeleteRecordReportQualityRequest({
- this.recordCode,
- this.reportCode,
- String? token,
- }) : super(
- token: token,
- );
- factory DeleteRecordReportQualityRequest.fromJson(Map<String, dynamic> map) {
- return DeleteRecordReportQualityRequest(
- recordCode: map['RecordCode'],
- reportCode: map['ReportCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (recordCode != null)
- map['RecordCode'] = recordCode;
- if (reportCode != null)
- map['ReportCode'] = reportCode;
- return map;
- }
- }
|