#pragma once #include #include "ResDataObject.h" #define SIZE_Small ("SMALL") #define SIZE_Medium ("MEDIUM") #define SIZE_Large ("LARGE") #define SIZE_Paediatric ("PAEDIATRIC") class STUDAY_INFO : public BaseJsonDataObject { public: BaseJsonDataObject m_PatientName; BaseJsonDataObject m_PatientID; BaseJsonDataObject m_PatientSex; BaseJsonDataObject m_StudyID; BaseJsonDataObject m_OtherPatientIDs; BaseJsonDataObject m_OtherPatientNames; BaseJsonDataObject m_AccessionNumber; BaseJsonDataObject m_StudyDescription; BaseJsonDataObject m_PatientAge; BaseJsonDataObject m_PatientLength; BaseJsonDataObject m_PatientWeight; BaseJsonDataObject m_PatientSize; BaseJsonDataObject m_PatientBirthDate; BaseJsonDataObject m_PatientBirthTime; BaseJsonDataObject m_BodyPart; STUDAY_INFO(void) { SetKey("StudayInfo"); m_PatientName.SetKey("PatientName"); m_PatientID.SetKey("PatientID"); m_PatientSex.SetKey("PatientSex"); m_StudyID.SetKey("StudyID"); m_OtherPatientIDs.SetKey("OtherPatientIDs"); m_OtherPatientNames.SetKey("OtherPatientNames"); m_AccessionNumber.SetKey("AccessionNumber"); m_StudyDescription.SetKey("StudyDescription"); m_PatientAge.SetKey("PatientAge"); m_PatientLength.SetKey("PatientLength"); m_PatientWeight.SetKey("PatientWeight"); m_PatientSize.SetKey("PatientSize"); m_PatientBirthDate.SetKey("PatientBirthDate"); m_PatientBirthTime.SetKey("PatientBirthTime"); m_BodyPart.SetKey("ProcedureGroup"); } virtual ~STUDAY_INFO(void) { } virtual const char *GetVal() { ResDataObject obj; obj.add(m_PatientName.GetKey(), m_PatientName.GetVal()); obj.add(m_PatientID.GetKey(), m_PatientID.GetVal()); obj.add(m_PatientSex.GetKey(), m_PatientSex.GetVal()); obj.add(m_StudyID.GetKey(), m_StudyID.GetVal()); obj.add(m_OtherPatientIDs.GetKey(), m_OtherPatientIDs.GetVal()); obj.add(m_OtherPatientNames.GetKey(), m_OtherPatientNames.GetVal()); obj.add(m_AccessionNumber.GetKey(), m_AccessionNumber.GetVal()); obj.add(m_StudyDescription.GetKey(), m_StudyDescription.GetVal()); obj.add(m_PatientAge.GetKey(), m_PatientAge.GetVal()); obj.add(m_PatientLength.GetKey(), m_PatientLength.GetVal()); obj.add(m_PatientWeight.GetKey(), m_PatientWeight.GetVal()); obj.add(m_PatientSize.GetKey(), m_PatientSize.GetVal()); obj.add(m_PatientBirthDate.GetKey(), m_PatientBirthDate.GetVal()); obj.add(m_PatientBirthTime.GetKey(), m_PatientBirthTime.GetVal()); obj.add(m_BodyPart.GetKey(), m_BodyPart.GetVal()); (m_ValString) = obj.encode(); return m_ValString.c_str(); }; virtual bool SetVal(const char* pValString) { ResDataObject obj; if (obj.decode(pValString)) { int idx; idx = obj.GetFirstOf(m_PatientName.GetKey()); if (idx >= 0) { m_PatientName.SetVal(obj[idx]); } idx = obj.GetFirstOf(m_PatientID.GetKey()); if (idx >= 0) { m_PatientID.SetVal(obj[idx]); } idx = obj.GetFirstOf(m_PatientSex.GetKey()); if (idx >= 0) { m_PatientSex.SetVal(obj[idx]); } idx = obj.GetFirstOf(m_StudyID.GetKey()); if (idx >= 0) { m_StudyID.SetVal(obj[idx]); } idx = obj.GetFirstOf(m_OtherPatientIDs.GetKey()); if (idx >= 0) { m_OtherPatientIDs.SetVal(obj[idx]); } idx = obj.GetFirstOf(m_OtherPatientNames.GetKey()); if (idx >= 0) { m_OtherPatientNames.SetVal(obj[idx]); } idx = obj.GetFirstOf(m_AccessionNumber.GetKey()); if (idx >= 0) { m_AccessionNumber.SetVal(obj[idx]); } idx = obj.GetFirstOf(m_StudyDescription.GetKey()); if (idx >= 0) { m_StudyDescription.SetVal(obj[idx]); } idx = obj.GetFirstOf(m_PatientAge.GetKey()); if (idx >= 0) { m_PatientAge.SetVal(obj[idx]); } idx = obj.GetFirstOf(m_PatientLength.GetKey()); if (idx >= 0) { m_PatientLength.SetVal(obj[idx]); } idx = obj.GetFirstOf(m_PatientWeight.GetKey()); if (idx >= 0) { m_PatientWeight.SetVal(obj[idx]); } idx = obj.GetFirstOf(m_PatientSize.GetKey()); if (idx >= 0) { m_PatientSize.SetVal(obj[idx]); } idx = obj.GetFirstOf(m_PatientBirthDate.GetKey()); if (idx >= 0) { m_PatientBirthDate.SetVal(obj[idx]); } idx = obj.GetFirstOf(m_PatientBirthTime.GetKey()); if (idx >= 0) { m_PatientBirthTime.SetVal(obj[idx]); } idx = obj.GetFirstOf(m_BodyPart.GetKey()); if (idx >= 0) { m_BodyPart.SetVal(obj[idx]); } return true; } return false; }; }; class TECHPARAM_INFO : public BaseJsonDataObject { public: BaseJsonDataObject m_CollimatorHeight; BaseJsonDataObject m_CollimatorWidth; BaseJsonDataObject m_CollimatorPosition; BaseJsonDataObject m_CollimatorFilter; BaseJsonDataObject m_SID; BaseJsonDataObject m_PositionNumber; BaseJsonDataObject m_TargetEXI; TECHPARAM_INFO(void) { SetKey("TechParamsInfo"); m_CollimatorHeight.SetKey("CollimatorHeight"); m_CollimatorWidth.SetKey("CollimatorWidth"); m_CollimatorPosition.SetKey("CollimatorCenter"); m_CollimatorFilter.SetKey("CollimatorFilter"); m_SID.SetKey("SID"); m_PositionNumber.SetKey("PositionNumber"); m_TargetEXI.SetKey("TargetEXI"); } virtual ~TECHPARAM_INFO(void) { } virtual const char *GetVal() { ResDataObject obj; obj.add(m_CollimatorHeight.GetKey(), m_CollimatorHeight.GetVal()); obj.add(m_CollimatorWidth.GetKey(), m_CollimatorWidth.GetVal()); obj.add(m_CollimatorPosition.GetKey(), m_CollimatorPosition.GetVal()); obj.add(m_CollimatorFilter.GetKey(), m_CollimatorFilter.GetVal()); obj.add(m_SID.GetKey(), m_SID.GetVal()); obj.add(m_PositionNumber.GetKey(), m_PositionNumber.GetVal()); obj.add(m_TargetEXI.GetKey(), m_TargetEXI.GetVal()); (m_ValString) = obj.encode(); return m_ValString.c_str(); }; virtual bool SetVal(const char* pValString) { ResDataObject obj; if (obj.decode(pValString)) { int idx; idx = obj.GetFirstOf(m_CollimatorHeight.GetKey()); if (idx >= 0) { m_CollimatorHeight.SetVal(obj[idx]); } idx = obj.GetFirstOf(m_CollimatorWidth.GetKey()); if (idx >= 0) { m_CollimatorWidth.SetVal(obj[idx]); } idx = obj.GetFirstOf(m_CollimatorPosition.GetKey()); if (idx >= 0) { m_CollimatorPosition.SetVal(obj[idx]); } idx = obj.GetFirstOf(m_CollimatorFilter.GetKey()); if (idx >= 0) { m_CollimatorFilter.SetVal(obj[idx]); } idx = obj.GetFirstOf(m_SID.GetKey()); if (idx >= 0) { m_SID.SetVal(obj[idx]); } idx = obj.GetFirstOf(m_PositionNumber.GetKey()); if (idx >= 0) { m_PositionNumber.SetVal(obj[idx]); } idx = obj.GetFirstOf(m_TargetEXI.GetKey()); if (idx >= 0) { m_TargetEXI.SetVal(obj[idx]); } return true; } return false; }; }; class STITCH_INFO : public BaseJsonDataObject { public: BaseJsonDataObject m_InitialHeight; BaseJsonDataObject m_StitchLength; BaseJsonDataObject m_StepLength; BaseJsonDataObject m_SID; BaseJsonDataObject m_StitchType; BaseJsonDataObject m_Direction; BaseJsonDataObject m_ImageCount; STITCH_INFO(void) { SetKey("StitchInfo"); m_InitialHeight.SetKey("InitialHeight"); m_StitchLength.SetKey("StitchLength"); m_StepLength.SetKey("StepLength"); m_SID.SetKey("SID"); m_StitchType.SetKey("StitchType"); m_Direction.SetKey("Direction"); m_ImageCount.SetKey("ImageCount"); } virtual ~STITCH_INFO(void) { } virtual const char *GetVal() { ResDataObject obj; obj.add(m_InitialHeight.GetKey(), m_InitialHeight.GetVal()); obj.add(m_StitchLength.GetKey(), m_StitchLength.GetVal()); obj.add(m_StepLength.GetKey(), m_StepLength.GetVal()); obj.add(m_SID.GetKey(), m_SID.GetVal()); obj.add(m_StitchType.GetKey(), m_StitchType.GetVal()); obj.add(m_Direction.GetKey(), m_Direction.GetVal()); obj.add(m_ImageCount.GetKey(), m_ImageCount.GetVal()); (m_ValString) = obj.encode(); return m_ValString.c_str(); }; virtual bool SetVal(const char* pValString) { ResDataObject obj; if (obj.decode(pValString)) { int idx; idx = obj.GetFirstOf(m_InitialHeight.GetKey()); if (idx >= 0) { m_InitialHeight.SetVal(obj[idx]); } idx = obj.GetFirstOf(m_StitchLength.GetKey()); if (idx >= 0) { m_StitchLength.SetVal(obj[idx]); } idx = obj.GetFirstOf(m_StepLength.GetKey()); if (idx >= 0) { m_StepLength.SetVal(obj[idx]); } idx = obj.GetFirstOf(m_SID.GetKey()); if (idx >= 0) { m_SID.SetVal(obj[idx]); } idx = obj.GetFirstOf(m_StitchType.GetKey()); if (idx >= 0) { m_StitchType.SetVal(obj[idx]); } idx = obj.GetFirstOf(m_Direction.GetKey()); if (idx >= 0) { m_Direction.SetVal(obj[idx]); } idx = obj.GetFirstOf(m_ImageCount.GetKey()); if (idx >= 0) { m_ImageCount.SetVal(obj[idx]); } return true; } return false; }; }; //add by wxx for OTCStitching at 20231218 //--------------------------------------------------------------------------------------- // // 结构名称:ECOM_PATIENT // 结构说明:用于保存病人信息,病人信息来源于worklist或者技师手工输入。 // //--------------------------------------------------------------------------------------- typedef struct ECOM_PATIENT { string strPatientID; // 病人标示码 string strPatientName; // 病人姓名 string strOtherPatientID; // 病人其他标示码 string strOtherPatientName; // 病人其他姓名 string strAge; // 年龄 string strOccupation; // 职业 string strSex; // 性别 string strMedicalAlert; // 药物警告 string strContrastAllergies;// 造影剂过敏 string strSmokingStatus; // 吸烟状态 string strPatientComments; // 评论 string strPatientHistory; // 病史 string strPregnancyStatus; // 怀孕状态 string strSpecialNeeds; // 特殊需要 string strPatientState; // 病人状态 string strPatientStatus; // 如果病人有任意一个未完成的检查,则病人的状态为:未完成。 string strDob; // 生日 YYYYMMDD string dtDob; // 生日 YYYYMMDD string dtLastMenstrualDate; // 最近一次月经时间 //code begin 20150611 for IMIX string strPatientSize; // 病人体型 string strAccessionNumber; // string strStudyID; // StudyID //code end 20150611 for IMIX string strReserve1; string strReserve2; string strReserve3; string strStudyDescription;// study 描述 20150724 ECOM_PATIENT& operator =(const ECOM_PATIENT& patient) { //string::CopyChars(strPatientID, patient.strPatientID, patient.strPatientID.GetLength()); strPatientID = patient.strPatientID; strPatientName = patient.strPatientName; strOtherPatientID = patient.strOtherPatientID; strOtherPatientName = patient.strOtherPatientName; strAge = patient.strAge; strSex = patient.strSex; strOccupation = patient.strOccupation; strMedicalAlert = patient.strMedicalAlert; strContrastAllergies = patient.strContrastAllergies; strSmokingStatus = patient.strSmokingStatus; strPatientComments = patient.strPatientComments; strPatientHistory = patient.strPatientHistory; strPregnancyStatus = patient.strPregnancyStatus; strSpecialNeeds = patient.strSpecialNeeds; strPatientState = patient.strPatientState; strPatientStatus = patient.strPatientStatus; strReserve1 = patient.strReserve1; strReserve2 = patient.strReserve2; strReserve3 = patient.strReserve3; strDob = patient.strDob; dtDob = patient.dtDob; dtLastMenstrualDate = patient.dtLastMenstrualDate; strStudyDescription = patient.strStudyDescription; //code 20150724 //code begin 20150611 for IMIX strPatientSize = patient.strPatientSize; strAccessionNumber = patient.strAccessionNumber; strStudyID = patient.strStudyID; //code end 20150611 for IMIX return *this; } }; //--------------------------------------------------------------------------------------- // // 结构名称:ECOM_STUDY // 结构说明:用于保存检查信息,检查信息来源于worklist或者技师手工输入。 // //--------------------------------------------------------------------------------------- typedef struct ECOM_STUDY { string strStudyID; // Study内部标示 string strPatientID; // 病人标示码 string strAdmissionID; // 分配ID string strAccessionNum; // 访问标示码 string strStudyInstanceUID; // string strScheduledAETitle; // string strRegSource; // string strStudyStatus; // string strStudyPriority; // string strStudyComments; // string strRequestingPhysician; // string strRequestedProcedureDescription; // string strRequestedContrasAgent; // string strScheduledProcedureStepID; // string strScheduledProcedureStepDescription;// string strRequestedProcedureID; // string strPreMedication; // string strProcedureCode; // string strProcedureCodeValue; // string strProcedureCodeMeaning; // string strMPPSInstanceUID; // string strMPPSStatus; string strModality; string strOperatorName; // 技师名字 string dtScheduledStartDateTime; // string dtStudyStartDateTime; // string dtStudyCompletionDateTime; // string strReserve1; string strReserve2; string strReserve3; ECOM_STUDY& operator =(const ECOM_STUDY& study) { strStudyID = study.strStudyID; strPatientID = study.strPatientID; strAdmissionID = study.strAdmissionID; strAccessionNum = study.strAccessionNum; strStudyInstanceUID = study.strStudyInstanceUID; strScheduledAETitle = study.strScheduledAETitle; strRegSource = study.strRegSource; strStudyStatus = study.strStudyStatus; strStudyPriority = study.strStudyPriority; strStudyComments = study.strStudyComments; strRequestingPhysician = study.strRequestingPhysician; strRequestedProcedureDescription = study.strRequestedProcedureDescription; strRequestedContrasAgent = study.strRequestedContrasAgent; strScheduledProcedureStepID = study.strScheduledProcedureStepID; strScheduledProcedureStepDescription = study.strScheduledProcedureStepDescription; strRequestedProcedureID = study.strRequestedProcedureID; strPreMedication = study.strPreMedication; strProcedureCode = study.strProcedureCode; strProcedureCodeValue = study.strProcedureCodeValue; strProcedureCodeMeaning = study.strProcedureCodeMeaning; strMPPSInstanceUID = study.strMPPSInstanceUID; strMPPSStatus = study.strMPPSStatus; strModality = study.strModality; strOperatorName = study.strOperatorName; dtScheduledStartDateTime = study.dtScheduledStartDateTime; dtStudyStartDateTime = study.dtStudyStartDateTime; dtStudyCompletionDateTime = study.dtStudyCompletionDateTime; strReserve1 = study.strReserve1; strReserve2 = study.strReserve2; strReserve3 = study.strReserve3; return *this; } }; //--------------------------------------------------------------------------------------- // // 结构名称:ECOM_PROCEDURE_VIEW // 结构说明:用来保存 界面与 WorkFlow 交互时传递的 Porcedure and View 信息. // //--------------------------------------------------------------------------------------- typedef struct ECOM_PROCEDURE_VIEW { //Station string strStationName; string strInstitutionName; // Procedure string strProcedureCode; string strProcedureName; string strProcedureFastName; //new added, for fast input/search procedure string strProcedureDescription; //for local language string strBodyPart; string strBodyPartDescription; //new added, for local language string strOftenUsed; string strTrueSize; string strFilmOrientation; string strFilmSize; string strPrintFormat; //code begin 20091105 string strStitchingLength; string strStitchingPID; string strStitchingOverlap; string strStitchingDirection; string strStitchingType; string strInitialPosition; //code end 20091105 // View string strViewID; string strSOPInstanceUID; //newadded, for identification string strImageID; //newadded, for identification string strViewDescription; string strAnatomicRegion; string strBodyPartExamined; string strOrientation; string strViewPosition; string strPatientOrientationRow; string strPatientOrientationColumn; string strImageLaterality; string strImageRotate; string strCollimatorSize; string strImageProcess; string strImageHorizontalFlip; string strLabelStyle; string strLabelPosition; string strViewIconName; string strViewBigIconName; string strStandPos; string strFilter; //code begin 20150616 string strViewSeriesInstanceUID; //seriesInstanceUID(对应每个view) string strViewStatus; //view 是新的view还是拒绝后重新copy出来的; 0:新的view;1:拒绝后重新copy出来的 string strViewGridType; //Grid type: 0 表示没有; 其他则对应具体grid定义 string strViewAPRStatus; //当前view的曝光状态,0 表示没有曝光; 1 表示曝光成功; 2:曝光拒绝 //code end 20150616 ECOM_PROCEDURE_VIEW& operator =(const ECOM_PROCEDURE_VIEW& procedureview) { //string::CopyChars(strPatientID, patient.strPatientID, patient.strPatientID.GetLength(); strStationName = procedureview.strStationName; strInstitutionName = procedureview.strInstitutionName; strProcedureCode = procedureview.strProcedureCode; strProcedureName = procedureview.strProcedureName; strProcedureFastName = procedureview.strProcedureFastName; strProcedureDescription = procedureview.strProcedureDescription; strBodyPart = procedureview.strBodyPart; strBodyPartDescription = procedureview.strBodyPartDescription; strOftenUsed = procedureview.strOftenUsed; strTrueSize = procedureview.strTrueSize; strFilmOrientation = procedureview.strFilmOrientation; strFilmSize = procedureview.strFilmSize; strPrintFormat = procedureview.strPrintFormat; strViewID = procedureview.strViewID; strSOPInstanceUID = procedureview.strSOPInstanceUID; strImageID = procedureview.strImageID; strViewDescription = procedureview.strViewDescription; strAnatomicRegion = procedureview.strAnatomicRegion; strBodyPartExamined = procedureview.strBodyPartExamined; strOrientation = procedureview.strOrientation; strViewPosition = procedureview.strViewPosition; strPatientOrientationRow = procedureview.strPatientOrientationRow; strPatientOrientationColumn = procedureview.strPatientOrientationColumn; strImageLaterality = procedureview.strImageLaterality; strImageRotate = procedureview.strImageRotate; strCollimatorSize = procedureview.strCollimatorSize; strImageProcess = procedureview.strImageProcess; strImageHorizontalFlip = procedureview.strImageHorizontalFlip; strLabelStyle = procedureview.strLabelStyle; strLabelPosition = procedureview.strLabelPosition; strViewIconName = procedureview.strViewIconName; strViewBigIconName = procedureview.strViewBigIconName; strStandPos = procedureview.strStandPos; strFilter = procedureview.strFilter; //code begin 20091105 strStitchingLength = procedureview.strStitchingLength; strStitchingPID = procedureview.strStitchingPID; strStitchingOverlap = procedureview.strStitchingOverlap; strStitchingDirection = procedureview.strStitchingDirection; strStitchingType = procedureview.strStitchingType; strInitialPosition = procedureview.strInitialPosition; //code end 20091105 strViewSeriesInstanceUID = procedureview.strViewSeriesInstanceUID; strViewStatus = procedureview.strViewStatus; strViewGridType = procedureview.strViewGridType; strViewAPRStatus = procedureview.strViewAPRStatus; return *this; } }; //--------------------------------------------------------------------------------------- // // 结构名称:ECOM_COLLIMATOR_INFO // 结构说明:用来保存遮光器的参数信息. // //--------------------------------------------------------------------------------------- typedef struct ECOM_COLLIMATOR_INFO { float fWidth; //cm float fHeight; //cm ECOM_COLLIMATOR_INFO& operator =(const ECOM_COLLIMATOR_INFO &Collimator) { fWidth = Collimator.fWidth; fHeight = Collimator.fWidth; return *this; } };