Zugelassene Untersuchungsstellen abrufen
Das folgende Beispiel zeigt den GraphQL-Abruf zugelassener Untersuchungsstellen. Die Abfrage eignet sich für API-Anbindungen, wenn Stammdaten zugelassener Untersuchungsstellen, Zulassungsinformationen oder verfügbare Untersuchungsparameter referenziert werden sollen.
laboratory:view/api/graphql/serviceWeitere Informationen zu Basis-URLs und Umgebungen stehen im Kapitel Endpunkte.
Welche Abfrage wann?
| Abfrage | Zweck | Eingabe | Rückgabe |
|---|---|---|---|
laboratoryList | Mehrere Untersuchungsstellen abrufen, zum Beispiel für Auswahllisten oder Stammdatenabgleiche. | input: LaboratoryListInput. In diesem Beispiel wird nur pagination verwendet. | Liste unter items und Gesamtzahl unter total. |
laboratoryById | Eine einzelne Untersuchungsstelle anhand ihrer id abrufen. | id: ID!. | Ein LaboratoryDetails-Objekt. |
laboratoryList
laboratoryList eignet sich für Übersichten und Trefferlisten. Allgemeine Listenfunktionen wie Pagination, Suche, Filterung und Sortierung werden zentral im Kapitel GraphQL-Variablen und Listenabfragen beschrieben.
Objektstruktur und Felder
Die folgende Feldliste dokumentiert die Rückgabefelder aus dem Beispiel unter data.laboratoryList.items.
input
LaboratoryListInputtotal
Int!items
[LaboratoryItem!]!itemsr
ID!id
ID!name
Stringactive
Boolean!editable
Booleanparent
LaboratoryParentItemitems.parentr
IDid
IDname
StringitemsparamsValue
StringparamsVersion
Intaccreditation
Stringflags
LaboratoryFlags!items.flagsofficiallyApproved
Boolean!accredPhPhChChTests
Boolean!accredPhPhChChSample
Boolean!microbiologicalTests
Boolean!microbiologicalSample
Boolean!radionuclidesTests
Boolean!radionuclidesSample
Boolean!onSiteParameterTests
Boolean!onSiteParameterSample
Boolean!otherTests
Boolean!testAreasAdditionalInformation
StringsupplementaryInformation
Stringitemsaddress
Address!items.addresstext
Stringstreet
Stringhouse
Stringzip
Stringplace
Stringadditional
Stringstate
Stringitemscontact
Contact!items.contactmailbox
String[String!]phone
[String!]website
[String!]itemsbranches
Int!readRights
Booleanquery LaboratoryList($input: LaboratoryListInput) {
laboratoryList(input: $input) {
total
items {
r
id
name
active
editable
parent { r id name }
paramsValue
paramsVersion
accreditation
flags {
officiallyApproved
accredPhPhChChTests
accredPhPhChChSample
microbiologicalTests
microbiologicalSample
radionuclidesTests
radionuclidesSample
onSiteParameterTests
onSiteParameterSample
otherTests
testAreasAdditionalInformation
supplementaryInformation
}
address { text street house zip place additional state }
contact { mailbox email phone website }
branches
readRights
}
}
}{
"input": {
"pagination": {
"page": 0,
"limit": 10
}
}
}{
"data": {
"laboratoryList": {
"total": 1,
"items": [
{
"r": "R092901B140EF8707000",
"id": "D-PL-99999-99-08BY2",
"name": "Muster Labor",
"active": true,
"editable": false,
"parent": null,
"paramsValue": "<In Klärung>",
"paramsVersion": 1,
"accreditation": "D-PL-99999-99",
"flags": {
"officiallyApproved": true,
"accredPhPhChChTests": true,
"accredPhPhChChSample": true,
"microbiologicalTests": true,
"microbiologicalSample": true,
"radionuclidesTests": false,
"radionuclidesSample": false,
"onSiteParameterTests": true,
"onSiteParameterSample": true,
"otherTests": false,
"testAreasAdditionalInformation": null,
"supplementaryInformation": null
},
"address": {
"text": "Musterstraße 1, 00000 Musterstadt",
"street": "Musterstraße",
"house": "1",
"zip": "00000",
"place": "Musterstadt",
"additional": "",
"state": "DE"
},
"contact": {
"mailbox": "info@example-labor.org",
"email": ["info@example-labor.org"],
"phone": ["+49 89 987654"],
"website": ["https://example-labor.org"]
},
"branches": 0,
"readRights": true
}
]
}
}
}laboratoryById
laboratoryById wird verwendet, wenn die ID einer Untersuchungsstelle bereits bekannt ist. Die ID stammt typischerweise aus laboratoryList.items.id.
Parameter
id
ID!query LaboratoryById($id: ID!) {
laboratoryById(id: $id) {
r
id
name
active
editable
parent { r id name }
paramsValue
paramsVersion
accreditation
flags {
officiallyApproved
accredPhPhChChTests
accredPhPhChChSample
microbiologicalTests
microbiologicalSample
radionuclidesTests
radionuclidesSample
onSiteParameterTests
onSiteParameterSample
otherTests
testAreasAdditionalInformation
supplementaryInformation
}
address { text street house zip place additional state }
contact { mailbox email phone website }
branches
readRights
accreditationDocuments { id filename mimeType size }
}
}{
"id": "<DUMMY-SHAPTH-ID>"
}{
"data": {
"laboratoryById": {
"r": "T09B1A5A55292000",
"id": "D-PL-99999-99-08BY2",
"name": "Muster Labor",
"active": true,
"editable": null,
"parent": null,
"paramsValue": "<In Klärung>",
"paramsVersion": 1,
"accreditation": "D-PL-99999-99",
"flags": {
"officiallyApproved": false,
"accredPhPhChChTests": false,
"accredPhPhChChSample": false,
"microbiologicalTests": false,
"microbiologicalSample": false,
"radionuclidesTests": false,
"radionuclidesSample": false,
"onSiteParameterTests": false,
"onSiteParameterSample": false,
"otherTests": false,
"testAreasAdditionalInformation": "",
"supplementaryInformation": null
},
"address": {
"text": "Musterstraße 1, 00000 Musterstadt",
"street": "Musterstraße",
"house": "1",
"zip": "00000",
"place": "Musterstadt",
"additional": "",
"state": "DE"
},
"contact": {
"mailbox": "",
"email": [],
"phone": [],
"website": []
},
"branches": 1,
"readRights": null,
"accreditationDocuments": []
}
}
}GraphQL-Enums
| Enum | Werte | Einsatz |
|---|---|---|
LaboratorySearchField | ID, NAME, ADDRESS | Suchfelder für input.search.fields. |
LaboratorySortField | ID, NAME, ADDRESS, STREET, HOUSE, ZIP, PLACE, CREATED_AT, CREATED_BY, UPDATED_AT, UPDATED_BY, BRANCHES | Sortierfelder für input.sort.by. |
SortOrder | ASC, DESC | Sortierreihenfolge für input.sort.order. |