123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510 |
- 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<PatientInfoExt >? patientInfoExtList;
- CreateRecordRequest({
- this.patientCode,
- this.deviceCode,
- this.patientInfoExtList,
- String? token,
- }) : super(
- token: token,
- );
- factory CreateRecordRequest.fromJson(Map<String, dynamic> map) {
- return CreateRecordRequest(
- patientCode: map['PatientCode'],
- 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(deviceCode != null)
- map['DeviceCode'] = deviceCode;
- if(patientInfoExtList != null)
- map['PatientInfoExtList'] = patientInfoExtList;
- 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;
- }
- }
- 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;
- 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,
- });
- 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,
- );
- }
- 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!);
- 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 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;
- }
- }
|