Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OH2-418 | Orthanc Integration #514

Draft
wants to merge 7 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
241 changes: 239 additions & 2 deletions openapi/oh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3816,6 +3816,92 @@ paths:
format: byte
security:
- bearerAuth: [ ]
/radiology/studies/{id}/series:
get:
tags:
- Radiology
operationId: getStudySeriesById
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/SeriesResponse"
security:
- bearerAuth: [ ]
/radiology/series/{id}/instances:
get:
tags:
- Radiology
operationId: getSeriesInstancesById
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/InstanceResponse"
security:
- bearerAuth: [ ]
/radiology/patients/{id}/studies:
get:
tags:
- Radiology
operationId: getPatientStudiesById
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/StudyResponse"
security:
- bearerAuth: [ ]
/radiology/instances/{id}/preview:
get:
tags:
- Radiology
operationId: getInstancePreview
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/InstancePreviewDTO"
security:
- bearerAuth: [ ]
/pricelists/prices:
get:
tags:
Expand Down Expand Up @@ -6235,12 +6321,12 @@ components:
description: lock
format: int32
example: 0
opd:
type: boolean
female:
type: boolean
male:
type: boolean
opd:
type: boolean
pharmacy:
type: boolean
PatientDTO:
Expand Down Expand Up @@ -8188,6 +8274,157 @@ components:
type: string
description: Password of user
example: admin
Series:
type: object
properties:
bodyPartExamined:
type: string
imageOrientationPatient:
type: string
manufacturer:
type: string
modality:
type: string
operatorsName:
type: string
protocolName:
type: string
seriesDescription:
type: string
instanceUID:
type: string
number:
type: string
stationName:
type: string
SeriesResponse:
type: object
properties:
id:
type: string
objectType:
type: string
labels:
type: array
items:
type: string
lastUpdate:
type: string
series:
$ref: "#/components/schemas/Series"
parentStudyId:
type: string
instancesIds:
type: array
items:
type: string
expectedNumberOfInstances:
type: string
status:
type: string
stable:
type: boolean
Instance:
type: object
properties:
acquisitionNumber:
type: string
imageOrientationPatient:
type: string
imagePositionPatient:
type: string
creationDate:
type: string
creationTime:
type: string
instanceNumber:
type: string
instanceUID:
type: string
InstanceResponse:
type: object
properties:
id:
type: string
fileSize:
type: integer
format: int32
fileUuid:
type: string
indexInSeries:
type: integer
format: int32
labels:
type: array
items:
type: string
instance:
$ref: "#/components/schemas/Instance"
parentSeriesId:
type: string
objectType:
type: string
Patient:
type: object
properties:
birthDate:
type: string
id:
type: string
name:
type: string
sex:
type: string
Study:
type: object
properties:
accessionNumber:
type: string
institutionName:
type: string
referringPhysicianName:
type: string
date:
type: string
time:
type: string
description:
type: string
id:
type: string
instanceUID:
type: string
StudyResponse:
type: object
properties:
id:
type: string
objectType:
type: string
labels:
type: array
items:
type: string
lastUpdate:
type: string
study:
$ref: "#/components/schemas/Study"
parentPatientId:
type: string
patient:
$ref: "#/components/schemas/Patient"
seriesIds:
type: array
items:
type: string
stable:
type: boolean
InstancePreviewDTO:
type: object
properties:
data:
type: string
description: Base64 representation of the instance preview
PriceDTO:
required:
- description
Expand Down
5 changes: 5 additions & 0 deletions rsc/orthanc.properties.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
orthanc.base-url=
orthanc.explorer-url=
orthanc.username=admin
orthanc.password=adminADMIN!123#
orthanc.enabled=false
2 changes: 2 additions & 0 deletions src/main/java/org/isf/config/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
.requestMatchers(HttpMethod.GET, "/permissions/**").hasAuthority("permissions.read")
.requestMatchers(HttpMethod.PUT, "/permissions/**").hasAuthority("permissions.update")
.requestMatchers(HttpMethod.DELETE, "/permissions/**").hasAuthority("permissions.delete")
// radiology
.requestMatchers(HttpMethod.GET, "/radiology/**").hasAuthority("radiology.read")
// grouppermission
.requestMatchers(HttpMethod.POST, "/usergroups/{group_code}/permissions/**").hasAuthority("grouppermission.create")
.requestMatchers(HttpMethod.GET, "/usergroups/{group_code}/permissions/**").hasAuthority("grouppermission.read")
Expand Down
30 changes: 30 additions & 0 deletions src/main/java/org/isf/radiology/dto/InstancePreviewDTO.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Open Hospital (www.open-hospital.org)
* Copyright © 2006-2024 Informatici Senza Frontiere ([email protected])
*
* Open Hospital is a free and open source software for healthcare data management.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* https://www.gnu.org/licenses/gpl-3.0-standalone.html
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.isf.radiology.dto;

import io.swagger.v3.oas.annotations.media.Schema;

public record InstancePreviewDTO(
@Schema(name = "data", description = "Base64 representation of the instance preview") String data
) {

}
Loading
Loading