generio-sdk 1.0.31 → 1.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -86,6 +86,113 @@ interface GenerioReadyOutputModel {
86
86
  studyInstanceUId: string;
87
87
  }
88
88
  //#endregion
89
+ //#region src/models/FormTypeEnum.d.ts
90
+ declare enum FormTypeEnum {
91
+ NewLine = 0,
92
+ Text = 1,
93
+ BoldText = 2,
94
+ CheckBox = 3,
95
+ DropDownList = 4,
96
+ InputText = 5,
97
+ ConditionAndOr = 6,
98
+ Function = 7,
99
+ Condition = 8,
100
+ Button = 9,
101
+ Append = 10,
102
+ DigitBox = 11,
103
+ Merge = 12,
104
+ Listing = 13,
105
+ Bilateral = 14,
106
+ Matrix = 15,
107
+ RememberedText = 17,
108
+ InputTable = 18,
109
+ AppendDiagnose = 19,
110
+ // TODO: check if not deprecated
111
+ MoveByExtParams = 20,
112
+ }
113
+ //#endregion
114
+ //#region src/models/OriginDataItem.d.ts
115
+ interface OriginDataItem {
116
+ index: number;
117
+ formType: FormTypeEnum;
118
+ formValue?: string;
119
+ finding?: string;
120
+ conclusion?: string;
121
+ guid: string;
122
+ radLexId?: string;
123
+ extParam?: string;
124
+ }
125
+ //#endregion
126
+ //#region src/models/OriginElementDetail.d.ts
127
+ interface OriginElementDetail {
128
+ /**
129
+ * ExaminationId
130
+ */
131
+ id: number;
132
+ sortConclusion: string;
133
+ normalConclusion: string;
134
+ examinationElementSectionName: string;
135
+ examinationElementName: string;
136
+ languageCode: string;
137
+ loggedUserEmail: string;
138
+ loggedUserId: number;
139
+ loggedUserSawWholeTour: boolean;
140
+ examinationElementCreatedByUserEmail: string;
141
+ examinationElementCreatedByUserName: string;
142
+ bottomBanner: string;
143
+ isMachineTranslated: boolean;
144
+ roundDecimalsToIntegers: boolean;
145
+ addSpaceBeforeUnit: boolean;
146
+ isEnabledImagesAndExport: boolean;
147
+ isHiddenOtherActions: boolean;
148
+ copyResultCount: number;
149
+ copyResultLimit: number;
150
+ isExceededLimit: boolean;
151
+ exceededLimitText: string;
152
+ }
153
+ //#endregion
154
+ //#region src/models/OriginDetail.d.ts
155
+ interface OriginDetail {
156
+ element: OriginElementDetail;
157
+ data: OriginDataItem[];
158
+ cultureShort: string;
159
+ }
160
+ //#endregion
161
+ //#region src/models/Column.d.ts
162
+ interface Column {
163
+ formTypeId: FormTypeEnum;
164
+ formValue?: string;
165
+ finding?: string;
166
+ conclusion?: string;
167
+ guid: string;
168
+ radLexId?: string;
169
+ extParam?: string;
170
+ columnIndex?: number;
171
+ elementIndex?: number;
172
+ visualizeColumn?: boolean;
173
+ }
174
+ //#endregion
175
+ //#region src/models/ElementColumn.d.ts
176
+ interface ElementColumn extends Column {
177
+ elementSelectOptions?: Column[];
178
+ isDistance?: boolean;
179
+ preselected?: boolean;
180
+ }
181
+ //#endregion
182
+ //#region src/models/ElementSubRow.d.ts
183
+ interface ElementSubRow {
184
+ columns: Array<ElementColumn>;
185
+ }
186
+ //#endregion
187
+ //#region src/models/ElementRow.d.ts
188
+ interface ElementRow {
189
+ showHideElementId: string;
190
+ hrBeforeRow: boolean;
191
+ rowIndex: number;
192
+ visualizeRow: boolean;
193
+ subRows: Array<ElementSubRow>;
194
+ }
195
+ //#endregion
89
196
  //#region src/index.d.ts
90
197
  declare const GENERIO_ORIGIN = "https://localhost:7052";
91
198
  declare const GENERIO_IS_LOGGED_IN = "generio-is-logged-in";
@@ -98,5 +205,6 @@ declare function getExaminationMessage(win: Window): Promise<GetExaminationMessa
98
205
  declare function login(model: LoginInputModel): Promise<LoginOutputModel>;
99
206
  declare function logout(): Promise<LogoutOutputModel>;
100
207
  declare function setupPostMessageListener(generioReadyHandler?: (payload: GenerioReadyOutputModel) => void): void;
208
+ declare function loadExaminationPromise(examinationId: number, studyInstanceUId: string): Promise<OriginDetail>;
101
209
  //#endregion
102
- export { GENERIO_IS_LOGGED_IN, GENERIO_LOGGED_IN_EMAIL, GENERIO_ORIGIN, GetExaminationMessageOutputModel, GetExtParamValueByStudyInstanceUIdInputModel, GetExtParamValueByStudyInstanceUIdOutputModel, KeyValueModel, LoginInputModel, LoginOutputModel, LogoutOutputModel, MeasurementModel, RecognizeExaminationInputModel, RecognizeExaminationOutputModel, SendMeasurementsInputModel, SendMeasurementsOutputModel, SetExtParamsInputModel, SetExtParamsOutputModel, getExaminationMessage, getExtParamValueByStudyInstanceUId, login, logout, recognizeExamination, sendMeasurements, setExtParams, setupPostMessageListener };
210
+ export { type Column, type ElementColumn, type ElementRow, type ElementSubRow, FormTypeEnum, GENERIO_IS_LOGGED_IN, GENERIO_LOGGED_IN_EMAIL, GENERIO_ORIGIN, GetExaminationMessageOutputModel, GetExtParamValueByStudyInstanceUIdInputModel, GetExtParamValueByStudyInstanceUIdOutputModel, KeyValueModel, LoginInputModel, LoginOutputModel, LogoutOutputModel, MeasurementModel, type OriginDataItem, type OriginDetail, type OriginElementDetail, RecognizeExaminationInputModel, RecognizeExaminationOutputModel, SendMeasurementsInputModel, SendMeasurementsOutputModel, SetExtParamsInputModel, SetExtParamsOutputModel, getExaminationMessage, getExtParamValueByStudyInstanceUId, loadExaminationPromise, login, logout, recognizeExamination, sendMeasurements, setExtParams, setupPostMessageListener };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- const e=`https://localhost:7052`,t=`generio-is-logged-in`,n=`generio-logged-in-email`;async function r(t){e+``;let n=await fetch(`https://localhost:7052/api/generioApp/recognizeExaminationByUserContext`,{method:`POST`,credentials:`include`,body:JSON.stringify(t),headers:{"Content-Type":`application/json`}});return n.ok?n.json():{isSuccess:!1}}async function i(e,t){return{}}async function a(e,t){return{}}async function o(e,t){return{}}async function s(e){return{}}async function c(t){return(await fetch(e+`/api/cookiesAuth/login`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)})).ok?{isSuccess:!0}:{isSuccess:!1}}async function l(){let t=await fetch(e+`/api/cookiesAuth/logout`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`}});return t.ok||t.status===401||t.status===403?{isSuccess:!0}:{isSuccess:!1}}function u(t){window.addEventListener(`message`,n=>{e==n.origin&&(console.info(`PostMessageListener: Received message from origin: ${n.origin}`,n.data),n.data.action==`generioReady`&&t&&t(n.data.payload))},!1)}export{t as GENERIO_IS_LOGGED_IN,n as GENERIO_LOGGED_IN_EMAIL,e as GENERIO_ORIGIN,s as getExaminationMessage,o as getExtParamValueByStudyInstanceUId,c as login,l as logout,r as recognizeExamination,a as sendMeasurements,i as setExtParams,u as setupPostMessageListener};
1
+ let e=function(e){return e[e.NewLine=0]=`NewLine`,e[e.Text=1]=`Text`,e[e.BoldText=2]=`BoldText`,e[e.CheckBox=3]=`CheckBox`,e[e.DropDownList=4]=`DropDownList`,e[e.InputText=5]=`InputText`,e[e.ConditionAndOr=6]=`ConditionAndOr`,e[e.Function=7]=`Function`,e[e.Condition=8]=`Condition`,e[e.Button=9]=`Button`,e[e.Append=10]=`Append`,e[e.DigitBox=11]=`DigitBox`,e[e.Merge=12]=`Merge`,e[e.Listing=13]=`Listing`,e[e.Bilateral=14]=`Bilateral`,e[e.Matrix=15]=`Matrix`,e[e.RememberedText=17]=`RememberedText`,e[e.InputTable=18]=`InputTable`,e[e.AppendDiagnose=19]=`AppendDiagnose`,e[e.MoveByExtParams=20]=`MoveByExtParams`,e}({});const t=`https://localhost:7052`,n=`generio-is-logged-in`,r=`generio-logged-in-email`;async function i(e){t+``;let n=await fetch(`https://localhost:7052/api/generioApp/recognizeExaminationByUserContext`,{method:`POST`,credentials:`include`,body:JSON.stringify(e),headers:{"Content-Type":`application/json`}});return n.ok?n.json():{isSuccess:!1}}async function a(e,t){return{}}async function o(e,t){return{}}async function s(e,t){return{}}async function c(e){return{}}async function l(e){return(await fetch(t+`/api/cookiesAuth/login`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})).ok?{isSuccess:!0}:{isSuccess:!1}}async function u(){let e=await fetch(t+`/api/cookiesAuth/logout`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`}});return e.ok||e.status===401||e.status===403?{isSuccess:!0}:{isSuccess:!1}}function d(e){window.addEventListener(`message`,n=>{t==n.origin&&(console.info(`PostMessageListener: Received message from origin: ${n.origin}`,n.data),n.data.action==`generioReady`&&e&&e(n.data.payload))},!1)}async function f(e,n){let r=await fetch(t+`/api/GenerioApp/LoadExamination`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({examinationId:e,studyInstanceUId:n})});if(!r.ok)throw Error(`Failed to load examination data`);return await r.json()}export{e as FormTypeEnum,n as GENERIO_IS_LOGGED_IN,r as GENERIO_LOGGED_IN_EMAIL,t as GENERIO_ORIGIN,c as getExaminationMessage,s as getExtParamValueByStudyInstanceUId,f as loadExaminationPromise,l as login,u as logout,i as recognizeExamination,o as sendMeasurements,a as setExtParams,d as setupPostMessageListener};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generio-sdk",
3
- "version": "1.0.31",
3
+ "version": "1.0.33",
4
4
  "description": "SDK library for generio integration",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -35,6 +35,10 @@
35
35
  "bumpp": "^10.3.1",
36
36
  "tsdown": "^0.15.11",
37
37
  "typescript": "^5.9.3",
38
- "vitest": "^4.0.4"
38
+ "vitest": "^4.0.4",
39
+ "@types/uuid": "^11.0.0"
40
+ },
41
+ "dependencies": {
42
+ "uuid": "^11.1.0"
39
43
  }
40
44
  }