Swedish Healthcare Service - Health Condition Description
0.1.0 - CI Build
Sweden
Swedish Healthcare Service - Health Condition Description - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
This page documents all error codes used in the Health Condition Description service domain.
All services return a result element containing:
<result>
<resultCode>ERROR_CODE</resultCode>
<message>Human-readable error description</message>
<errorId>Optional unique error identifier</errorId>
<logId>Optional log reference for troubleshooting</logId>
</result>
| Code | Description |
|---|---|
| OK | Request processed successfully with data returned |
| INFO | Request processed successfully but informational message included |
| NO_DATA_FOUND | Request successful but no data matches search criteria |
Logical errors in request processing.
| Code | Description | Resolution |
|---|---|---|
| INVALID_REQUEST | Request violates business rules | Check: datePeriod ordering, required fields, value formats |
| VALIDATION_ERROR | Data validation failed | Verify all field values against specifications |
| ACCESS_DENIED | Caller not authorized to access requested data | Check: PDL permissions, blocking status, consent |
| PATIENT_NOT_FOUND | Patient identifier not recognized | Verify patient ID and OID are correct |
| NO_CONSENT | Patient has not provided consent | Patient must provide consent before access |
| BLOCKED | Patient has blocked access | Blocking prevents access - contact patient |
| NOT_APPROVED_FOR_PATIENT | Data not approved for patient access | Only relevant for patient-facing services |
| SOURCE_SYSTEM_NOT_AVAILABLE | Specified source system unavailable | Try again later or use aggregating service |
| INVALID_SOURCE_SYSTEM | sourceSystemHSAId doesn't match logicalAddress | Ensure consistency between addressing fields |
| MAX_RESULT_SIZE_EXCEEDED | Result set too large | Use datePeriod to limit scope, or use partial retrieval |
| INVALID_REFERENCE | hasMoreReference invalid or expired | Reference may have expired (>1 hour), restart query |
Infrastructure or system failures.
| Code | Description | Resolution |
|---|---|---|
| TECHNICAL_ERROR | General technical failure | Check logs, retry, contact support if persists |
| INTERNAL_ERROR | Internal system error | Producer internal issue - contact producer support |
| TIMEOUT | Request processing exceeded time limit | Reduce scope or retry |
| TRANSFORMATION_ERROR | Data transformation failed | Producer issue - report to producer |
| DATABASE_ERROR | Database access failed | Temporary issue - retry |
On APPLICATION_ERROR:
On TECHNICAL_ERROR:
On NO_DATA_FOUND:
When querying multiple source systems:
Partial Success Handling:
partial flag = trueExample Response:
<result>
<resultCode>OK</resultCode>
<message>Partial results - 2 of 3 systems responded</message>
</result>
<partial>true</partial>
<failedSources>
<sourceSystem>SE2321000016-SYS3</sourceSystem>
<error>TIMEOUT</error>
</failedSources>
Total Failure:
Must Return Errors For:
Should Include:
logId for troubleshootingRequest:
<timePeriod>
<start>20241231</start>
<end>20240101</end>
</timePeriod>
Response:
<result>
<resultCode>INVALID_REQUEST</resultCode>
<message>timePeriod.end must be after timePeriod.start</message>
</result>
Request: User without PDL permission attempts access
Response:
<result>
<resultCode>ACCESS_DENIED</resultCode>
<message>Caller does not have sufficient permissions to access patient data</message>
<logId>AUD-2024-123456</logId>
</result>
Request: Accessing blocked patient
Response:
<result>
<resultCode>BLOCKED</resultCode>
<message>Patient has blocked access to their information</message>
</result>
Request:
<soap:Header>
<LogicalAddress>SE2321000016-SYS1</LogicalAddress>
</soap:Header>
<soap:Body>
<GetCareDocumentation>
<sourceSystemHSAId>SE2321000016-SYS2</sourceSystemHSAId>
...
</GetCareDocumentation>
</soap:Body>
Response:
<result>
<resultCode>INVALID_SOURCE_SYSTEM</resultCode>
<message>sourceSystemHSAId must match LogicalAddress for direct queries</message>
</result>
Request:
<GetCareDocumentation>
<hasMoreReference>expired-reference-12345</hasMoreReference>
</GetCareDocumentation>
Response:
<result>
<resultCode>INVALID_REFERENCE</resultCode>
<message>hasMoreReference expired or invalid. Please restart query.</message>
</result>
Scenario: 3 systems queried, 2 succeed, 1 times out
Response:
<result>
<resultCode>OK</resultCode>
<message>Partial results returned</message>
</result>
<partial>true</partial>
<failedSources>
<sourceSystem>SE2321000016-SYS3</sourceSystem>
<error>TIMEOUT</error>
<message>System did not respond within timeout period</message>
</failedSources>
<careDocumentation>
<!-- Data from systems 1 and 2 -->
</careDocumentation>
partial flaglogId and errorId from responselogIderrorId for trackingUse INVALID_REQUEST when:
Use VALIDATION_ERROR when:
By Consumer:
By Producer:
By Aggregator:
Critical:
Warning: