123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454 |
- import 'authentication.m.dart';
- import 'patient.m.dart';
- import 'recordInfo.m.dart';
- import 'connect.m.dart';
- import 'organization.m.dart';
- import 'package:fis_jsonrpc/utils.dart';
- class CreateExaminfoResult {
- String? examCode;
- CreateExaminfoResult({
- this.examCode,
- });
- factory CreateExaminfoResult.fromJson(Map<String, dynamic> map) {
- return CreateExaminfoResult(
- examCode: map['ExamCode'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(examCode != null)
- map['ExamCode'] = examCode;
- return map;
- }
- }
- class CreateExaminfoRequest extends TokenRequest{
- String? patientType;
- String? reservationCode;
- List<DataItemDTO>? patientInfo;
- List<PatientInfoExt>? patientScanInfoList;
- CreateExaminfoRequest({
- this.patientType,
- this.reservationCode,
- this.patientInfo,
- this.patientScanInfoList,
- String? token,
- }) : super(
- token: token,
- );
- factory CreateExaminfoRequest.fromJson(Map<String, dynamic> map) {
- return CreateExaminfoRequest(
- patientType: map['PatientType'],
- reservationCode: map['ReservationCode'],
- patientInfo: map['PatientInfo'] != null ? (map['PatientInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- patientScanInfoList: map['PatientScanInfoList'] != null ? (map['PatientScanInfoList'] 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(patientType != null)
- map['PatientType'] = patientType;
- if(reservationCode != null)
- map['ReservationCode'] = reservationCode;
- if(patientInfo != null)
- map['PatientInfo'] = patientInfo;
- if(patientScanInfoList != null)
- map['PatientScanInfoList'] = patientScanInfoList;
- return map;
- }
- }
- class UploadExamDataRequest extends TokenRequest{
- String? examCode;
- String? previewFileToken;
- String? fileToken;
- String? application;
- String? patientScanType;
- UploadExamDataRequest({
- this.examCode,
- this.previewFileToken,
- this.fileToken,
- this.application,
- this.patientScanType,
- String? token,
- }) : super(
- token: token,
- );
- factory UploadExamDataRequest.fromJson(Map<String, dynamic> map) {
- return UploadExamDataRequest(
- examCode: map['ExamCode'],
- previewFileToken: map['PreviewFileToken'],
- fileToken: map['FileToken'],
- application: map['Application'],
- patientScanType: map['PatientScanType'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(examCode != null)
- map['ExamCode'] = examCode;
- if(previewFileToken != null)
- map['PreviewFileToken'] = previewFileToken;
- if(fileToken != null)
- map['FileToken'] = fileToken;
- if(application != null)
- map['Application'] = application;
- if(patientScanType != null)
- map['PatientScanType'] = patientScanType;
- return map;
- }
- }
- class TerminalImageDTO {
- String? previewUrl;
- String? imageUrl;
- TerminalImageDTO({
- this.previewUrl,
- this.imageUrl,
- });
- factory TerminalImageDTO.fromJson(Map<String, dynamic> map) {
- return TerminalImageDTO(
- previewUrl: map['PreviewUrl'],
- imageUrl: map['ImageUrl'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(previewUrl != null)
- map['PreviewUrl'] = previewUrl;
- if(imageUrl != null)
- map['ImageUrl'] = imageUrl;
- return map;
- }
- }
- enum RemedicalFileDataTypeEnum {
- VinnoVidSingle,
- ThirdVidSingle,
- VinnoVidMovie,
- ThirdVidMovie,
- Image,
- }
- enum RemedicalImageLocationTypeEnum {
- BreastImageLocation,
- LiverImageLocation,
- ThyroidImageLocation,
- PositionImageLocation,
- }
- enum RemedicalImagePositionTypeEnum {
- None,
- Left,
- Right,
- Middle,
- }
- enum RemedicalApparatusTypeEnum {
- BreastOuterUpper,
- BreastInnerUpper,
- BreastOuterLower,
- BreastInnerLower,
- Lobe,
- LobeOfUnder,
- LobeOfInter,
- Thyroid,
- Abdomen,
- }
- class ImageLocationDTO {
- RemedicalImageLocationTypeEnum imageLocationType;
- RemedicalImagePositionTypeEnum position;
- String? scanLocationName;
- RemedicalApparatusTypeEnum apparatusType;
- ImageLocationDTO({
- this.imageLocationType = RemedicalImageLocationTypeEnum.BreastImageLocation,
- this.position = RemedicalImagePositionTypeEnum.None,
- this.scanLocationName,
- this.apparatusType = RemedicalApparatusTypeEnum.BreastOuterUpper,
- });
- factory ImageLocationDTO.fromJson(Map<String, dynamic> map) {
- return ImageLocationDTO(
- imageLocationType: RemedicalImageLocationTypeEnum.values.firstWhere((e) => e.index == map['ImageLocationType']),
- position: RemedicalImagePositionTypeEnum.values.firstWhere((e) => e.index == map['Position']),
- scanLocationName: map['ScanLocationName'],
- apparatusType: RemedicalApparatusTypeEnum.values.firstWhere((e) => e.index == map['ApparatusType']),
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- map['ImageLocationType'] = imageLocationType.index;
- map['Position'] = position.index;
- if(scanLocationName != null)
- map['ScanLocationName'] = scanLocationName;
- map['ApparatusType'] = apparatusType.index;
- return map;
- }
- }
- enum RemedicalAIDiagnosisStatusEnum {
- Null,
- NoObviousLesion,
- Benign,
- Malignant,
- BenignAndMalignant,
- }
- class RemedicalInfoDTO extends BaseDTO{
- String? remedicalCode;
- String? patientCode;
- String? recordCode;
- String? patientScanType;
- String? application;
- TerminalImageDTO? terminalImages;
- RemedicalFileDataTypeEnum fileDataType;
- ImageLocationDTO? imageLocation;
- RemedicalAIDiagnosisStatusEnum aIDiagnosisStatus;
- RemedicalInfoDTO({
- this.remedicalCode,
- this.patientCode,
- this.recordCode,
- this.patientScanType,
- this.application,
- this.terminalImages,
- this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
- this.imageLocation,
- this.aIDiagnosisStatus = RemedicalAIDiagnosisStatusEnum.Null,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- createTime: createTime,
- updateTime: updateTime,
- );
- factory RemedicalInfoDTO.fromJson(Map<String, dynamic> map) {
- return RemedicalInfoDTO(
- remedicalCode: map['RemedicalCode'],
- patientCode: map['PatientCode'],
- recordCode: map['RecordCode'],
- patientScanType: map['PatientScanType'],
- application: map['Application'],
- terminalImages: map['TerminalImages'],
- fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
- imageLocation: map['ImageLocation'],
- aIDiagnosisStatus: RemedicalAIDiagnosisStatusEnum.values.firstWhere((e) => e.index == map['AIDiagnosisStatus']),
- 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(remedicalCode != null)
- map['RemedicalCode'] = remedicalCode;
- if(patientCode != null)
- map['PatientCode'] = patientCode;
- if(recordCode != null)
- map['RecordCode'] = recordCode;
- if(patientScanType != null)
- map['PatientScanType'] = patientScanType;
- if(application != null)
- map['Application'] = application;
- if(terminalImages != null)
- map['TerminalImages'] = terminalImages;
- map['FileDataType'] = fileDataType.index;
- if(imageLocation != null)
- map['ImageLocation'] = imageLocation;
- map['AIDiagnosisStatus'] = aIDiagnosisStatus.index;
- return map;
- }
- }
- class RemedicalItemList {
- String? patientScanTypeDesc;
- List<RemedicalInfoDTO>? remedicalList;
- RemedicalItemList({
- this.patientScanTypeDesc,
- this.remedicalList,
- });
- factory RemedicalItemList.fromJson(Map<String, dynamic> map) {
- return RemedicalItemList(
- patientScanTypeDesc: map['PatientScanTypeDesc'],
- remedicalList: map['RemedicalList'] != null ? (map['RemedicalList'] as List).map((e)=>RemedicalInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(patientScanTypeDesc != null)
- map['PatientScanTypeDesc'] = patientScanTypeDesc;
- if(remedicalList != null)
- map['RemedicalList'] = remedicalList;
- return map;
- }
- }
- class RemedicalListResult {
- String? sacnDate;
- String? recordCode;
- List<RemedicalItemList>? remedicalItemList;
- RemedicalListResult({
- this.sacnDate,
- this.recordCode,
- this.remedicalItemList,
- });
- factory RemedicalListResult.fromJson(Map<String, dynamic> map) {
- return RemedicalListResult(
- sacnDate: map['SacnDate'],
- recordCode: map['RecordCode'],
- remedicalItemList: map['RemedicalItemList'] != null ? (map['RemedicalItemList'] as List).map((e)=>RemedicalItemList.fromJson(e as Map<String,dynamic>)).toList() : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(sacnDate != null)
- map['SacnDate'] = sacnDate;
- if(recordCode != null)
- map['RecordCode'] = recordCode;
- if(remedicalItemList != null)
- map['RemedicalItemList'] = remedicalItemList;
- return map;
- }
- }
- enum QueryDropdownListEnum {
- Org,
- }
- class QueryDropdownListReuqest extends TokenRequest{
- QueryDropdownListEnum queryType;
- String? queryValue;
- QueryDropdownListReuqest({
- this.queryType = QueryDropdownListEnum.Org,
- this.queryValue,
- String? token,
- }) : super(
- token: token,
- );
- factory QueryDropdownListReuqest.fromJson(Map<String, dynamic> map) {
- return QueryDropdownListReuqest(
- queryType: QueryDropdownListEnum.values.firstWhere((e) => e.index == map['QueryType']),
- queryValue: map['QueryValue'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- map['QueryType'] = queryType.index;
- if(queryValue != null)
- map['QueryValue'] = queryValue;
- return map;
- }
- }
- class RservationResult {
- String? reservationCode;
- List<DataItemDTO>? patientInfo;
- List<PatientInfoExt>? patientInfoExtList;
- String? dataSource;
- RservationResult({
- this.reservationCode,
- this.patientInfo,
- this.patientInfoExtList,
- this.dataSource,
- });
- factory RservationResult.fromJson(Map<String, dynamic> map) {
- return RservationResult(
- reservationCode: map['ReservationCode'],
- patientInfo: map['PatientInfo'] != null ? (map['PatientInfo'] 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,
- dataSource: map['DataSource'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(reservationCode != null)
- map['ReservationCode'] = reservationCode;
- if(patientInfo != null)
- map['PatientInfo'] = patientInfo;
- if(patientInfoExtList != null)
- map['PatientInfoExtList'] = patientInfoExtList;
- if(dataSource != null)
- map['DataSource'] = dataSource;
- return map;
- }
- }
- class QueryReservationResult {
- List<RservationResult>? reservationList;
- QueryReservationResult({
- this.reservationList,
- });
- factory QueryReservationResult.fromJson(Map<String, dynamic> map) {
- return QueryReservationResult(
- reservationList: map['ReservationList'] != null ? (map['ReservationList'] as List).map((e)=>RservationResult.fromJson(e as Map<String,dynamic>)).toList() : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(reservationList != null)
- map['ReservationList'] = reservationList;
- return map;
- }
- }
- class QueryReservationRequest extends TokenRequest{
- DateTime? createTime;
- QueryReservationRequest({
- this.createTime,
- String? token,
- }) : super(
- token: token,
- );
- factory QueryReservationRequest.fromJson(Map<String, dynamic> map) {
- return QueryReservationRequest(
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(createTime != null)
- map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
- return map;
- }
- }
|