Skip to content

Commit

Permalink
Add getting-trust-frameworks.md
Browse files Browse the repository at this point in the history
  • Loading branch information
avanbremen committed Sep 26, 2024
1 parent 556a9ba commit 260f94e
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 10 deletions.
11 changes: 1 addition & 10 deletions docs/learn/agreements/adding-a-trust-framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,7 @@

## Entity relationship diagram

``` mermaid
erDiagram
TRUST-FRAMEWORK ||--o{ VERSION : contains
TRUST-FRAMEWORK }o..|| ORGANIZATION : references
```

!!! info

- Exactly one `TRUST-FRAMEWORK` *contains* zero or more `VERSION`
- Zero or more `TRUST-FRAMEWORK` *references* exactly one `ORGANIZATION`
--8<-- "learn/agreements/snippets/trust-framework-entity-relationship-diagram.md"

## Add trust framework

Expand Down
61 changes: 61 additions & 0 deletions docs/learn/agreements/getting-trust-frameworks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Getting trust frameworks

## Entity relationship diagram

--8<-- "learn/agreements/snippets/trust-framework-entity-relationship-diagram.md"

## Get trust frameworks

=== "Request"

```json
GET https://api.zorgapis.nl/v1beta1/trust-frameworks HTTP/1.1
```

=== "Response"

```json hl_lines="6 15"
HTTP/1.1 200 OK
Content-Type: application/json

--8<-- "learn/agreements/snippets/get-trust-frameworks_response.json"
```

1. The UUID of the [trust framework](./adding-a-trust-framework.md#add-trust-framework).
2. The UUID of the [main version](./adding-a-trust-framework.md#set-trust-framework-main-version-request).

!!! note

To learn more, view the [API reference](
https://oas.zorgapis.nl/#tag/trust-frameworks/operation/listTrustFrameworks){: target="_blank" }
or fork our [Postman Collection](
https://www.postman.com/zorgapis/zorgapis/collection/6oerml3/zorgapis-api){: target="_blank" }
and explore our API.

## Get trust framework versions

List all versions for the trust framework with id `#!js "3b49f2e6-fd5c-48a8-a59c-5fcbed78e5ae"`:

=== "Request"

```json
GET https://api.zorgapis.nl/v1beta1/trust-framework-versions
?filter=eq(trustFrameworkId,"3b49f2e6-fd5c-48a8-a59c-5fcbed78e5ae") HTTP/1.1
```

=== "Response"

```json hl_lines="9"
HTTP/1.1 200 OK
Content-Type: application/json

--8<-- "learn/agreements/snippets/get-trust-framework-versions_response.json"
```

!!! note

To learn more, view the [API reference](
https://oas.zorgapis.nl/#tag/trust-framework-versions/operation/listTrustFrameworkVersions){: target="_blank" }
or fork our [Postman Collection](
https://www.postman.com/zorgapis/zorgapis/collection/6oerml3/zorgapis-api){: target="_blank" }
and explore our API.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[
{
"id": "78ca8495-a4f4-4b41-b97b-c912c2e96450",
"name": "2.2.2 Verplicht",
"description": "Dit is de huidige verplichte versie die door alle deelnemers moet worden ondersteund.",
"trustFrameworkId": "3b49f2e6-fd5c-48a8-a59c-5fcbed78e5ae",
"trustFramework": {
"id": "3b49f2e6-fd5c-48a8-a59c-5fcbed78e5ae",
"name": "MedMij Afsprakenstelsel"
},
"publishTime": "2024-09-10T12:00:00.0000000Z",
"semVer": {
"major": 2,
"minor": 2,
"patch": 2
},
"lifecycleState": "PUBLISHED",
"url": "https://afsprakenstelsel.medmij.nl/asverplicht/mmverplicht"
},
...
]
28 changes: 28 additions & 0 deletions docs/learn/agreements/snippets/get-trust-frameworks_response.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[
{
"id": "3b49f2e6-fd5c-48a8-a59c-5fcbed78e5ae", // (1)!
"name": "MedMij Afsprakenstelsel",
"description": "Het MedMij Afsprakenstelsel draagt eraan bij dat persoonsgebonden, gevoelige en vertrouwelijke gezondheidsgegevens op een veilige en gebruiksvriendelijke wijze uitgewisseld kunnen worden tussen persoonlijke gezondheidsomgevingen en aanbieders.",
"organizationId": "4a7c2c17-6514-46f8-aa05-6a22fb18b4ad",
"organization": {
"id": "4a7c2c17-6514-46f8-aa05-6a22fb18b4ad",
"name": "Stichting MedMij"
},
"url": "https://afsprakenstelsel.medmij.nl/",
"mainVersionId": "78ca8495-a4f4-4b41-b97b-c912c2e96450", // (2)!
"mainVersion": {
"id": "78ca8495-a4f4-4b41-b97b-c912c2e96450",
"name": "2.2.2 Verplicht",
"description": "Dit is de huidige verplichte versie die door alle deelnemers moet worden ondersteund.",
"publishTime": "2024-09-10T12:00:00.0000000Z",
"semVer": {
"major": 2,
"minor": 2,
"patch": 2
},
"lifecycleState": "PUBLISHED",
"url": "https://afsprakenstelsel.medmij.nl/asverplicht/mmverplicht"
}
},
...
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
``` mermaid
erDiagram
TRUST-FRAMEWORK ||--o{ VERSION : contains
TRUST-FRAMEWORK }o..|| ORGANIZATION : references
```

!!! info

- Exactly one `TRUST-FRAMEWORK` *contains* zero or more `VERSION`
- Zero or more `TRUST-FRAMEWORK` *references* exactly one `ORGANIZATION`
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ nav:
- Adding a communication standard: learn/standards/adding-a-communication-standard.md
- Agreements:
- learn/agreements/index.md
- Getting trust frameworks: learn/agreements/getting-trust-frameworks.md
- Adding a trust framework: learn/agreements/adding-a-trust-framework.md
- Play:
- play/index.md
Expand Down

0 comments on commit 260f94e

Please sign in to comment.