> ## Documentation Index
> Fetch the complete documentation index at: https://hmis-docs.derrickmugabwa.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Demo PACS and viewer

> Run Orthanc, OHIF, and the mock modality in the Compose demonstration stack.

## Services

| Service       | Image or implementation                         | Local URL or port                        |
| ------------- | ----------------------------------------------- | ---------------------------------------- |
| HMIS PACS     | `orthancteam/orthanc:26.6.1`                    | `http://localhost:8042` and DICOM `4242` |
| OHIF          | `ohif/app:v3.12.6`                              | `http://localhost:3000`                  |
| Mock modality | Local Python application                        | `http://localhost:8091`                  |
| OIE           | `openintegrationengine/engine:4.5.2-ubuntu-jre` | Admin `https://localhost:8443`           |

The Compose services are part of the demonstration platform. They are bound to localhost by default.

## Orthanc identity

```json theme={null}
{
  "Name": "HMIS PACS",
  "DicomAet": "HMIS_PACS",
  "OrthancExplorer2": {
    "Enable": true,
    "IsDefaultOrthancUI": true
  },
  "Worklists": {
    "Enable": true,
    "SaveInOrthancDatabase": true,
    "SetStudyInstanceUidIfMissing": true
  }
}
```

Authorize the demo modality in Orthanc:

```json theme={null}
{
  "DicomModalities": {
    "hmis-mock-modality": {
      "AET": "HMIS_MODALITY",
      "Host": "mock-modality",
      "Port": 104,
      "AllowEcho": true,
      "AllowFind": true,
      "AllowMove": false,
      "AllowGet": false,
      "AllowStore": true
    }
  }
}
```

The configured port is part of Orthanc's remote-modality registry. The mock modality acts as a DICOM client for MWL and C-STORE; its browser application does not need to expose port `104` as a listener.

## OHIF same-origin DICOMweb proxy

OHIF uses its own origin so browser requests do not depend on PACS CORS configuration:

```javascript theme={null}
const ohifOrigin = window.location.origin;

window.config = {
  routerBasename: '/',
  showStudyList: true,
  extensions: [],
  modes: [],
  dataSources: [
    {
      sourceName: 'dicomweb',
      namespace: '@ohif/extension-default.dataSourcesModule.dicomweb',
      configuration: {
        name: 'Orthanc DICOMweb',
        qidoRoot: `${ohifOrigin}/dicom-web`,
        wadoRoot: `${ohifOrigin}/dicom-web`,
        wadoUriRoot: `${ohifOrigin}/wado`,
        qidoSupportsIncludeField: true,
        imageRendering: 'wadors',
        thumbnailRendering: 'wadors'
      }
    }
  ],
  defaultDataSourceName: 'dicomweb'
};
```

The custom OHIF Nginx configuration proxies `/dicom-web/` and `/wado` to `http://orthanc:8042`. It must also contain:

```nginx theme={null}
gzip_static on;
```

The OHIF container ships compressed JavaScript assets. Omitting `gzip_static on` can produce a white page because the expected application bundle is not served correctly.

<Warning>
  The demo Orthanc configuration has authentication disabled. Before use with real clinical data, enable authentication, TLS, network segmentation, backups, retention policies, and appropriate access controls.
</Warning>
