0.0.1 • Published 3 years ago

sormas-com v0.0.1

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
github
Last release
3 years ago

telli

Automatic Call Agent for SORMAS Trello Board

  1. Create a technical user in your SORMAS instance. Required permissions: ReST User and Case Officer.

  2. Obtain ID by hovering over the UUID column in the users view.

  3. Configure a new SORMAS instance with the created password, username and id in CosmosDB (Azure)

    {
        "id": "4fdc88d5-b644-4fe0-8a87-cf7382f488e0",
        "sormasServerUrl": "https://sormas.telli.app",
        "sormasUserName": "telli",
        "sormasPassword": "...",
        "sormasUserId": "S77DYK-QDM7UR-AR64YH-S62N2O4E",
        "label": "SORMAS Demo @ telli"
    }
  4. Assign tasks to the telli user. Launching the telli service will now process the assigned tasks.

  5. Configure telli to access the DB and launch it. see .env.default for all configuration options.

Telli API

List SORMAS instances

curl /api/0.0.1/sormas-instances
[
  {
    "id": "4fdc88d5-b644-4fe0-8a87-cf7382f488e0",
    "label": "SORMAS Demo @ telli"
  }
]

Get specific task

curl /api/0.0.1/tasks/:instanceId/:taskId
{
  "firstName": "Karl",
  "lastName": "Theodor",
  "phone": "+491719945956",
  "emailAddress": "mfa@ddunicorn.com",
  "sormasPersonId": "QCHFGR-BINWHF-AZATIK-XAPDCMVU",
  "sormasCaseId": "UJ5CKG-G575NJ-ZAPNDE-SDESKPJU",
  "sormasTaskId": "SCQL2K-B2BTHI-RGIHKH-HOQYSDKA",
  "sormasInstanceId": "4fdc88d5-b644-4fe0-8a87-cf7382f488e0",
  "partitionKey": "4fdc88d5-b644-4fe0-8a87-cf7382f488e0",
  "id": "6835eeb5-af44-491a-8dd2-f3d008947840",
  "_rid": "6F9FAJba6lwKAAAAAAAAAA==",
  "_self": "dbs/6F9FAA==/colls/6F9FAJba6lw=/docs/6F9FAJba6lwKAAAAAAAAAA==/",
  "_etag": "\"ed010cae-0000-1500-0000-5fd0fc600000\"",
  "_attachments": "attachments/",
  "contacts": [
    {
      "Name": "Arnold Lane"
    },
    {
      "Name": "Arnold Lane"
    }
  ],
  "_ts": 1607531616
}

Post contact

Append a contact using. Currently, contacts cannot be deleted by design. Let's discuss this.

curl /api/0.0.1/tasks/:instanceId/:taskId/contacts -d '[{"name": "Arnold Lane"}]'

Appendix

SORMAS REST interface

Entrypoints are defined in sormas-rest referencing sormas-api

Resources

- task
- case
- person
  - contact details

List Ids

curl -k \
  -u 'user:password' \
  https://sormas-docker-test.com/sormas-rest/tasks/uuids
[
  "TFQOSU-MBXIOX-ZIGGHU-HFJQKF3E",
  ...
]

List objects by timestamp

curl -k \
  -u 'user:password' \
  https://sormas-docker-test.com/sormas-rest/tasks/all/0

Retreive objects by Id

curl -k \
  -u 'user:password' \
  -H 'Content-type: application/json' \
  https://sormas-docker-test.com/sormas-rest/tasks/query \
  -d '["TFQOSU-MBXIOX-ZIGGHU-HFJQKF3E", ...]'
[
  {
    "creationDate": 1606893756074,
    "changeDate": 1606896632050,
    "uuid": "VGHBA4-UT4QL5-RUT6JV-UOPDKPFU",
    "taskContext": "CASE",
    "caze": {
      "uuid": "UMUAWB-A7OI3D-3UET7J-JZFGSADE",
      "caption": "Berta BUMS (UMUAWB)",
      "firstName": "Berta",
      "lastName": "Bums"
    },
    "taskType": "CONTACT_TRACING",
    "priority": "NORMAL",
    "dueDate": 1606980120000,
    "suggestedStart": 1606893720000,
    "taskStatus": "DONE",
    "statusChangeDate": 1606896632012,
    "creatorUser": {
      "uuid": "W7KHPR-2K3KVR-5A346A-NPB4SGDE",
      "caption": "ad MIN - Administrator, ReST Benutzer*in"
    },
    "assigneeUser": {
      "uuid": "V4SV7K-T3PRFC-442INS-CY4EKLJM",
      "caption": "Communication AGENT - ReST Benutzer*in, Überwachungsbeauftragte*r"
    },
    "contextReference": {
      "uuid": "UMUAWB-A7OI3D-3UET7J-JZFGSADE",
      "caption": "Berta BUMS (UMUAWB)",
      "firstName": "Berta",
      "lastName": "Bums"
    }
  }
]

Upsert

curl -k \
  -u 'user:password' \
  -H 'Content-type: application/json' \
  https://sormas-docker-test.com/sormas-rest/tasks/push \
  -d '<see below>'

with body

[{
  "creationDate": 1606893756074,
  "changeDate": 1606896632050, // CREATE CURRENT TIMESTAMP IN NANOS. WILL FAIL IF IT IS TOO OLD
  "uuid": "VGHBA4-UT4QL5-RUT6JV-UOPDKPFU",
  "taskContext": "CASE",
  "caze": {
    "uuid": "UMUAWB-A7OI3D-3UET7J-JZFGSADE",
    "caption": "Berta BUMS (UMUAWB)",
    "firstName": "Berta",
    "lastName": "Bums"
  },
  "taskType": "CONTACT_TRACING",
  "priority": "NORMAL",
  "dueDate": 1606980120000,
  "suggestedStart": 1606893720000,
  "taskStatus": "DONE",
  "statusChangeDate": 1606896632012,
  "creatorUser": {
    "uuid": "W7KHPR-2K3KVR-5A346A-NPB4SGDE",
    "caption": "ad MIN - Administrator, ReST Benutzer*in"
  },
  "assigneeUser": {
    "uuid": "V4SV7K-T3PRFC-442INS-CY4EKLJM", // ASSIGN NEW USER BY SETTING THIS UUID
    "caption": "Communication AGENT - ReST Benutzer*in, Überwachungsbeauftragte*r"
  },
  "contextReference": {
    "uuid": "UMUAWB-A7OI3D-3UET7J-JZFGSADE",
    "caption": "Berta BUMS (UMUAWB)",
    "firstName": "Berta",
    "lastName": "Bums"
  }
}]

German Authorities

Setup

  1. Loggen Sie sich in SORMAS als Administrator ein und erstellen Sie einen neuen Benutzer: Benutzer -> Neuer Nutzer (oben rechts).
    • Wählen Sie einen Namen und Benutzernamen, den Sie wiedererkennen. Zum Beispiel "Telefon Agent" "telefon-agent".
    • Vergeben Sie die Benutzerrolle ReST Benutzer*in
    • Vergeben Sie die Benutzerrolle Überwachungsbeauftragte*r
    • "Aktiv" muss ausgewählt sein.
    • Notieren Sie Nutzernamen und Passwort (Passwort wird nach Erstellen des Nutzers angezeigt)