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

WSDL and Schema Reference

WSDL and Schema Reference

This page provides technical reference information for WSDL interfaces and XML schemas used in the Health Condition Description service domain.

Service Endpoints

Production Environment

Service Endpoint URL WSDL Location
GetCareDocumentation https://services.inera.se/clinicalprocess/healthcond/description/GetCareDocumentation/2/rivtabp21 WSDL
GetDiagnosis https://services.inera.se/clinicalprocess/healthcond/description/GetDiagnosis/2/rivtabp21 WSDL
GetAlertInformation https://services.inera.se/clinicalprocess/healthcond/description/GetAlertInformation/2/rivtabp21 WSDL
GetFunctionalStatus https://services.inera.se/clinicalprocess/healthcond/description/GetFunctionalStatus/2/rivtabp21 WSDL

Test Environment

Service Endpoint URL
GetCareDocumentation https://qa.services.inera.se/clinicalprocess/healthcond/description/GetCareDocumentation/2/rivtabp21
GetDiagnosis https://qa.services.inera.se/clinicalprocess/healthcond/description/GetDiagnosis/2/rivtabp21
GetAlertInformation https://qa.services.inera.se/clinicalprocess/healthcond/description/GetAlertInformation/2/rivtabp21
GetFunctionalStatus https://qa.services.inera.se/clinicalprocess/healthcond/description/GetFunctionalStatus/2/rivtabp21

XML Namespaces

Service Namespaces

Namespace Prefix Namespace URI Usage
gcd urn:riv:clinicalprocess:healthcond:description:GetCareDocumentationResponder:2 GetCareDocumentation service
gd urn:riv:clinicalprocess:healthcond:description:GetDiagnosisResponder:2 GetDiagnosis service
gai urn:riv:clinicalprocess:healthcond:description:GetAlertInformationResponder:2 GetAlertInformation service
gfs urn:riv:clinicalprocess:healthcond:description:GetFunctionalStatusResponder:2 GetFunctionalStatus service
types urn:riv:clinicalprocess:healthcond:description:2 Common types

Infrastructure Namespaces

Namespace Prefix Namespace URI Usage
soap http://www.w3.org/2003/05/soap-envelope SOAP 1.2 envelope
wsa http://www.w3.org/2005/08/addressing WS-Addressing
wsse http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd WS-Security header
wsu http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd WS-Security utility
ds http://www.w3.org/2000/09/xmldsig# XML digital signature

Common Type Namespaces

Namespace Prefix Namespace URI Usage
core urn:riv:clinicalprocess:healthcond:description:core:2 Core data types
ii urn:riv:itintegration:registry:1 Instance identifiers
codes urn:riv:clinicalprocess:healthcond:description:enums:2 Code enumerations

WSDL Structure

Port Types

Each service defines a port type with a single operation:

<wsdl:portType name="GetCareDocumentationResponderInterface">
  <wsdl:operation name="GetCareDocumentation">
    <wsdl:input message="tns:GetCareDocumentationRequest"/>
    <wsdl:output message="tns:GetCareDocumentationResponse"/>
  </wsdl:operation>
</wsdl:portType>

Bindings

Services use SOAP 1.2 with document/literal binding:

<wsdl:binding name="GetCareDocumentationResponderBinding" 
              type="tns:GetCareDocumentationResponderInterface">
  <soap:binding style="document" 
                transport="http://schemas.xmlsoap.org/soap/http"/>
  <wsdl:operation name="GetCareDocumentation">
    <soap:operation soapAction="urn:riv:clinicalprocess:healthcond:description:GetCareDocumentationResponder:2:GetCareDocumentation"/>
    <wsdl:input>
      <soap:body use="literal"/>
    </wsdl:input>
    <wsdl:output>
      <soap:body use="literal"/>
    </wsdl:output>
  </wsdl:operation>
</wsdl:binding>

Services

<wsdl:service name="GetCareDocumentationResponderService">
  <wsdl:port name="GetCareDocumentationResponderPort" 
             binding="tns:GetCareDocumentationResponderBinding">
    <soap:address location="https://services.inera.se/..."/>
  </wsdl:port>
</wsdl:service>

Schema Definitions

GetCareDocumentation Request Schema

<xs:complexType name="GetCareDocumentationType">
  <xs:sequence>
    <xs:element name="patientId" type="core:PersonIdType"/>
    <xs:element name="careUnitHSAId" type="core:HSAIdType" 
                minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="timePeriod" type="core:DatePeriodType" 
                minOccurs="0"/>
    <xs:element name="sourceSystemHSAId" type="core:HSAIdType" 
                minOccurs="0"/>
    <xs:element name="careContactId" type="xs:string" 
                minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="hasMoreReference" type="xs:string" 
                minOccurs="0"/>
    <xs:any namespace="##other" processContents="lax" 
            minOccurs="0" maxOccurs="unbounded"/>
  </xs:sequence>
</xs:complexType>

GetCareDocumentation Response Schema

<xs:complexType name="GetCareDocumentationResponseType">
  <xs:sequence>
    <xs:element name="result" type="core:ResultType"/>
    <xs:element name="careDocumentation" type="types:CareDocumentationType" 
                minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="hasMore" type="xs:boolean" 
                minOccurs="0"/>
    <xs:element name="hasMoreReference" type="xs:string" 
                minOccurs="0"/>
    <xs:any namespace="##other" processContents="lax" 
            minOccurs="0" maxOccurs="unbounded"/>
  </xs:sequence>
</xs:complexType>

Common Type: PersonIdType

<xs:complexType name="PersonIdType">
  <xs:sequence>
    <xs:element name="id" type="xs:string">
      <xs:annotation>
        <xs:documentation>
          Personal identity number (12 digits, no separators)
        </xs:documentation>
      </xs:annotation>
    </xs:element>
    <xs:element name="type" type="xs:string">
      <xs:annotation>
        <xs:documentation>
          OID for identifier type:
          1.2.752.129.2.1.3.1 (personnummer)
          1.2.752.129.2.1.3.3 (samordningsnummer)
        </xs:documentation>
      </xs:annotation>
    </xs:element>
  </xs:sequence>
</xs:complexType>

Common Type: ResultType

<xs:complexType name="ResultType">
  <xs:sequence>
    <xs:element name="resultCode" type="types:ResultCodeEnum"/>
    <xs:element name="message" type="xs:string" minOccurs="0"/>
    <xs:element name="errorId" type="xs:string" minOccurs="0"/>
    <xs:element name="logId" type="xs:string" minOccurs="0"/>
    <xs:any namespace="##other" processContents="lax" 
            minOccurs="0" maxOccurs="unbounded"/>
  </xs:sequence>
</xs:complexType>

<xs:simpleType name="ResultCodeEnum">
  <xs:restriction base="xs:string">
    <xs:enumeration value="OK"/>
    <xs:enumeration value="INFO"/>
    <xs:enumeration value="INVALID_REQUEST"/>
    <xs:enumeration value="ACCESS_DENIED"/>
    <xs:enumeration value="TECHNICAL_ERROR"/>
    <!-- Additional codes... -->
  </xs:restriction>
</xs:simpleType>

SOAP Action Values

Each service operation has a specific SOAP Action header value:

Service SOAP Action
GetCareDocumentation urn:riv:clinicalprocess:healthcond:description:GetCareDocumentationResponder:2:GetCareDocumentation
GetDiagnosis urn:riv:clinicalprocess:healthcond:description:GetDiagnosisResponder:2:GetDiagnosis
GetAlertInformation urn:riv:clinicalprocess:healthcond:description:GetAlertInformationResponder:2:GetAlertInformation
GetFunctionalStatus urn:riv:clinicalprocess:healthcond:description:GetFunctionalStatusResponder:2:GetFunctionalStatus

WS-Addressing Headers

All requests must include WS-Addressing headers:

<soap:Header>
  <wsa:To>https://services.inera.se/...</wsa:To>
  <wsa:Action>urn:riv:clinicalprocess:healthcond:description:...</wsa:Action>
  <wsa:MessageID>urn:uuid:{UUID}</wsa:MessageID>
  <wsa:ReplyTo>
    <wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
  </wsa:ReplyTo>
  <urn:LogicalAddress xmlns:urn="urn:riv:itintegration:registry:1">
    {HSA-ID}
  </urn:LogicalAddress>
</soap:Header>

Required Headers

Header Description Example
wsa:To Target endpoint URL https://services.inera.se/…
wsa:Action SOAP action for operation urn:riv:clinicalprocess:…
wsa:MessageID Unique message identifier urn:uuid:12345678-…
urn:LogicalAddress Target system HSA-ID 5565594230 (national)

Schema Validation

Validation Rules

  1. Required Elements: All elements with minOccurs="1" must be present
  2. Data Types: Values must conform to specified types (string, dateTime, etc.)
  3. Cardinality: Element occurrences must respect minOccurs/maxOccurs
  4. Fixed Values: Code system OIDs must match expected values
  5. Patterns: Identifiers must match format patterns (12 digits, etc.)

Common Validation Errors

Error Cause Solution
Missing required element patientId not provided Include patientId with id and type
Invalid date format timePeriod uses wrong format Use YYYYMMDD format
Invalid OID Incorrect code system OID Use documented OID values
Cardinality violation Too many occurrences Check maxOccurs limits

Code Generation

Java (JAX-WS)

wsimport -keep -s src/main/java \
  https://services.inera.se/.../GetCareDocumentationResponder_2.0.wsdl

.NET (WCF)

svcutil /language:cs /out:GetCareDocumentationClient.cs \
  https://services.inera.se/.../GetCareDocumentationResponder_2.0.wsdl

Python (zeep)

from zeep import Client

wsdl_url = "https://services.inera.se/.../GetCareDocumentationResponder_2.0.wsdl"
client = Client(wsdl_url)

Schema Extensibility

All types support extension via xs:any:

<xs:any namespace="##other" processContents="lax" 
        minOccurs="0" maxOccurs="unbounded"/>

Rules for Extensions:

  • Must use different namespace than service schema
  • Should be ignored by receivers not understanding them
  • Must not change semantics of standard elements
  • Use for local customizations only

Version Compatibility

Schema Version Handling

Version Schema Changes Compatibility
2.0 → 2.1 Add optional elements Forward compatible
2.0 → 3.0 Remove/rename elements Breaking change

WSDL Version in URL

The version is included in the endpoint URL:

  • .../GetCareDocumentation/2/... for version 2.x
  • .../GetCareDocumentation/3/... for version 3.x
Standard Version Reference
SOAP 1.2 W3C
WS-Addressing 1.0 W3C
WS-Security 1.1 OASIS
XML Schema 1.1 W3C
RIV Technical Framework 2.1 Inera

Tools and Resources

Validation Tools

  • XMLSpy - Schema validation and WSDL testing
  • SoapUI - Service testing and validation
  • Oxygen XML - Schema development and validation
  • Online validators - xmlvalidation.com, etc.

Code Generation Tools

  • JAX-WS (Java) - wsimport, CXF wsdl2java
  • WCF (.NET) - svcutil, Visual Studio
  • Zeep (Python) - WSDL-based client generation
  • gSOAP (C/C++) - wsdl2h code generator

Support and Documentation

  • RIV Technical Framework: https://www.inera.se/riv
  • Service Catalog: https://services.inera.se/
  • Code Examples: See Testing documentation
  • Support: Contact Inera support portal

See Also