123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862 |
- const aliasOfFetchTwoWorks = 'getTwoStudy';
- export const FetchTwoWorks = `@${aliasOfFetchTwoWorks}`;
- // 删除Study的alias
- const aliasOfDeleteStudy = 'deleteStudy';
- export const DeleteStudy = `@${aliasOfDeleteStudy}`;
- // 原有的mock函数
- export function mockFetchTwoWorks() {
- cy.intercept('GET', '/dr/api/v1/auth/study*', {
- statusCode: 200,
- body: {
- "code": "0x000000",
- "description": "Success",
- "solution": "",
- "data": {
- "@type": "type.googleapis.com/dr.study.StudyList",
- "count": 1992,
- "studies": [
- {
- "study_instance_uid": "2.25.156.999999.0000.1.2.2831189249.819691.1757656379.100635",
- "study_id": "20250912135259444",
- "public_study_id": "",
- "specific_character_set": "ISO_IR 192",
- "accession_number": "ACC0012345",
- "ref_physician": "Dr. Smith (Vet)",
- "patient_id": "PET007",
- "patient_name": "乾隆-==皇上",
- "patient_english_name": "Buddy en",
- "patient_former_name": "Buddy f",
- "patient_size": "Large",
- "other_patient_ids": "",
- "other_patient_names": "",
- "patient_age": "5Y",
- "patient_dob": "2025-06-10T03:12:36.181739Z",
- "patient_sex": "M",
- "sex_neutered": "",
- "pregnancy_status": "",
- "patient_state": "",
- "admitting_time": null,
- "priority": "",
- "reg_source": "",
- "study_description": "",
- "study_start_datetime": "2025-09-12T05:52:59.699143Z",
- "study_end_datetime": null,
- "scheduled_procedure_step_start_date": null,
- "performed_physician": "",
- "study_lock": "Unlocked",
- "folder_path": "",
- "operator_name": "OP987",
- "modality": "DX",
- "weight": 25,
- "thickness": 15,
- "length": 60,
- "patient_type": "Human",
- "study_type": "Normal",
- "owner_name": "owner1",
- "chip_number": "CHIP123456789",
- "variety": "Golden Retriever",
- "is_anaesthesia": true,
- "is_sedation": true,
- "mwl": "",
- "is_exported": false,
- "is_edited": false,
- "is_appended": false,
- "department": "",
- "mapped_status": false,
- "qc_result": false,
- "comment": "一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四",
- "study_status": "Arrived",
- "sort": 0,
- "product": "DROS",
- "series": []
- },
- {
- "study_instance_uid": "2.25.156.999999.0000.1.2.2831189249.819691.1757656379.100627",
- "study_id": "20250912135259265",
- "public_study_id": "",
- "specific_character_set": "ISO_IR 192",
- "accession_number": "ACC0012345",
- "ref_physician": "Dr. Smith (Vet)",
- "patient_id": "PET007",
- "patient_name": "Buddy (Dog)",
- "patient_english_name": "Buddy en",
- "patient_former_name": "Buddy f",
- "patient_size": "Large",
- "other_patient_ids": "",
- "other_patient_names": "",
- "patient_age": "5Y",
- "patient_dob": "2025-06-10T03:12:36.181739Z",
- "patient_sex": "M",
- "sex_neutered": "",
- "pregnancy_status": "",
- "patient_state": "",
- "admitting_time": null,
- "priority": "",
- "reg_source": "",
- "study_description": "",
- "study_start_datetime": "2025-09-12T05:52:59.573182Z",
- "study_end_datetime": null,
- "scheduled_procedure_step_start_date": null,
- "performed_physician": "",
- "study_lock": "Unlocked",
- "folder_path": "",
- "operator_name": "OP987",
- "modality": "DX",
- "weight": 25,
- "thickness": 15,
- "length": 60,
- "patient_type": "Human",
- "study_type": "Normal",
- "owner_name": "owner1",
- "chip_number": "CHIP123456789",
- "variety": "Golden Retriever",
- "is_anaesthesia": true,
- "is_sedation": true,
- "mwl": "",
- "is_exported": false,
- "is_edited": false,
- "is_appended": false,
- "department": "",
- "mapped_status": false,
- "qc_result": false,
- "comment": "一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四",
- "study_status": "Arrived",
- "sort": 0,
- "product": "DROS",
- "series": []
- },
- ]
- }
- }
- }).as(aliasOfFetchTwoWorks);
- }
- /**
- * Mock: 返回2条记录,第一条未锁定
- */
- const aliasOfFetchTwoWorksWithUnlocked = 'getTwoWorksUnlocked';
- export const FetchTwoWorksWithUnlocked = `@${aliasOfFetchTwoWorksWithUnlocked}`;
- export function mockFetchTwoWorksWithUnlocked() {
- cy.intercept('GET', '/dr/api/v1/auth/study*', {
- statusCode: 200,
- body: {
- code: '0x000000',
- description: 'Success',
- solution: '',
- data: {
- '@type': 'type.googleapis.com/dr.study.StudyList',
- count: 2,
- studies: [
- {
- study_instance_uid:
- '2.25.156.999999.0000.1.2.2831189249.819691.1757656379.100635',
- study_id: '20250912135259444',
- public_study_id: '',
- specific_character_set: 'ISO_IR 192',
- accession_number: 'ACC0012345',
- ref_physician: 'Dr. Smith (Vet)',
- patient_id: 'PET007',
- patient_name: '测试患者1',
- patient_english_name: 'Test Patient 1',
- patient_former_name: '',
- patient_size: 'Large',
- other_patient_ids: '',
- other_patient_names: '',
- patient_age: '5Y',
- patient_dob: '2025-06-10T03:12:36.181739Z',
- patient_sex: 'M',
- sex_neutered: '',
- pregnancy_status: '',
- patient_state: '',
- admitting_time: null,
- priority: '',
- reg_source: '',
- study_description: '',
- study_start_datetime: '2025-09-12T05:52:59.699143Z',
- study_end_datetime: null,
- scheduled_procedure_step_start_date: null,
- performed_physician: '',
- study_lock: 'Unlocked', // 未锁定
- folder_path: '',
- operator_name: 'OP987',
- modality: 'DX',
- weight: 25,
- thickness: 15,
- length: 60,
- patient_type: 'Human',
- study_type: 'Normal',
- owner_name: 'owner1',
- chip_number: 'CHIP123456789',
- variety: 'Golden Retriever',
- is_anaesthesia: true,
- is_sedation: true,
- mwl: '',
- is_exported: false,
- is_edited: false,
- is_appended: false,
- department: '',
- mapped_status: false,
- qc_result: false,
- comment: '测试记录1',
- study_status: 'Arrived',
- sort: 0,
- product: 'DROS',
- series: [],
- },
- {
- study_instance_uid:
- '2.25.156.999999.0000.1.2.2831189249.819691.1757656379.100627',
- study_id: '20250912135259265',
- public_study_id: '',
- specific_character_set: 'ISO_IR 192',
- accession_number: 'ACC0012346',
- ref_physician: 'Dr. Smith (Vet)',
- patient_id: 'PET008',
- patient_name: '测试患者2',
- patient_english_name: 'Test Patient 2',
- patient_former_name: '',
- patient_size: 'Large',
- other_patient_ids: '',
- other_patient_names: '',
- patient_age: '3Y',
- patient_dob: '2025-06-10T03:12:36.181739Z',
- patient_sex: 'F',
- sex_neutered: '',
- pregnancy_status: '',
- patient_state: '',
- admitting_time: null,
- priority: '',
- reg_source: '',
- study_description: '',
- study_start_datetime: '2025-09-12T05:52:59.573182Z',
- study_end_datetime: null,
- scheduled_procedure_step_start_date: null,
- performed_physician: '',
- study_lock: 'Unlocked', // 未锁定
- folder_path: '',
- operator_name: 'OP987',
- modality: 'DX',
- weight: 25,
- thickness: 15,
- length: 60,
- patient_type: 'Human',
- study_type: 'Normal',
- owner_name: 'owner1',
- chip_number: 'CHIP123456789',
- variety: 'Golden Retriever',
- is_anaesthesia: true,
- is_sedation: true,
- mwl: '',
- is_exported: false,
- is_edited: false,
- is_appended: false,
- department: '',
- mapped_status: false,
- qc_result: false,
- comment: '测试记录2',
- study_status: 'Arrived',
- sort: 0,
- product: 'DROS',
- series: [],
- },
- ],
- },
- },
- }).as(aliasOfFetchTwoWorksWithUnlocked);
- }
- /**
- * Mock: 返回2条记录,第一条已锁定
- */
- const aliasOfFetchTwoWorksWithLocked = 'getTwoWorksLocked';
- export const FetchTwoWorksWithLocked = `@${aliasOfFetchTwoWorksWithLocked}`;
- export function mockFetchTwoWorksWithLocked() {
- cy.intercept('GET', '/dr/api/v1/auth/study*', {
- statusCode: 200,
- body: {
- code: '0x000000',
- description: 'Success',
- solution: '',
- data: {
- '@type': 'type.googleapis.com/dr.study.StudyList',
- count: 2,
- studies: [
- {
- study_instance_uid:
- '2.25.156.999999.0000.1.2.2831189249.819691.1757656379.100635',
- study_id: '20250912135259444',
- public_study_id: '',
- specific_character_set: 'ISO_IR 192',
- accession_number: 'ACC0012345',
- ref_physician: 'Dr. Smith (Vet)',
- patient_id: 'PET007',
- patient_name: '测试患者1',
- patient_english_name: 'Test Patient 1',
- patient_former_name: '',
- patient_size: 'Large',
- other_patient_ids: '',
- other_patient_names: '',
- patient_age: '5Y',
- patient_dob: '2025-06-10T03:12:36.181739Z',
- patient_sex: 'M',
- sex_neutered: '',
- pregnancy_status: '',
- patient_state: '',
- admitting_time: null,
- priority: '',
- reg_source: '',
- study_description: '',
- study_start_datetime: '2025-09-12T05:52:59.699143Z',
- study_end_datetime: null,
- scheduled_procedure_step_start_date: null,
- performed_physician: '',
- study_lock: 'Locked', // 已锁定
- folder_path: '',
- operator_name: 'OP987',
- modality: 'DX',
- weight: 25,
- thickness: 15,
- length: 60,
- patient_type: 'Human',
- study_type: 'Normal',
- owner_name: 'owner1',
- chip_number: 'CHIP123456789',
- variety: 'Golden Retriever',
- is_anaesthesia: true,
- is_sedation: true,
- mwl: '',
- is_exported: false,
- is_edited: false,
- is_appended: false,
- department: '',
- mapped_status: false,
- qc_result: false,
- comment: '测试记录1-已锁定',
- study_status: 'Arrived',
- sort: 0,
- product: 'DROS',
- series: [],
- },
- {
- study_instance_uid:
- '2.25.156.999999.0000.1.2.2831189249.819691.1757656379.100627',
- study_id: '20250912135259265',
- public_study_id: '',
- specific_character_set: 'ISO_IR 192',
- accession_number: 'ACC0012346',
- ref_physician: 'Dr. Smith (Vet)',
- patient_id: 'PET008',
- patient_name: '测试患者2',
- patient_english_name: 'Test Patient 2',
- patient_former_name: '',
- patient_size: 'Large',
- other_patient_ids: '',
- other_patient_names: '',
- patient_age: '3Y',
- patient_dob: '2025-06-10T03:12:36.181739Z',
- patient_sex: 'F',
- sex_neutered: '',
- pregnancy_status: '',
- patient_state: '',
- admitting_time: null,
- priority: '',
- reg_source: '',
- study_description: '',
- study_start_datetime: '2025-09-12T05:52:59.573182Z',
- study_end_datetime: null,
- scheduled_procedure_step_start_date: null,
- performed_physician: '',
- study_lock: 'Unlocked', // 未锁定
- folder_path: '',
- operator_name: 'OP987',
- modality: 'DX',
- weight: 25,
- thickness: 15,
- length: 60,
- patient_type: 'Human',
- study_type: 'Normal',
- owner_name: 'owner1',
- chip_number: 'CHIP123456789',
- variety: 'Golden Retriever',
- is_anaesthesia: true,
- is_sedation: true,
- mwl: '',
- is_exported: false,
- is_edited: false,
- is_appended: false,
- department: '',
- mapped_status: false,
- qc_result: false,
- comment: '测试记录2',
- study_status: 'Arrived',
- sort: 0,
- product: 'DROS',
- series: [],
- },
- ],
- },
- },
- }).as(aliasOfFetchTwoWorksWithLocked);
- }
- /**
- * Mock: 删除后返回1条记录
- */
- const aliasOfFetchWorklistAfterDelete = 'getWorklistAfterDelete';
- export const FetchWorklistAfterDelete = `@${aliasOfFetchWorklistAfterDelete}`;
- export function mockFetchWorklistAfterDelete() {
- cy.intercept('GET', '/dr/api/v1/auth/study*', {
- statusCode: 200,
- body: {
- code: '0x000000',
- description: 'Success',
- solution: '',
- data: {
- '@type': 'type.googleapis.com/dr.study.StudyList',
- count: 1,
- studies: [
- {
- study_instance_uid:
- '2.25.156.999999.0000.1.2.2831189249.819691.1757656379.100627',
- study_id: '20250912135259265',
- public_study_id: '',
- specific_character_set: 'ISO_IR 192',
- accession_number: 'ACC0012346',
- ref_physician: 'Dr. Smith (Vet)',
- patient_id: 'PET008',
- patient_name: '测试患者2',
- patient_english_name: 'Test Patient 2',
- patient_former_name: '',
- patient_size: 'Large',
- other_patient_ids: '',
- other_patient_names: '',
- patient_age: '3Y',
- patient_dob: '2025-06-10T03:12:36.181739Z',
- patient_sex: 'F',
- sex_neutered: '',
- pregnancy_status: '',
- patient_state: '',
- admitting_time: null,
- priority: '',
- reg_source: '',
- study_description: '',
- study_start_datetime: '2025-09-12T05:52:59.573182Z',
- study_end_datetime: null,
- scheduled_procedure_step_start_date: null,
- performed_physician: '',
- study_lock: 'Unlocked',
- folder_path: '',
- operator_name: 'OP987',
- modality: 'DX',
- weight: 25,
- thickness: 15,
- length: 60,
- patient_type: 'Human',
- study_type: 'Normal',
- owner_name: 'owner1',
- chip_number: 'CHIP123456789',
- variety: 'Golden Retriever',
- is_anaesthesia: true,
- is_sedation: true,
- mwl: '',
- is_exported: false,
- is_edited: false,
- is_appended: false,
- department: '',
- mapped_status: false,
- qc_result: false,
- comment: '测试记录2',
- study_status: 'Arrived',
- sort: 0,
- product: 'DROS',
- series: [],
- },
- ],
- },
- },
- }).as(aliasOfFetchWorklistAfterDelete);
- }
- /**
- * Mock: 删除Study成功
- */
- export function mockDeleteStudySuccess() {
- cy.intercept('DELETE', '/dr/api/v1/auth/study', {
- statusCode: 200,
- body: {
- code: '0x000000',
- description: '删除成功',
- solution: '',
- data: {},
- },
- }).as(aliasOfDeleteStudy);
- }
- /**
- * Mock: 删除Study失败
- */
- export function mockDeleteStudyFailure() {
- cy.intercept('DELETE', '/dr/api/v1/auth/study', {
- statusCode: 200,
- body: {
- code: '0x000001',
- description: '删除失败',
- solution: '请稍后重试',
- data: {},
- },
- }).as(aliasOfDeleteStudy);
- }
- /**
- * Mock: History数据 - 2条记录,第一条未锁定
- */
- const aliasOfFetchHistoryDataWithUnlocked = 'getHistoryUnlocked';
- export const FetchHistoryDataWithUnlocked = `@${aliasOfFetchHistoryDataWithUnlocked}`;
- export function mockFetchHistoryDataWithUnlocked() {
- cy.intercept('GET', '/dr/api/v1/auth/study*', {
- statusCode: 200,
- body: {
- code: '0x000000',
- description: 'Success',
- solution: '',
- data: {
- '@type': 'type.googleapis.com/dr.study.StudyList',
- count: 2,
- studies: [
- {
- study_instance_uid:
- '2.25.156.999999.0000.1.2.2831189249.819691.1757656379.200001',
- study_id: 'HIST20250912001',
- public_study_id: '',
- specific_character_set: 'ISO_IR 192',
- accession_number: 'HIST001',
- ref_physician: 'Dr. Johnson',
- patient_id: 'HIST001',
- patient_name: 'History患者1',
- patient_english_name: 'History Patient 1',
- patient_former_name: '',
- patient_size: 'Medium',
- other_patient_ids: '',
- other_patient_names: '',
- patient_age: '40Y',
- patient_dob: '1985-01-01T00:00:00Z',
- patient_sex: 'M',
- sex_neutered: '',
- pregnancy_status: '',
- patient_state: '',
- admitting_time: null,
- priority: '',
- reg_source: '',
- study_description: '',
- study_start_datetime: '2025-09-01T08:00:00Z',
- study_end_datetime: '2025-09-01T09:00:00Z',
- scheduled_procedure_step_start_date: null,
- performed_physician: '',
- study_lock: 'Unlocked', // 未锁定
- folder_path: '',
- operator_name: 'OP001',
- modality: 'DX',
- weight: 70,
- thickness: 20,
- length: 175,
- patient_type: 'Human',
- study_type: 'Normal',
- owner_name: '',
- chip_number: '',
- variety: '',
- is_anaesthesia: false,
- is_sedation: false,
- mwl: '',
- is_exported: true,
- is_edited: false,
- is_appended: false,
- department: '',
- mapped_status: true,
- qc_result: true,
- comment: 'History测试记录1',
- study_status: 'Completed',
- sort: 0,
- product: 'DROS',
- series: [],
- },
- {
- study_instance_uid:
- '2.25.156.999999.0000.1.2.2831189249.819691.1757656379.200002',
- study_id: 'HIST20250912002',
- public_study_id: '',
- specific_character_set: 'ISO_IR 192',
- accession_number: 'HIST002',
- ref_physician: 'Dr. Johnson',
- patient_id: 'HIST002',
- patient_name: 'History患者2',
- patient_english_name: 'History Patient 2',
- patient_former_name: '',
- patient_size: 'Medium',
- other_patient_ids: '',
- other_patient_names: '',
- patient_age: '35Y',
- patient_dob: '1990-01-01T00:00:00Z',
- patient_sex: 'F',
- sex_neutered: '',
- pregnancy_status: '',
- patient_state: '',
- admitting_time: null,
- priority: '',
- reg_source: '',
- study_description: '',
- study_start_datetime: '2025-09-02T08:00:00Z',
- study_end_datetime: '2025-09-02T09:00:00Z',
- scheduled_procedure_step_start_date: null,
- performed_physician: '',
- study_lock: 'Unlocked', // 未锁定
- folder_path: '',
- operator_name: 'OP001',
- modality: 'DX',
- weight: 65,
- thickness: 18,
- length: 165,
- patient_type: 'Human',
- study_type: 'Normal',
- owner_name: '',
- chip_number: '',
- variety: '',
- is_anaesthesia: false,
- is_sedation: false,
- mwl: '',
- is_exported: true,
- is_edited: false,
- is_appended: false,
- department: '',
- mapped_status: true,
- qc_result: true,
- comment: 'History测试记录2',
- study_status: 'Completed',
- sort: 0,
- product: 'DROS',
- series: [],
- },
- ],
- },
- },
- }).as(aliasOfFetchHistoryDataWithUnlocked);
- }
- /**
- * Mock: History数据 - 2条记录,第一条已锁定
- */
- const aliasOfFetchHistoryDataWithLocked = 'getHistoryLocked';
- export const FetchHistoryDataWithLocked = `@${aliasOfFetchHistoryDataWithLocked}`;
- export function mockFetchHistoryDataWithLocked() {
- cy.intercept('GET', '/dr/api/v1/auth/study*', {
- statusCode: 200,
- body: {
- code: '0x000000',
- description: 'Success',
- solution: '',
- data: {
- '@type': 'type.googleapis.com/dr.study.StudyList',
- count: 2,
- studies: [
- {
- study_instance_uid:
- '2.25.156.999999.0000.1.2.2831189249.819691.1757656379.200001',
- study_id: 'HIST20250912001',
- public_study_id: '',
- specific_character_set: 'ISO_IR 192',
- accession_number: 'HIST001',
- ref_physician: 'Dr. Johnson',
- patient_id: 'HIST001',
- patient_name: 'History患者1',
- patient_english_name: 'History Patient 1',
- patient_former_name: '',
- patient_size: 'Medium',
- other_patient_ids: '',
- other_patient_names: '',
- patient_age: '40Y',
- patient_dob: '1985-01-01T00:00:00Z',
- patient_sex: 'M',
- sex_neutered: '',
- pregnancy_status: '',
- patient_state: '',
- admitting_time: null,
- priority: '',
- reg_source: '',
- study_description: '',
- study_start_datetime: '2025-09-01T08:00:00Z',
- study_end_datetime: '2025-09-01T09:00:00Z',
- scheduled_procedure_step_start_date: null,
- performed_physician: '',
- study_lock: 'Locked', // 已锁定
- folder_path: '',
- operator_name: 'OP001',
- modality: 'DX',
- weight: 70,
- thickness: 20,
- length: 175,
- patient_type: 'Human',
- study_type: 'Normal',
- owner_name: '',
- chip_number: '',
- variety: '',
- is_anaesthesia: false,
- is_sedation: false,
- mwl: '',
- is_exported: true,
- is_edited: false,
- is_appended: false,
- department: '',
- mapped_status: true,
- qc_result: true,
- comment: 'History测试记录1-已锁定',
- study_status: 'Completed',
- sort: 0,
- product: 'DROS',
- series: [],
- },
- {
- study_instance_uid:
- '2.25.156.999999.0000.1.2.2831189249.819691.1757656379.200002',
- study_id: 'HIST20250912002',
- public_study_id: '',
- specific_character_set: 'ISO_IR 192',
- accession_number: 'HIST002',
- ref_physician: 'Dr. Johnson',
- patient_id: 'HIST002',
- patient_name: 'History患者2',
- patient_english_name: 'History Patient 2',
- patient_former_name: '',
- patient_size: 'Medium',
- other_patient_ids: '',
- other_patient_names: '',
- patient_age: '35Y',
- patient_dob: '1990-01-01T00:00:00Z',
- patient_sex: 'F',
- sex_neutered: '',
- pregnancy_status: '',
- patient_state: '',
- admitting_time: null,
- priority: '',
- reg_source: '',
- study_description: '',
- study_start_datetime: '2025-09-02T08:00:00Z',
- study_end_datetime: '2025-09-02T09:00:00Z',
- scheduled_procedure_step_start_date: null,
- performed_physician: '',
- study_lock: 'Unlocked', // 未锁定
- folder_path: '',
- operator_name: 'OP001',
- modality: 'DX',
- weight: 65,
- thickness: 18,
- length: 165,
- patient_type: 'Human',
- study_type: 'Normal',
- owner_name: '',
- chip_number: '',
- variety: '',
- is_anaesthesia: false,
- is_sedation: false,
- mwl: '',
- is_exported: true,
- is_edited: false,
- is_appended: false,
- department: '',
- mapped_status: true,
- qc_result: true,
- comment: 'History测试记录2',
- study_status: 'Completed',
- sort: 0,
- product: 'DROS',
- series: [],
- },
- ],
- },
- },
- }).as(aliasOfFetchHistoryDataWithLocked);
- }
- /**
- * Mock: History删除后返回1条记录
- */
- const aliasOfFetchHistoryAfterDelete = 'getHistoryAfterDelete';
- export const FetchHistoryAfterDelete = `@${aliasOfFetchHistoryAfterDelete}`;
- export function mockFetchHistoryAfterDelete() {
- cy.intercept('GET', '/dr/api/v1/auth/study*', {
- statusCode: 200,
- body: {
- code: '0x000000',
- description: 'Success',
- solution: '',
- data: {
- '@type': 'type.googleapis.com/dr.study.StudyList',
- count: 1,
- studies: [
- {
- study_instance_uid:
- '2.25.156.999999.0000.1.2.2831189249.819691.1757656379.200002',
- study_id: 'HIST20250912002',
- public_study_id: '',
- specific_character_set: 'ISO_IR 192',
- accession_number: 'HIST002',
- ref_physician: 'Dr. Johnson',
- patient_id: 'HIST002',
- patient_name: 'History患者2',
- patient_english_name: 'History Patient 2',
- patient_former_name: '',
- patient_size: 'Medium',
- other_patient_ids: '',
- other_patient_names: '',
- patient_age: '35Y',
- patient_dob: '1990-01-01T00:00:00Z',
- patient_sex: 'F',
- sex_neutered: '',
- pregnancy_status: '',
- patient_state: '',
- admitting_time: null,
- priority: '',
- reg_source: '',
- study_description: '',
- study_start_datetime: '2025-09-02T08:00:00Z',
- study_end_datetime: '2025-09-02T09:00:00Z',
- scheduled_procedure_step_start_date: null,
- performed_physician: '',
- study_lock: 'Unlocked',
- folder_path: '',
- operator_name: 'OP001',
- modality: 'DX',
- weight: 65,
- thickness: 18,
- length: 165,
- patient_type: 'Human',
- study_type: 'Normal',
- owner_name: '',
- chip_number: '',
- variety: '',
- is_anaesthesia: false,
- is_sedation: false,
- mwl: '',
- is_exported: true,
- is_edited: false,
- is_appended: false,
- department: '',
- mapped_status: true,
- qc_result: true,
- comment: 'History测试记录2',
- study_status: 'Completed',
- sort: 0,
- product: 'DROS',
- series: [],
- },
- ],
- },
- },
- }).as(aliasOfFetchHistoryAfterDelete);
- }
|