Skip to content

Commit

Permalink
Created converting messages guide
Browse files Browse the repository at this point in the history
Created converting messages guide
  • Loading branch information
CaitlinV39 committed Feb 25, 2020
1 parent f697f66 commit 85f054c
Show file tree
Hide file tree
Showing 3 changed files with 199 additions and 2 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,23 @@ The open-source FHIR Converter consists of the following of functionality:

For additional information, see the following documentation:

### QuickStart guides

* QuickStart guide to deploy locally
* QuickStart guide to deploy to Azure

### Template creation and management details

* [How to create templates guide](docs/template-creation-how-to-guide.md)
* [Partial template conceptual guide](docs/partial-template-concept.md)
* [Examples of using helper functions](docs/using-helpers-concept.md)

### Message conversion details

* [Converting messages conceptual guide](docs/convert-messages-concept.md)

### Additional Resources

* [Summary of available APIs](docs/api-summary.md)
* [Helper function summary](docs/helper-functions-summary.md)
* [Web UI summary](docs/web-ui-summary.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/api-summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ The API is secured using an API Key.
|PUT |/api/templates/{file} |Stores a template in the template store |
|DELETE |/api​/templates​/{file} |Deletes a template |
|POST |/api/UpdateBaseTemplates |Updates base templates (deletes existing data). This should be used only when latest version of templates needs to be pulled.
|POST |/api/convert/hl7 |Converts an HL7 v2 message to FHIR using template|
|POST |/api/convert/hl7/{template}|Converts an HL7 v2 message to FHIR using template|
|POST |/api/convert/hl7 |Converts an HL7 v2 message to FHIR using a template directly from the end point|
|POST |/api/convert/hl7/{template}|Converts an HL7 v2 message to FHIR using a template from storage|
185 changes: 185 additions & 0 deletions docs/convert-messages-concept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
# HL7 v2 Message to FHIR Bundle Conversion

The power of the FHIR Converter lies in its ability to convert 100s of messages per second real-time. Once you have modified the templates to meet your need, you can call the API as part of your workflow. In the sections below we have an overview of the API and the output you get from the conversion.

## APIs

To convert your messages leveraging the API, there are two different POST calls you can make depending on how you want to call your template. You can either setup the end point to call the template directly or you can call a template from storage.

| Function | Syntax | Details |
|----------|---------------------------|-------------------------------------------------|
|POST |/api/convert/hl7 |Converts an HL7 v2 message to FHIR using a template directly from the end point|
|POST |/api/convert/hl7/{template}|Converts an HL7 v2 message to FHIR using a template from storage|

## Conversion output

Each time a message is converted using the APIs, there are three pieces of information returned:

| Section | Details | Use Case |
|-|-|-|
| **fhirResource** | The FHIR bundle for the converted HL7 v2 message | The fhirResource is the FHIR bundle that you can do further manipulation on or persist directly in a FHIR server
| **unusedSegments** | A list of segments that the template didn’t look at that were present in the message. In the Web UI, these are the segments that were underlined in red dots (...) | You can use the details returned in this section to see if there were any required segments that weren't processed. In this way, you can ensure that you don't store a FHIR bundle that is missing key information from the HL7 v2 message |
| **invalidAccess** | A list of segments the template tried to access that didn’t exist in the incoming HL7 v2 message | The invalidAccess section allows you to do post-processing on the FHIR bundle to ensure that the incoming HL7 v2 messages that was processed didn't have any major issues. For example, you may want to reject or investigate any message that is missing the Patient Identifier |

## Examples

Below are examples of each piece of the conversion output.

### fhirResource example

```JSON
{
"fhirResource": {
"resourceType": "Bundle",
"$2$": "transaction",
"entry": [
{
"fullUrl": "urn:uuid:4eb5c7ca-9f74-3032-981c-c1954b471dbe",
"resource": {
"resourceType": "Patient",
"id": "4eb5c7ca-9f74-3032-981c-c1954b471dbe",
"identifier": [
{
"value": "10006579"
},
{
"value": "123121234"
}
],
"name": [
{
"family": "DUCK",
"given": [
"DONALD",
"D"
]
}
],
"birthDate": "1924-10-10",
"gender": "male",
"address": [
{
"line": [
"111 DUCK ST"
],
"city": "FOWL",
"state": "CA",
"postalCode": "999990000",
"type": "postal"
},
{
"district": "1"
}
],
"telecom": [
{
"value": "8885551212",
"use": "home"
}
],
"communication": [
{
"preferred": "true"
}
]
},
"request": {
"method": "POST",
"url": "Patient"
}
},
]
}
```

### unusedSegments

```JSON
"unusedSegments": [
{
"type": "IN1",
"line": 7,
"field": [
{
"index": 1,
"component": [
"1"
]
},
{
"index": 2,
"component": [
"MEDICARE"
]
},
{
"index": 3,
"component": [
"3"
]
},
{
"index": 12,
"component": [
"19891001"
]
},
{
"index": 15,
"component": [
"4"
]
},
{
"index": 16,
"component": [
"DUCK",
"DONALD",
"D"
]
},
]
},
]
```

### invalidAccess

```json
"invalidAccess": [
{
"type": "PID",
"line": 2,
"field": [
{
"index": 40
},
{
"index": 33
}
]
},
{
"type": "NK1",
"line": 3,
"field": [
{
"index": 32
},
{
"index": 31
},
{
"index": 40
},
{
"index": 41
},
{
"index": 30
}
]
},
]
}
```

0 comments on commit 85f054c

Please sign in to comment.