From 32df37b78e71b7ba8776d9a57abb9e7613054218 Mon Sep 17 00:00:00 2001 From: Thomas Schaffter Date: Fri, 14 May 2021 07:49:38 -0700 Subject: [PATCH] Release 1.1.1 (#168) * Add ID, Contact and COVID Symptom annotation DB models * Update mongoengine to 0.23.1 for better EnumField support * Use enum in annotation DB models * Add support for new annotations to controller * Add context around image in README * Run npm run generate:server:edge * Fix DB annoration model * Bump project version to 1.1.1 --- README.md | 10 +- docker-compose.yml | 2 +- package-lock.json | 1378 ++++++++++++++++- .../controllers/annotation_controller.py | 26 +- server/openapi_server/dbmodels/annotation.py | 6 + .../dbmodels/text_contact_annotation.py | 22 + .../dbmodels/text_covid_symptom_annotation.py | 44 + .../dbmodels/text_date_annotation.py | 6 +- .../dbmodels/text_id_annotation.py | 26 + .../dbmodels/text_person_name_annotation.py | 4 +- .../text_physical_address_annotation.py | 22 +- server/openapi_server/models/__init__.py | 6 + server/openapi_server/models/annotation.py | 96 +- .../models/annotation_create_request.py | 96 +- .../models/text_contact_annotation.py | 200 +++ .../models/text_contact_annotation_all_of.py | 72 + .../models/text_covid_symptom_annotation.py | 234 +++ .../text_covid_symptom_annotation_all_of.py | 106 ++ .../models/text_id_annotation.py | 200 +++ .../models/text_id_annotation_all_of.py | 72 + server/openapi_server/openapi/openapi.yaml | 212 ++- .../openapi_server/test/integration/util.py | 5 +- server/requirements.txt | 2 +- 23 files changed, 2824 insertions(+), 23 deletions(-) create mode 100644 server/openapi_server/dbmodels/text_contact_annotation.py create mode 100644 server/openapi_server/dbmodels/text_covid_symptom_annotation.py create mode 100644 server/openapi_server/dbmodels/text_id_annotation.py create mode 100644 server/openapi_server/models/text_contact_annotation.py create mode 100644 server/openapi_server/models/text_contact_annotation_all_of.py create mode 100644 server/openapi_server/models/text_covid_symptom_annotation.py create mode 100644 server/openapi_server/models/text_covid_symptom_annotation_all_of.py create mode 100644 server/openapi_server/models/text_id_annotation.py create mode 100644 server/openapi_server/models/text_id_annotation_all_of.py diff --git a/README.md b/README.md index fc7a1ad..72691cf 100644 --- a/README.md +++ b/README.md @@ -24,12 +24,18 @@ This Data Node can be used to: - Create and manage annotation stores - Store and retrieve text annotations +The figure below illustrates the organization of the data. A Dataset can have +one or more FhirStores and AnnotationStores. An AnnotationStore can include +different types of annotations. In NLPSandbox.io, the gold standard of a dataset +is stored in one AnnotationStore. We then use N AnnotationStores to store the +predictions generated by N tools contributed to NLPSandbox.io. + ### Specification -- Data Node API version: 1.1.0 -- Data Node version: 1.1.0 +- Data Node API version: 1.1.1 +- Data Node version: 1.1.1 - Docker image: [nlpsandbox/data-node] ## Usage diff --git a/docker-compose.yml b/docker-compose.yml index c546c54..9016cb8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,7 +17,7 @@ services: - "${MONGO_PORT}:27017" data-node: - image: nlpsandbox/data-node:1.1.0 + image: nlpsandbox/data-node:1.1.1 build: context: server dockerfile: Dockerfile diff --git a/package-lock.json b/package-lock.json index 9db42a4..9e5f116 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,1382 @@ { + "name": "data-node", + "lockfileVersion": 2, "requires": true, - "lockfileVersion": 1, + "packages": { + "": { + "devDependencies": { + "@openapitools/openapi-generator-cli": "2.2.6" + } + }, + "node_modules/@nestjs/common": { + "version": "7.6.15", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-7.6.15.tgz", + "integrity": "sha512-H/3Nk7M02Fc4YN9St05i34gZKVuzE54gd5eXAX6WwisqU5fQ00kss1pYGbltjb2QGu3A/fpO1MdYEwOA18Z/VQ==", + "dev": true, + "dependencies": { + "axios": "0.21.1", + "iterare": "1.2.1", + "tslib": "2.1.0", + "uuid": "8.3.2" + } + }, + "node_modules/@nestjs/common/node_modules/tslib": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", + "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==", + "dev": true + }, + "node_modules/@nestjs/core": { + "version": "7.6.15", + "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-7.6.15.tgz", + "integrity": "sha512-8CrL/iY5Gt4HJfyDg1PgPalhT7tVRT643f2mGMgPum/P/e94uuwEYBNIgsMEVOJUrOAWZkNIN60uEf8JkH6GWw==", + "dev": true, + "dependencies": { + "@nuxtjs/opencollective": "0.3.2", + "fast-safe-stringify": "2.0.7", + "iterare": "1.2.1", + "object-hash": "2.1.1", + "path-to-regexp": "3.2.0", + "tslib": "2.1.0", + "uuid": "8.3.2" + } + }, + "node_modules/@nestjs/core/node_modules/tslib": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", + "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==", + "dev": true + }, + "node_modules/@nuxtjs/opencollective": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.3.2.tgz", + "integrity": "sha512-um0xL3fO7Mf4fDxcqx9KryrB7zgRM5JSlvGN5AGkP6JLM5XEKyjeAiPbNxdXVXQ16isuAhYpvP88NgL2BGd6aA==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "consola": "^2.15.0", + "node-fetch": "^2.6.1" + }, + "bin": { + "opencollective": "bin/opencollective.js" + }, + "engines": { + "node": ">=8.0.0", + "npm": ">=5.0.0" + } + }, + "node_modules/@openapitools/openapi-generator-cli": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.2.6.tgz", + "integrity": "sha512-TFKHY1lcknzg6IhPe9f8wWUO11PeKBPnrM40jZjZNUHlQRvh7WLsW6vNlbGcm78eBYTcyY0cKqr1QXUpB9Ez2Q==", + "dev": true, + "dependencies": { + "@nestjs/common": "7.6.15", + "@nestjs/core": "7.6.15", + "@nuxtjs/opencollective": "0.3.2", + "chalk": "4.1.1", + "commander": "6.2.1", + "compare-versions": "3.6.0", + "concurrently": "5.3.0", + "console.table": "0.10.0", + "fs-extra": "9.1.0", + "glob": "7.1.6", + "inquirer": "7.3.3", + "lodash": "4.17.21", + "reflect-metadata": "0.1.13", + "rxjs": "6.6.7", + "tslib": "1.13.0" + }, + "bin": { + "openapi-generator-cli": "main.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", + "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", + "dev": true, + "dependencies": { + "type-fest": "^0.11.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/axios": { + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", + "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", + "dev": true, + "dependencies": { + "follow-redirects": "^1.10.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "dependencies": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "node_modules/cliui/node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/cliui/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/compare-versions": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz", + "integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/concurrently": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-5.3.0.tgz", + "integrity": "sha512-8MhqOB6PWlBfA2vJ8a0bSFKATOdWlHiQlk11IfmQBPaHVP8oP2gsh2MObE6UR3hqDHqvaIvLTyceNW6obVuFHQ==", + "dev": true, + "dependencies": { + "chalk": "^2.4.2", + "date-fns": "^2.0.1", + "lodash": "^4.17.15", + "read-pkg": "^4.0.1", + "rxjs": "^6.5.2", + "spawn-command": "^0.0.2-1", + "supports-color": "^6.1.0", + "tree-kill": "^1.2.2", + "yargs": "^13.3.0" + }, + "bin": { + "concurrently": "bin/concurrently.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/concurrently/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/concurrently/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/concurrently/node_modules/chalk/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/concurrently/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/concurrently/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/concurrently/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/concurrently/node_modules/supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/consola": { + "version": "2.15.3", + "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz", + "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==", + "dev": true + }, + "node_modules/console.table": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/console.table/-/console.table-0.10.0.tgz", + "integrity": "sha1-CRcCVYiHW+/XDPLv9L7yxuLXXQQ=", + "dev": true, + "dependencies": { + "easy-table": "1.1.0" + }, + "engines": { + "node": "> 0.10" + } + }, + "node_modules/date-fns": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.19.0.tgz", + "integrity": "sha512-X3bf2iTPgCAQp9wvjOQytnf5vO5rESYRXlPIVcgSbtT5OTScPcsf9eZU+B/YIkKAtYr5WeCii58BgATrNitlWg==", + "dev": true, + "engines": { + "node": ">=0.11" + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "dev": true, + "optional": true, + "dependencies": { + "clone": "^1.0.2" + } + }, + "node_modules/easy-table": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/easy-table/-/easy-table-1.1.0.tgz", + "integrity": "sha1-hvmrTBAvA3G3KXuSplHVgkvIy3M=", + "dev": true, + "optionalDependencies": { + "wcwidth": ">=1.0.1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/fast-safe-stringify": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", + "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==", + "dev": true + }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/follow-redirects": { + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.3.tgz", + "integrity": "sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "dev": true + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/inquirer": { + "version": "7.3.3", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", + "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==", + "dev": true, + "dependencies": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.19", + "mute-stream": "0.0.8", + "run-async": "^2.4.0", + "rxjs": "^6.6.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "node_modules/is-core-module": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", + "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/iterare": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/iterare/-/iterare-1.2.1.tgz", + "integrity": "sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true + }, + "node_modules/node-fetch": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", + "dev": true, + "engines": { + "node": "4.x || >=6.0.0" + } + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/object-hash": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.1.1.tgz", + "integrity": "sha512-VOJmgmS+7wvXf8CjbQmimtCnEx3IAoLxI3fp2fbWehxrWBcAQFbk+vcwb6vzR0VZv/eNCJ/27j151ZTwqW/JeQ==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "node_modules/path-to-regexp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.2.0.tgz", + "integrity": "sha512-jczvQbCUS7XmS7o+y1aEO9OBVFeZBQ1MDSEqmO7xSoPgOPoowY/SxLpZ6Vh97/8qHZOteiCKb7gkG9gA2ZUxJA==", + "dev": true + }, + "node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-4.0.1.tgz", + "integrity": "sha1-ljYlN48+HE1IyFhytabsfV0JMjc=", + "dev": true, + "dependencies": { + "normalize-package-data": "^2.3.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/reflect-metadata": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", + "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==", + "dev": true + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "node_modules/resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dev": true, + "dependencies": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "node_modules/signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "dev": true + }, + "node_modules/spawn-command": { + "version": "0.0.2-1", + "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", + "integrity": "sha1-YvXpRmmBwbeW3Fkpk34RycaSG9A=", + "dev": true + }, + "node_modules/spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz", + "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==", + "dev": true + }, + "node_modules/string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/tslib": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", + "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", + "dev": true + }, + "node_modules/type-fest": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", + "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", + "dev": true, + "optional": true, + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "node_modules/wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/wrap-ansi/node_modules/emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "node_modules/y18n": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", + "dev": true + }, + "node_modules/yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "dependencies": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + }, + "node_modules/yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "node_modules/yargs/node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/yargs/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + } + }, "dependencies": { "@nestjs/common": { "version": "7.6.15", diff --git a/server/openapi_server/controllers/annotation_controller.py b/server/openapi_server/controllers/annotation_controller.py index afe0ac3..ee2d5a6 100644 --- a/server/openapi_server/controllers/annotation_controller.py +++ b/server/openapi_server/controllers/annotation_controller.py @@ -44,6 +44,9 @@ def create_annotation(dataset_id, annotation_store_id, annotation_id): # noqa: text_date_annotations = None text_person_name_annotations = None text_physical_address_annotations = None + text_id_annotations = None + text_contact_annotations = None + text_covid_symptom_annotations = None if annotation_create_request.text_date_annotations is not None: text_date_annotations = [ @@ -63,6 +66,24 @@ def create_annotation(dataset_id, annotation_store_id, annotation_id): # noqa: a.to_dict(), util.underscore_to_camel) for a in annotation_create_request.text_physical_address_annotations] # noqa: E501 + if annotation_create_request.text_id_annotations is not None: # noqa: E501 + text_id_annotations = [ + util.change_dict_naming_convention( + a.to_dict(), util.underscore_to_camel) + for a in annotation_create_request.text_id_annotations] # noqa: E501 + + if annotation_create_request.text_contact_annotations is not None: # noqa: E501 + text_contact_annotations = [ + util.change_dict_naming_convention( + a.to_dict(), util.underscore_to_camel) + for a in annotation_create_request.text_contact_annotations] # noqa: E501 + + if annotation_create_request.text_covid_symptom_annotations is not None: # noqa: E501 + text_covid_symptom_annotations = [ + util.change_dict_naming_convention( + a.to_dict(), util.underscore_to_camel) + for a in annotation_create_request.text_covid_symptom_annotations] # noqa: E501 + annotation_source = util.change_dict_naming_convention( annotation_create_request.annotation_source.to_dict(), util.underscore_to_camel) @@ -75,7 +96,10 @@ def create_annotation(dataset_id, annotation_store_id, annotation_id): # noqa: annotationStoreName=store_name, textDateAnnotations=text_date_annotations, textPersonNameAnnotations=text_person_name_annotations, - textPhysicalAddressAnnotations=text_physical_address_annotations # noqa: E501 + textPhysicalAddressAnnotations=text_physical_address_annotations, # noqa: E501 + textIdAnnotations=text_id_annotations, + textContactAnnotations=text_contact_annotations, + textCovidSymptomAnnotations=text_covid_symptom_annotations ).save() annotation = Annotation.from_dict(db_annotation.to_dict()) res = AnnotationCreateResponse(name=annotation.name) diff --git a/server/openapi_server/dbmodels/annotation.py b/server/openapi_server/dbmodels/annotation.py index 54101da..67607ec 100644 --- a/server/openapi_server/dbmodels/annotation.py +++ b/server/openapi_server/dbmodels/annotation.py @@ -7,6 +7,9 @@ from openapi_server.dbmodels.text_date_annotation import TextDateAnnotation # noqa: E501 from openapi_server.dbmodels.text_person_name_annotation import TextPersonNameAnnotation # noqa: E501 from openapi_server.dbmodels.text_physical_address_annotation import TextPhysicalAddressAnnotation # noqa: E501 +from openapi_server.dbmodels.text_id_annotation import TextIdAnnotation # noqa: E501 +from openapi_server.dbmodels.text_contact_annotation import TextContactAnnotation # noqa: E501 +from openapi_server.dbmodels.text_covid_symptom_annotation import TextCovidSymptomAnnotation # noqa: E501 class Annotation(BaseDocument): @@ -16,6 +19,9 @@ class Annotation(BaseDocument): textDateAnnotations = EmbeddedDocumentListField(TextDateAnnotation) textPersonNameAnnotations = EmbeddedDocumentListField(TextPersonNameAnnotation) # noqa: E501 textPhysicalAddressAnnotations = EmbeddedDocumentListField(TextPhysicalAddressAnnotation) # noqa: E501 + textIdAnnotations = EmbeddedDocumentListField(TextIdAnnotation) # noqa: E501 + textContactAnnotations = EmbeddedDocumentListField(TextContactAnnotation) # noqa: E501 + textCovidSymptomAnnotations = EmbeddedDocumentListField(TextCovidSymptomAnnotation) # noqa: E501 def to_dict(self): doc = self.to_mongo().to_dict() # TODO try self.to_python() diff --git a/server/openapi_server/dbmodels/text_contact_annotation.py b/server/openapi_server/dbmodels/text_contact_annotation.py new file mode 100644 index 0000000..feea037 --- /dev/null +++ b/server/openapi_server/dbmodels/text_contact_annotation.py @@ -0,0 +1,22 @@ +from mongoengine import FloatField, IntField, StringField, EmbeddedDocument, EnumField # noqa: E501 +from enum import Enum + + +class ContactType(Enum): + EMAIL = 'email' + FAX = 'fax' + PHONE = 'phone' + URL = 'url' + OTHER = 'other' + + +class TextContactAnnotation(EmbeddedDocument): + start = IntField(required=True) + length = IntField(required=True) + text = StringField(required=True) + confidence = FloatField(required=True) + contactType = EnumField(ContactType, required=True) + + def to_dict(self): + doc = self.to_mongo().to_dict() + return doc diff --git a/server/openapi_server/dbmodels/text_covid_symptom_annotation.py b/server/openapi_server/dbmodels/text_covid_symptom_annotation.py new file mode 100644 index 0000000..b5d6e3f --- /dev/null +++ b/server/openapi_server/dbmodels/text_covid_symptom_annotation.py @@ -0,0 +1,44 @@ +from mongoengine import FloatField, IntField, StringField, EmbeddedDocument, EnumField # noqa: E501 +from enum import Enum + + +class Condition(Enum): + FEVER = 'fever' + CHILL = 'chill' + COUGH = 'cough' + FATIGUE = 'fatigue' + NASAL_OBSTRUCTION = 'nasal_obstruction' + LOSS_OF_APPETITE = 'loss_of_appetite' + DIARRHEA = 'diarrhea' + ABDOMINAL_PAIN = 'abdominal_pain' + NAUSEA = 'nausea' + VOMITING = 'vomiting' + SORE_THROAT = 'sore_throat' + HEADACHE = 'headache' + MYALGIA = 'myalgia' + LOSS_OF_TASTE = 'loss_of_taste' + LOSS_OF_SMELL = 'loss_of_smell' + DYSPNEA = 'dyspnea' + CHEST_PAIN = 'chest_pain' + DELIRIUM = 'delirium' + HYPERSOMNIA = 'hypersomnia' + CYANOSIS = 'cyanosis' + + +class Certainty(Enum): + POSITIVE = 'positive' + NEGATED = 'negated' + POSSIBLE = 'possible' + + +class TextCovidSymptomAnnotation(EmbeddedDocument): + start = IntField(required=True) + length = IntField(required=True) + text = StringField(required=True) + confidence = FloatField(required=True) + condition = EnumField(Condition, required=True) + certainty = EnumField(Certainty, required=True) + + def to_dict(self): + doc = self.to_mongo().to_dict() + return doc diff --git a/server/openapi_server/dbmodels/text_date_annotation.py b/server/openapi_server/dbmodels/text_date_annotation.py index 367c0b9..01e510f 100644 --- a/server/openapi_server/dbmodels/text_date_annotation.py +++ b/server/openapi_server/dbmodels/text_date_annotation.py @@ -4,9 +4,9 @@ class TextDateAnnotation(EmbeddedDocument): start = IntField(required=True) length = IntField(required=True) - text = StringField() - dateFormat = StringField() - confidence = FloatField() + text = StringField(required=True) + confidence = FloatField(required=True) + dateFormat = StringField(required=True) def to_dict(self): doc = self.to_mongo().to_dict() diff --git a/server/openapi_server/dbmodels/text_id_annotation.py b/server/openapi_server/dbmodels/text_id_annotation.py new file mode 100644 index 0000000..6208311 --- /dev/null +++ b/server/openapi_server/dbmodels/text_id_annotation.py @@ -0,0 +1,26 @@ +from mongoengine import FloatField, IntField, StringField, EmbeddedDocument, EnumField # noqa: E501 +from enum import Enum + + +class IdType(Enum): + ACCOUNT = 'account' + BIO_ID = 'bio_id' + DEVICE = 'device' + HEALTH_PLAN = 'health_plan' + ID_NUM = 'id_num' + LICENSE = 'license' + MEDICAL_RECORD = 'medical_record' + SSN = 'ssn' + VEHICLE = 'vehicle' + + +class TextIdAnnotation(EmbeddedDocument): + start = IntField(required=True) + length = IntField(required=True) + text = StringField(required=True) + confidence = FloatField(required=True) + idType = EnumField(IdType, required=True) + + def to_dict(self): + doc = self.to_mongo().to_dict() + return doc diff --git a/server/openapi_server/dbmodels/text_person_name_annotation.py b/server/openapi_server/dbmodels/text_person_name_annotation.py index c4213b5..fa8f889 100644 --- a/server/openapi_server/dbmodels/text_person_name_annotation.py +++ b/server/openapi_server/dbmodels/text_person_name_annotation.py @@ -4,8 +4,8 @@ class TextPersonNameAnnotation(EmbeddedDocument): start = IntField(required=True) length = IntField(required=True) - text = StringField() - confidence = FloatField() + text = StringField(required=True) + confidence = FloatField(required=True) def to_dict(self): doc = self.to_mongo().to_dict() diff --git a/server/openapi_server/dbmodels/text_physical_address_annotation.py b/server/openapi_server/dbmodels/text_physical_address_annotation.py index d201a2c..41bac85 100644 --- a/server/openapi_server/dbmodels/text_physical_address_annotation.py +++ b/server/openapi_server/dbmodels/text_physical_address_annotation.py @@ -1,12 +1,26 @@ -from mongoengine import FloatField, IntField, StringField, EmbeddedDocument +from mongoengine import FloatField, IntField, StringField, EmbeddedDocument, EnumField # noqa: E501 +from enum import Enum + + +class AddressType(Enum): + CITY = 'city' + COUNTRY = 'country' + DEPARTMENT = 'department' + HOSPITAL = 'hospital' + ORGANIZATION = 'organization' + OTHER = 'other' + ROOM = 'room' + STATE = 'state' + STREET = 'street' + ZIP = 'zip' class TextPhysicalAddressAnnotation(EmbeddedDocument): start = IntField(required=True) length = IntField(required=True) - text = StringField() - addressType = StringField() - confidence = FloatField() + text = StringField(required=True) + confidence = FloatField(required=True) + addressType = EnumField(AddressType, required=True) def to_dict(self): doc = self.to_mongo().to_dict() diff --git a/server/openapi_server/models/__init__.py b/server/openapi_server/models/__init__.py index 71ba6f8..197a685 100644 --- a/server/openapi_server/models/__init__.py +++ b/server/openapi_server/models/__init__.py @@ -37,8 +37,14 @@ from openapi_server.models.response_page_metadata import ResponsePageMetadata from openapi_server.models.response_page_metadata_links import ResponsePageMetadataLinks from openapi_server.models.text_annotation import TextAnnotation +from openapi_server.models.text_contact_annotation import TextContactAnnotation +from openapi_server.models.text_contact_annotation_all_of import TextContactAnnotationAllOf +from openapi_server.models.text_covid_symptom_annotation import TextCovidSymptomAnnotation +from openapi_server.models.text_covid_symptom_annotation_all_of import TextCovidSymptomAnnotationAllOf from openapi_server.models.text_date_annotation import TextDateAnnotation from openapi_server.models.text_date_annotation_all_of import TextDateAnnotationAllOf +from openapi_server.models.text_id_annotation import TextIdAnnotation +from openapi_server.models.text_id_annotation_all_of import TextIdAnnotationAllOf from openapi_server.models.text_person_name_annotation import TextPersonNameAnnotation from openapi_server.models.text_physical_address_annotation import TextPhysicalAddressAnnotation from openapi_server.models.text_physical_address_annotation_all_of import TextPhysicalAddressAnnotationAllOf diff --git a/server/openapi_server/models/annotation.py b/server/openapi_server/models/annotation.py index e97ba44..622a11b 100644 --- a/server/openapi_server/models/annotation.py +++ b/server/openapi_server/models/annotation.py @@ -7,14 +7,20 @@ from openapi_server.models.base_model_ import Model from openapi_server.models.annotation_source import AnnotationSource +from openapi_server.models.text_contact_annotation import TextContactAnnotation +from openapi_server.models.text_covid_symptom_annotation import TextCovidSymptomAnnotation from openapi_server.models.text_date_annotation import TextDateAnnotation +from openapi_server.models.text_id_annotation import TextIdAnnotation from openapi_server.models.text_person_name_annotation import TextPersonNameAnnotation from openapi_server.models.text_physical_address_annotation import TextPhysicalAddressAnnotation import re from openapi_server import util from openapi_server.models.annotation_source import AnnotationSource # noqa: E501 +from openapi_server.models.text_contact_annotation import TextContactAnnotation # noqa: E501 +from openapi_server.models.text_covid_symptom_annotation import TextCovidSymptomAnnotation # noqa: E501 from openapi_server.models.text_date_annotation import TextDateAnnotation # noqa: E501 +from openapi_server.models.text_id_annotation import TextIdAnnotation # noqa: E501 from openapi_server.models.text_person_name_annotation import TextPersonNameAnnotation # noqa: E501 from openapi_server.models.text_physical_address_annotation import TextPhysicalAddressAnnotation # noqa: E501 import re # noqa: E501 @@ -25,7 +31,7 @@ class Annotation(Model): Do not edit the class manually. """ - def __init__(self, name=None, annotation_source=None, text_date_annotations=None, text_person_name_annotations=None, text_physical_address_annotations=None): # noqa: E501 + def __init__(self, name=None, annotation_source=None, text_date_annotations=None, text_person_name_annotations=None, text_physical_address_annotations=None, text_id_annotations=None, text_contact_annotations=None, text_covid_symptom_annotations=None): # noqa: E501 """Annotation - a model defined in OpenAPI :param name: The name of this Annotation. # noqa: E501 @@ -38,13 +44,22 @@ def __init__(self, name=None, annotation_source=None, text_date_annotations=None :type text_person_name_annotations: List[TextPersonNameAnnotation] :param text_physical_address_annotations: The text_physical_address_annotations of this Annotation. # noqa: E501 :type text_physical_address_annotations: List[TextPhysicalAddressAnnotation] + :param text_id_annotations: The text_id_annotations of this Annotation. # noqa: E501 + :type text_id_annotations: List[TextIdAnnotation] + :param text_contact_annotations: The text_contact_annotations of this Annotation. # noqa: E501 + :type text_contact_annotations: List[TextContactAnnotation] + :param text_covid_symptom_annotations: The text_covid_symptom_annotations of this Annotation. # noqa: E501 + :type text_covid_symptom_annotations: List[TextCovidSymptomAnnotation] """ self.openapi_types = { 'name': str, 'annotation_source': AnnotationSource, 'text_date_annotations': List[TextDateAnnotation], 'text_person_name_annotations': List[TextPersonNameAnnotation], - 'text_physical_address_annotations': List[TextPhysicalAddressAnnotation] + 'text_physical_address_annotations': List[TextPhysicalAddressAnnotation], + 'text_id_annotations': List[TextIdAnnotation], + 'text_contact_annotations': List[TextContactAnnotation], + 'text_covid_symptom_annotations': List[TextCovidSymptomAnnotation] } self.attribute_map = { @@ -52,7 +67,10 @@ def __init__(self, name=None, annotation_source=None, text_date_annotations=None 'annotation_source': 'annotationSource', 'text_date_annotations': 'textDateAnnotations', 'text_person_name_annotations': 'textPersonNameAnnotations', - 'text_physical_address_annotations': 'textPhysicalAddressAnnotations' + 'text_physical_address_annotations': 'textPhysicalAddressAnnotations', + 'text_id_annotations': 'textIdAnnotations', + 'text_contact_annotations': 'textContactAnnotations', + 'text_covid_symptom_annotations': 'textCovidSymptomAnnotations' } self._name = name @@ -60,6 +78,9 @@ def __init__(self, name=None, annotation_source=None, text_date_annotations=None self._text_date_annotations = text_date_annotations self._text_person_name_annotations = text_person_name_annotations self._text_physical_address_annotations = text_physical_address_annotations + self._text_id_annotations = text_id_annotations + self._text_contact_annotations = text_contact_annotations + self._text_covid_symptom_annotations = text_covid_symptom_annotations @classmethod def from_dict(cls, dikt) -> 'Annotation': @@ -190,3 +211,72 @@ def text_physical_address_annotations(self, text_physical_address_annotations): """ self._text_physical_address_annotations = text_physical_address_annotations + + @property + def text_id_annotations(self): + """Gets the text_id_annotations of this Annotation. + + ID annotations in a text # noqa: E501 + + :return: The text_id_annotations of this Annotation. + :rtype: List[TextIdAnnotation] + """ + return self._text_id_annotations + + @text_id_annotations.setter + def text_id_annotations(self, text_id_annotations): + """Sets the text_id_annotations of this Annotation. + + ID annotations in a text # noqa: E501 + + :param text_id_annotations: The text_id_annotations of this Annotation. + :type text_id_annotations: List[TextIdAnnotation] + """ + + self._text_id_annotations = text_id_annotations + + @property + def text_contact_annotations(self): + """Gets the text_contact_annotations of this Annotation. + + Contact annotations in a text # noqa: E501 + + :return: The text_contact_annotations of this Annotation. + :rtype: List[TextContactAnnotation] + """ + return self._text_contact_annotations + + @text_contact_annotations.setter + def text_contact_annotations(self, text_contact_annotations): + """Sets the text_contact_annotations of this Annotation. + + Contact annotations in a text # noqa: E501 + + :param text_contact_annotations: The text_contact_annotations of this Annotation. + :type text_contact_annotations: List[TextContactAnnotation] + """ + + self._text_contact_annotations = text_contact_annotations + + @property + def text_covid_symptom_annotations(self): + """Gets the text_covid_symptom_annotations of this Annotation. + + COVID symptom annotations in a text # noqa: E501 + + :return: The text_covid_symptom_annotations of this Annotation. + :rtype: List[TextCovidSymptomAnnotation] + """ + return self._text_covid_symptom_annotations + + @text_covid_symptom_annotations.setter + def text_covid_symptom_annotations(self, text_covid_symptom_annotations): + """Sets the text_covid_symptom_annotations of this Annotation. + + COVID symptom annotations in a text # noqa: E501 + + :param text_covid_symptom_annotations: The text_covid_symptom_annotations of this Annotation. + :type text_covid_symptom_annotations: List[TextCovidSymptomAnnotation] + """ + + self._text_covid_symptom_annotations = text_covid_symptom_annotations diff --git a/server/openapi_server/models/annotation_create_request.py b/server/openapi_server/models/annotation_create_request.py index 6190ef3..bcc49f1 100644 --- a/server/openapi_server/models/annotation_create_request.py +++ b/server/openapi_server/models/annotation_create_request.py @@ -7,13 +7,19 @@ from openapi_server.models.base_model_ import Model from openapi_server.models.annotation_source import AnnotationSource +from openapi_server.models.text_contact_annotation import TextContactAnnotation +from openapi_server.models.text_covid_symptom_annotation import TextCovidSymptomAnnotation from openapi_server.models.text_date_annotation import TextDateAnnotation +from openapi_server.models.text_id_annotation import TextIdAnnotation from openapi_server.models.text_person_name_annotation import TextPersonNameAnnotation from openapi_server.models.text_physical_address_annotation import TextPhysicalAddressAnnotation from openapi_server import util from openapi_server.models.annotation_source import AnnotationSource # noqa: E501 +from openapi_server.models.text_contact_annotation import TextContactAnnotation # noqa: E501 +from openapi_server.models.text_covid_symptom_annotation import TextCovidSymptomAnnotation # noqa: E501 from openapi_server.models.text_date_annotation import TextDateAnnotation # noqa: E501 +from openapi_server.models.text_id_annotation import TextIdAnnotation # noqa: E501 from openapi_server.models.text_person_name_annotation import TextPersonNameAnnotation # noqa: E501 from openapi_server.models.text_physical_address_annotation import TextPhysicalAddressAnnotation # noqa: E501 @@ -23,7 +29,7 @@ class AnnotationCreateRequest(Model): Do not edit the class manually. """ - def __init__(self, annotation_source=None, text_date_annotations=None, text_person_name_annotations=None, text_physical_address_annotations=None): # noqa: E501 + def __init__(self, annotation_source=None, text_date_annotations=None, text_person_name_annotations=None, text_physical_address_annotations=None, text_id_annotations=None, text_contact_annotations=None, text_covid_symptom_annotations=None): # noqa: E501 """AnnotationCreateRequest - a model defined in OpenAPI :param annotation_source: The annotation_source of this AnnotationCreateRequest. # noqa: E501 @@ -34,25 +40,40 @@ def __init__(self, annotation_source=None, text_date_annotations=None, text_pers :type text_person_name_annotations: List[TextPersonNameAnnotation] :param text_physical_address_annotations: The text_physical_address_annotations of this AnnotationCreateRequest. # noqa: E501 :type text_physical_address_annotations: List[TextPhysicalAddressAnnotation] + :param text_id_annotations: The text_id_annotations of this AnnotationCreateRequest. # noqa: E501 + :type text_id_annotations: List[TextIdAnnotation] + :param text_contact_annotations: The text_contact_annotations of this AnnotationCreateRequest. # noqa: E501 + :type text_contact_annotations: List[TextContactAnnotation] + :param text_covid_symptom_annotations: The text_covid_symptom_annotations of this AnnotationCreateRequest. # noqa: E501 + :type text_covid_symptom_annotations: List[TextCovidSymptomAnnotation] """ self.openapi_types = { 'annotation_source': AnnotationSource, 'text_date_annotations': List[TextDateAnnotation], 'text_person_name_annotations': List[TextPersonNameAnnotation], - 'text_physical_address_annotations': List[TextPhysicalAddressAnnotation] + 'text_physical_address_annotations': List[TextPhysicalAddressAnnotation], + 'text_id_annotations': List[TextIdAnnotation], + 'text_contact_annotations': List[TextContactAnnotation], + 'text_covid_symptom_annotations': List[TextCovidSymptomAnnotation] } self.attribute_map = { 'annotation_source': 'annotationSource', 'text_date_annotations': 'textDateAnnotations', 'text_person_name_annotations': 'textPersonNameAnnotations', - 'text_physical_address_annotations': 'textPhysicalAddressAnnotations' + 'text_physical_address_annotations': 'textPhysicalAddressAnnotations', + 'text_id_annotations': 'textIdAnnotations', + 'text_contact_annotations': 'textContactAnnotations', + 'text_covid_symptom_annotations': 'textCovidSymptomAnnotations' } self._annotation_source = annotation_source self._text_date_annotations = text_date_annotations self._text_person_name_annotations = text_person_name_annotations self._text_physical_address_annotations = text_physical_address_annotations + self._text_id_annotations = text_id_annotations + self._text_contact_annotations = text_contact_annotations + self._text_covid_symptom_annotations = text_covid_symptom_annotations @classmethod def from_dict(cls, dikt) -> 'AnnotationCreateRequest': @@ -156,3 +177,72 @@ def text_physical_address_annotations(self, text_physical_address_annotations): """ self._text_physical_address_annotations = text_physical_address_annotations + + @property + def text_id_annotations(self): + """Gets the text_id_annotations of this AnnotationCreateRequest. + + ID annotations in a text # noqa: E501 + + :return: The text_id_annotations of this AnnotationCreateRequest. + :rtype: List[TextIdAnnotation] + """ + return self._text_id_annotations + + @text_id_annotations.setter + def text_id_annotations(self, text_id_annotations): + """Sets the text_id_annotations of this AnnotationCreateRequest. + + ID annotations in a text # noqa: E501 + + :param text_id_annotations: The text_id_annotations of this AnnotationCreateRequest. + :type text_id_annotations: List[TextIdAnnotation] + """ + + self._text_id_annotations = text_id_annotations + + @property + def text_contact_annotations(self): + """Gets the text_contact_annotations of this AnnotationCreateRequest. + + Contact annotations in a text # noqa: E501 + + :return: The text_contact_annotations of this AnnotationCreateRequest. + :rtype: List[TextContactAnnotation] + """ + return self._text_contact_annotations + + @text_contact_annotations.setter + def text_contact_annotations(self, text_contact_annotations): + """Sets the text_contact_annotations of this AnnotationCreateRequest. + + Contact annotations in a text # noqa: E501 + + :param text_contact_annotations: The text_contact_annotations of this AnnotationCreateRequest. + :type text_contact_annotations: List[TextContactAnnotation] + """ + + self._text_contact_annotations = text_contact_annotations + + @property + def text_covid_symptom_annotations(self): + """Gets the text_covid_symptom_annotations of this AnnotationCreateRequest. + + COVID symptom annotations in a text # noqa: E501 + + :return: The text_covid_symptom_annotations of this AnnotationCreateRequest. + :rtype: List[TextCovidSymptomAnnotation] + """ + return self._text_covid_symptom_annotations + + @text_covid_symptom_annotations.setter + def text_covid_symptom_annotations(self, text_covid_symptom_annotations): + """Sets the text_covid_symptom_annotations of this AnnotationCreateRequest. + + COVID symptom annotations in a text # noqa: E501 + + :param text_covid_symptom_annotations: The text_covid_symptom_annotations of this AnnotationCreateRequest. + :type text_covid_symptom_annotations: List[TextCovidSymptomAnnotation] + """ + + self._text_covid_symptom_annotations = text_covid_symptom_annotations diff --git a/server/openapi_server/models/text_contact_annotation.py b/server/openapi_server/models/text_contact_annotation.py new file mode 100644 index 0000000..860dc4b --- /dev/null +++ b/server/openapi_server/models/text_contact_annotation.py @@ -0,0 +1,200 @@ +# coding: utf-8 + +from __future__ import absolute_import +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model_ import Model +from openapi_server.models.text_annotation import TextAnnotation +from openapi_server.models.text_contact_annotation_all_of import TextContactAnnotationAllOf +from openapi_server import util + +from openapi_server.models.text_annotation import TextAnnotation # noqa: E501 +from openapi_server.models.text_contact_annotation_all_of import TextContactAnnotationAllOf # noqa: E501 + +class TextContactAnnotation(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, start=None, length=None, text=None, confidence=None, contact_type=None): # noqa: E501 + """TextContactAnnotation - a model defined in OpenAPI + + :param start: The start of this TextContactAnnotation. # noqa: E501 + :type start: int + :param length: The length of this TextContactAnnotation. # noqa: E501 + :type length: int + :param text: The text of this TextContactAnnotation. # noqa: E501 + :type text: str + :param confidence: The confidence of this TextContactAnnotation. # noqa: E501 + :type confidence: float + :param contact_type: The contact_type of this TextContactAnnotation. # noqa: E501 + :type contact_type: str + """ + self.openapi_types = { + 'start': int, + 'length': int, + 'text': str, + 'confidence': float, + 'contact_type': str + } + + self.attribute_map = { + 'start': 'start', + 'length': 'length', + 'text': 'text', + 'confidence': 'confidence', + 'contact_type': 'contactType' + } + + self._start = start + self._length = length + self._text = text + self._confidence = confidence + self._contact_type = contact_type + + @classmethod + def from_dict(cls, dikt) -> 'TextContactAnnotation': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The TextContactAnnotation of this TextContactAnnotation. # noqa: E501 + :rtype: TextContactAnnotation + """ + return util.deserialize_model(dikt, cls) + + @property + def start(self): + """Gets the start of this TextContactAnnotation. + + The position of the first character # noqa: E501 + + :return: The start of this TextContactAnnotation. + :rtype: int + """ + return self._start + + @start.setter + def start(self, start): + """Sets the start of this TextContactAnnotation. + + The position of the first character # noqa: E501 + + :param start: The start of this TextContactAnnotation. + :type start: int + """ + if start is None: + raise ValueError("Invalid value for `start`, must not be `None`") # noqa: E501 + + self._start = start + + @property + def length(self): + """Gets the length of this TextContactAnnotation. + + The length of the annotation # noqa: E501 + + :return: The length of this TextContactAnnotation. + :rtype: int + """ + return self._length + + @length.setter + def length(self, length): + """Sets the length of this TextContactAnnotation. + + The length of the annotation # noqa: E501 + + :param length: The length of this TextContactAnnotation. + :type length: int + """ + if length is None: + raise ValueError("Invalid value for `length`, must not be `None`") # noqa: E501 + + self._length = length + + @property + def text(self): + """Gets the text of this TextContactAnnotation. + + The string annotated # noqa: E501 + + :return: The text of this TextContactAnnotation. + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this TextContactAnnotation. + + The string annotated # noqa: E501 + + :param text: The text of this TextContactAnnotation. + :type text: str + """ + if text is None: + raise ValueError("Invalid value for `text`, must not be `None`") # noqa: E501 + + self._text = text + + @property + def confidence(self): + """Gets the confidence of this TextContactAnnotation. + + The confidence in the accuracy of the annotation # noqa: E501 + + :return: The confidence of this TextContactAnnotation. + :rtype: float + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence): + """Sets the confidence of this TextContactAnnotation. + + The confidence in the accuracy of the annotation # noqa: E501 + + :param confidence: The confidence of this TextContactAnnotation. + :type confidence: float + """ + if confidence is None: + raise ValueError("Invalid value for `confidence`, must not be `None`") # noqa: E501 + if confidence is not None and confidence > 100: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value less than or equal to `100`") # noqa: E501 + if confidence is not None and confidence < 0: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value greater than or equal to `0`") # noqa: E501 + + self._confidence = confidence + + @property + def contact_type(self): + """Gets the contact_type of this TextContactAnnotation. + + Type of contact information # noqa: E501 + + :return: The contact_type of this TextContactAnnotation. + :rtype: str + """ + return self._contact_type + + @contact_type.setter + def contact_type(self, contact_type): + """Sets the contact_type of this TextContactAnnotation. + + Type of contact information # noqa: E501 + + :param contact_type: The contact_type of this TextContactAnnotation. + :type contact_type: str + """ + allowed_values = ["email", "fax", "phone", "url", "other"] # noqa: E501 + if contact_type not in allowed_values: + raise ValueError( + "Invalid value for `contact_type` ({0}), must be one of {1}" + .format(contact_type, allowed_values) + ) + + self._contact_type = contact_type diff --git a/server/openapi_server/models/text_contact_annotation_all_of.py b/server/openapi_server/models/text_contact_annotation_all_of.py new file mode 100644 index 0000000..4bc7b28 --- /dev/null +++ b/server/openapi_server/models/text_contact_annotation_all_of.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +from __future__ import absolute_import +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model_ import Model +from openapi_server import util + + +class TextContactAnnotationAllOf(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, contact_type=None): # noqa: E501 + """TextContactAnnotationAllOf - a model defined in OpenAPI + + :param contact_type: The contact_type of this TextContactAnnotationAllOf. # noqa: E501 + :type contact_type: str + """ + self.openapi_types = { + 'contact_type': str + } + + self.attribute_map = { + 'contact_type': 'contactType' + } + + self._contact_type = contact_type + + @classmethod + def from_dict(cls, dikt) -> 'TextContactAnnotationAllOf': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The TextContactAnnotation_allOf of this TextContactAnnotationAllOf. # noqa: E501 + :rtype: TextContactAnnotationAllOf + """ + return util.deserialize_model(dikt, cls) + + @property + def contact_type(self): + """Gets the contact_type of this TextContactAnnotationAllOf. + + Type of contact information # noqa: E501 + + :return: The contact_type of this TextContactAnnotationAllOf. + :rtype: str + """ + return self._contact_type + + @contact_type.setter + def contact_type(self, contact_type): + """Sets the contact_type of this TextContactAnnotationAllOf. + + Type of contact information # noqa: E501 + + :param contact_type: The contact_type of this TextContactAnnotationAllOf. + :type contact_type: str + """ + allowed_values = ["email", "fax", "phone", "url", "other"] # noqa: E501 + if contact_type not in allowed_values: + raise ValueError( + "Invalid value for `contact_type` ({0}), must be one of {1}" + .format(contact_type, allowed_values) + ) + + self._contact_type = contact_type diff --git a/server/openapi_server/models/text_covid_symptom_annotation.py b/server/openapi_server/models/text_covid_symptom_annotation.py new file mode 100644 index 0000000..8d0ba9e --- /dev/null +++ b/server/openapi_server/models/text_covid_symptom_annotation.py @@ -0,0 +1,234 @@ +# coding: utf-8 + +from __future__ import absolute_import +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model_ import Model +from openapi_server.models.text_annotation import TextAnnotation +from openapi_server.models.text_covid_symptom_annotation_all_of import TextCovidSymptomAnnotationAllOf +from openapi_server import util + +from openapi_server.models.text_annotation import TextAnnotation # noqa: E501 +from openapi_server.models.text_covid_symptom_annotation_all_of import TextCovidSymptomAnnotationAllOf # noqa: E501 + +class TextCovidSymptomAnnotation(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, start=None, length=None, text=None, confidence=None, condition=None, certainty=None): # noqa: E501 + """TextCovidSymptomAnnotation - a model defined in OpenAPI + + :param start: The start of this TextCovidSymptomAnnotation. # noqa: E501 + :type start: int + :param length: The length of this TextCovidSymptomAnnotation. # noqa: E501 + :type length: int + :param text: The text of this TextCovidSymptomAnnotation. # noqa: E501 + :type text: str + :param confidence: The confidence of this TextCovidSymptomAnnotation. # noqa: E501 + :type confidence: float + :param condition: The condition of this TextCovidSymptomAnnotation. # noqa: E501 + :type condition: str + :param certainty: The certainty of this TextCovidSymptomAnnotation. # noqa: E501 + :type certainty: str + """ + self.openapi_types = { + 'start': int, + 'length': int, + 'text': str, + 'confidence': float, + 'condition': str, + 'certainty': str + } + + self.attribute_map = { + 'start': 'start', + 'length': 'length', + 'text': 'text', + 'confidence': 'confidence', + 'condition': 'condition', + 'certainty': 'certainty' + } + + self._start = start + self._length = length + self._text = text + self._confidence = confidence + self._condition = condition + self._certainty = certainty + + @classmethod + def from_dict(cls, dikt) -> 'TextCovidSymptomAnnotation': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The TextCovidSymptomAnnotation of this TextCovidSymptomAnnotation. # noqa: E501 + :rtype: TextCovidSymptomAnnotation + """ + return util.deserialize_model(dikt, cls) + + @property + def start(self): + """Gets the start of this TextCovidSymptomAnnotation. + + The position of the first character # noqa: E501 + + :return: The start of this TextCovidSymptomAnnotation. + :rtype: int + """ + return self._start + + @start.setter + def start(self, start): + """Sets the start of this TextCovidSymptomAnnotation. + + The position of the first character # noqa: E501 + + :param start: The start of this TextCovidSymptomAnnotation. + :type start: int + """ + if start is None: + raise ValueError("Invalid value for `start`, must not be `None`") # noqa: E501 + + self._start = start + + @property + def length(self): + """Gets the length of this TextCovidSymptomAnnotation. + + The length of the annotation # noqa: E501 + + :return: The length of this TextCovidSymptomAnnotation. + :rtype: int + """ + return self._length + + @length.setter + def length(self, length): + """Sets the length of this TextCovidSymptomAnnotation. + + The length of the annotation # noqa: E501 + + :param length: The length of this TextCovidSymptomAnnotation. + :type length: int + """ + if length is None: + raise ValueError("Invalid value for `length`, must not be `None`") # noqa: E501 + + self._length = length + + @property + def text(self): + """Gets the text of this TextCovidSymptomAnnotation. + + The string annotated # noqa: E501 + + :return: The text of this TextCovidSymptomAnnotation. + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this TextCovidSymptomAnnotation. + + The string annotated # noqa: E501 + + :param text: The text of this TextCovidSymptomAnnotation. + :type text: str + """ + if text is None: + raise ValueError("Invalid value for `text`, must not be `None`") # noqa: E501 + + self._text = text + + @property + def confidence(self): + """Gets the confidence of this TextCovidSymptomAnnotation. + + The confidence in the accuracy of the annotation # noqa: E501 + + :return: The confidence of this TextCovidSymptomAnnotation. + :rtype: float + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence): + """Sets the confidence of this TextCovidSymptomAnnotation. + + The confidence in the accuracy of the annotation # noqa: E501 + + :param confidence: The confidence of this TextCovidSymptomAnnotation. + :type confidence: float + """ + if confidence is None: + raise ValueError("Invalid value for `confidence`, must not be `None`") # noqa: E501 + if confidence is not None and confidence > 100: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value less than or equal to `100`") # noqa: E501 + if confidence is not None and confidence < 0: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value greater than or equal to `0`") # noqa: E501 + + self._confidence = confidence + + @property + def condition(self): + """Gets the condition of this TextCovidSymptomAnnotation. + + The sign/symptom type according to CDC definition # noqa: E501 + + :return: The condition of this TextCovidSymptomAnnotation. + :rtype: str + """ + return self._condition + + @condition.setter + def condition(self, condition): + """Sets the condition of this TextCovidSymptomAnnotation. + + The sign/symptom type according to CDC definition # noqa: E501 + + :param condition: The condition of this TextCovidSymptomAnnotation. + :type condition: str + """ + allowed_values = ["fever", "chill", "cough", "fatigue", "nasal_obstruction", "loss_of_appetite", "diarrhea", "abdominal_pain", "nausea", "vomiting", "sore_throat", "headache", "myalgia", "loss_of_taste", "loss_of_smell", "dyspnea", "chest_pain", "delirium", "hypersomnia", "cyanosis"] # noqa: E501 + if condition not in allowed_values: + raise ValueError( + "Invalid value for `condition` ({0}), must be one of {1}" + .format(condition, allowed_values) + ) + + self._condition = condition + + @property + def certainty(self): + """Gets the certainty of this TextCovidSymptomAnnotation. + + Whether the annotation is positively or negatively correlated with the presence of COVID # noqa: E501 + + :return: The certainty of this TextCovidSymptomAnnotation. + :rtype: str + """ + return self._certainty + + @certainty.setter + def certainty(self, certainty): + """Sets the certainty of this TextCovidSymptomAnnotation. + + Whether the annotation is positively or negatively correlated with the presence of COVID # noqa: E501 + + :param certainty: The certainty of this TextCovidSymptomAnnotation. + :type certainty: str + """ + allowed_values = ["positive", "negated", "possible"] # noqa: E501 + if certainty not in allowed_values: + raise ValueError( + "Invalid value for `certainty` ({0}), must be one of {1}" + .format(certainty, allowed_values) + ) + + self._certainty = certainty diff --git a/server/openapi_server/models/text_covid_symptom_annotation_all_of.py b/server/openapi_server/models/text_covid_symptom_annotation_all_of.py new file mode 100644 index 0000000..143fb5a --- /dev/null +++ b/server/openapi_server/models/text_covid_symptom_annotation_all_of.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +from __future__ import absolute_import +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model_ import Model +from openapi_server import util + + +class TextCovidSymptomAnnotationAllOf(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, condition=None, certainty=None): # noqa: E501 + """TextCovidSymptomAnnotationAllOf - a model defined in OpenAPI + + :param condition: The condition of this TextCovidSymptomAnnotationAllOf. # noqa: E501 + :type condition: str + :param certainty: The certainty of this TextCovidSymptomAnnotationAllOf. # noqa: E501 + :type certainty: str + """ + self.openapi_types = { + 'condition': str, + 'certainty': str + } + + self.attribute_map = { + 'condition': 'condition', + 'certainty': 'certainty' + } + + self._condition = condition + self._certainty = certainty + + @classmethod + def from_dict(cls, dikt) -> 'TextCovidSymptomAnnotationAllOf': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The TextCovidSymptomAnnotation_allOf of this TextCovidSymptomAnnotationAllOf. # noqa: E501 + :rtype: TextCovidSymptomAnnotationAllOf + """ + return util.deserialize_model(dikt, cls) + + @property + def condition(self): + """Gets the condition of this TextCovidSymptomAnnotationAllOf. + + The sign/symptom type according to CDC definition # noqa: E501 + + :return: The condition of this TextCovidSymptomAnnotationAllOf. + :rtype: str + """ + return self._condition + + @condition.setter + def condition(self, condition): + """Sets the condition of this TextCovidSymptomAnnotationAllOf. + + The sign/symptom type according to CDC definition # noqa: E501 + + :param condition: The condition of this TextCovidSymptomAnnotationAllOf. + :type condition: str + """ + allowed_values = ["fever", "chill", "cough", "fatigue", "nasal_obstruction", "loss_of_appetite", "diarrhea", "abdominal_pain", "nausea", "vomiting", "sore_throat", "headache", "myalgia", "loss_of_taste", "loss_of_smell", "dyspnea", "chest_pain", "delirium", "hypersomnia", "cyanosis"] # noqa: E501 + if condition not in allowed_values: + raise ValueError( + "Invalid value for `condition` ({0}), must be one of {1}" + .format(condition, allowed_values) + ) + + self._condition = condition + + @property + def certainty(self): + """Gets the certainty of this TextCovidSymptomAnnotationAllOf. + + Whether the annotation is positively or negatively correlated with the presence of COVID # noqa: E501 + + :return: The certainty of this TextCovidSymptomAnnotationAllOf. + :rtype: str + """ + return self._certainty + + @certainty.setter + def certainty(self, certainty): + """Sets the certainty of this TextCovidSymptomAnnotationAllOf. + + Whether the annotation is positively or negatively correlated with the presence of COVID # noqa: E501 + + :param certainty: The certainty of this TextCovidSymptomAnnotationAllOf. + :type certainty: str + """ + allowed_values = ["positive", "negated", "possible"] # noqa: E501 + if certainty not in allowed_values: + raise ValueError( + "Invalid value for `certainty` ({0}), must be one of {1}" + .format(certainty, allowed_values) + ) + + self._certainty = certainty diff --git a/server/openapi_server/models/text_id_annotation.py b/server/openapi_server/models/text_id_annotation.py new file mode 100644 index 0000000..2ddc0e7 --- /dev/null +++ b/server/openapi_server/models/text_id_annotation.py @@ -0,0 +1,200 @@ +# coding: utf-8 + +from __future__ import absolute_import +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model_ import Model +from openapi_server.models.text_annotation import TextAnnotation +from openapi_server.models.text_id_annotation_all_of import TextIdAnnotationAllOf +from openapi_server import util + +from openapi_server.models.text_annotation import TextAnnotation # noqa: E501 +from openapi_server.models.text_id_annotation_all_of import TextIdAnnotationAllOf # noqa: E501 + +class TextIdAnnotation(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, start=None, length=None, text=None, confidence=None, id_type=None): # noqa: E501 + """TextIdAnnotation - a model defined in OpenAPI + + :param start: The start of this TextIdAnnotation. # noqa: E501 + :type start: int + :param length: The length of this TextIdAnnotation. # noqa: E501 + :type length: int + :param text: The text of this TextIdAnnotation. # noqa: E501 + :type text: str + :param confidence: The confidence of this TextIdAnnotation. # noqa: E501 + :type confidence: float + :param id_type: The id_type of this TextIdAnnotation. # noqa: E501 + :type id_type: str + """ + self.openapi_types = { + 'start': int, + 'length': int, + 'text': str, + 'confidence': float, + 'id_type': str + } + + self.attribute_map = { + 'start': 'start', + 'length': 'length', + 'text': 'text', + 'confidence': 'confidence', + 'id_type': 'idType' + } + + self._start = start + self._length = length + self._text = text + self._confidence = confidence + self._id_type = id_type + + @classmethod + def from_dict(cls, dikt) -> 'TextIdAnnotation': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The TextIdAnnotation of this TextIdAnnotation. # noqa: E501 + :rtype: TextIdAnnotation + """ + return util.deserialize_model(dikt, cls) + + @property + def start(self): + """Gets the start of this TextIdAnnotation. + + The position of the first character # noqa: E501 + + :return: The start of this TextIdAnnotation. + :rtype: int + """ + return self._start + + @start.setter + def start(self, start): + """Sets the start of this TextIdAnnotation. + + The position of the first character # noqa: E501 + + :param start: The start of this TextIdAnnotation. + :type start: int + """ + if start is None: + raise ValueError("Invalid value for `start`, must not be `None`") # noqa: E501 + + self._start = start + + @property + def length(self): + """Gets the length of this TextIdAnnotation. + + The length of the annotation # noqa: E501 + + :return: The length of this TextIdAnnotation. + :rtype: int + """ + return self._length + + @length.setter + def length(self, length): + """Sets the length of this TextIdAnnotation. + + The length of the annotation # noqa: E501 + + :param length: The length of this TextIdAnnotation. + :type length: int + """ + if length is None: + raise ValueError("Invalid value for `length`, must not be `None`") # noqa: E501 + + self._length = length + + @property + def text(self): + """Gets the text of this TextIdAnnotation. + + The string annotated # noqa: E501 + + :return: The text of this TextIdAnnotation. + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this TextIdAnnotation. + + The string annotated # noqa: E501 + + :param text: The text of this TextIdAnnotation. + :type text: str + """ + if text is None: + raise ValueError("Invalid value for `text`, must not be `None`") # noqa: E501 + + self._text = text + + @property + def confidence(self): + """Gets the confidence of this TextIdAnnotation. + + The confidence in the accuracy of the annotation # noqa: E501 + + :return: The confidence of this TextIdAnnotation. + :rtype: float + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence): + """Sets the confidence of this TextIdAnnotation. + + The confidence in the accuracy of the annotation # noqa: E501 + + :param confidence: The confidence of this TextIdAnnotation. + :type confidence: float + """ + if confidence is None: + raise ValueError("Invalid value for `confidence`, must not be `None`") # noqa: E501 + if confidence is not None and confidence > 100: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value less than or equal to `100`") # noqa: E501 + if confidence is not None and confidence < 0: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value greater than or equal to `0`") # noqa: E501 + + self._confidence = confidence + + @property + def id_type(self): + """Gets the id_type of this TextIdAnnotation. + + Type of ID information # noqa: E501 + + :return: The id_type of this TextIdAnnotation. + :rtype: str + """ + return self._id_type + + @id_type.setter + def id_type(self, id_type): + """Sets the id_type of this TextIdAnnotation. + + Type of ID information # noqa: E501 + + :param id_type: The id_type of this TextIdAnnotation. + :type id_type: str + """ + allowed_values = ["account", "bio_id", "device", "health_plan", "id_num", "license", "medical_record", "ssn", "vehicle"] # noqa: E501 + if id_type not in allowed_values: + raise ValueError( + "Invalid value for `id_type` ({0}), must be one of {1}" + .format(id_type, allowed_values) + ) + + self._id_type = id_type diff --git a/server/openapi_server/models/text_id_annotation_all_of.py b/server/openapi_server/models/text_id_annotation_all_of.py new file mode 100644 index 0000000..8632077 --- /dev/null +++ b/server/openapi_server/models/text_id_annotation_all_of.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +from __future__ import absolute_import +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model_ import Model +from openapi_server import util + + +class TextIdAnnotationAllOf(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, id_type=None): # noqa: E501 + """TextIdAnnotationAllOf - a model defined in OpenAPI + + :param id_type: The id_type of this TextIdAnnotationAllOf. # noqa: E501 + :type id_type: str + """ + self.openapi_types = { + 'id_type': str + } + + self.attribute_map = { + 'id_type': 'idType' + } + + self._id_type = id_type + + @classmethod + def from_dict(cls, dikt) -> 'TextIdAnnotationAllOf': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The TextIdAnnotation_allOf of this TextIdAnnotationAllOf. # noqa: E501 + :rtype: TextIdAnnotationAllOf + """ + return util.deserialize_model(dikt, cls) + + @property + def id_type(self): + """Gets the id_type of this TextIdAnnotationAllOf. + + Type of ID information # noqa: E501 + + :return: The id_type of this TextIdAnnotationAllOf. + :rtype: str + """ + return self._id_type + + @id_type.setter + def id_type(self, id_type): + """Sets the id_type of this TextIdAnnotationAllOf. + + Type of ID information # noqa: E501 + + :param id_type: The id_type of this TextIdAnnotationAllOf. + :type id_type: str + """ + allowed_values = ["account", "bio_id", "device", "health_plan", "id_num", "license", "medical_record", "ssn", "vehicle"] # noqa: E501 + if id_type not in allowed_values: + raise ValueError( + "Invalid value for `id_type` ({0}), must be one of {1}" + .format(id_type, allowed_values) + ) + + self._id_type = id_type diff --git a/server/openapi_server/openapi/openapi.yaml b/server/openapi_server/openapi/openapi.yaml index 7c90893..1a42ee8 100644 --- a/server/openapi_server/openapi/openapi.yaml +++ b/server/openapi_server/openapi/openapi.yaml @@ -23,7 +23,7 @@ info: name: Apache 2.0 url: https://github.com/nlpsandbox/nlpsandbox-schemas/blob/develop/LICENSE title: NLP Sandbox Data Node API - version: 1.1.0 + version: 1.1.1 x-logo: url: https://nlpsandbox.github.io/nlpsandbox-schemas/logo.png servers: @@ -1588,6 +1588,43 @@ components: addressType: city confidence: 95.5 type: object + TextIdAnnotation: + allOf: + - $ref: '#/components/schemas/TextAnnotation' + - $ref: '#/components/schemas/TextIdAnnotation_allOf' + description: An ID annotation in a text + example: + start: 42 + length: 11 + text: 203-11-4535 + idType: ssn + confidence: 95.5 + type: object + TextContactAnnotation: + allOf: + - $ref: '#/components/schemas/TextAnnotation' + - $ref: '#/components/schemas/TextContactAnnotation_allOf' + description: A contact annotation in a text + example: + start: 42 + length: 11 + text: dave@uw.edu + contactType: email + confidence: 95.5 + type: object + TextCovidSymptomAnnotation: + allOf: + - $ref: '#/components/schemas/TextAnnotation' + - $ref: '#/components/schemas/TextCovidSymptomAnnotation_allOf' + description: A COVID symptom annotation in a text + example: + start: 42 + length: 9 + text: dry cough + condition: cough + certainty: positive + confidence: 95.5 + type: object Annotation: description: An annotation record example: @@ -1602,6 +1639,19 @@ components: text: 10/26/2020 dateFormat: MM/DD/YYYY confidence: 95.5 + textCovidSymptomAnnotations: + - start: 42 + length: 9 + text: dry cough + condition: cough + certainty: positive + confidence: 95.5 + - start: 42 + length: 9 + text: dry cough + condition: cough + certainty: positive + confidence: 95.5 textPersonNameAnnotations: - start: 42 length: 11 @@ -1626,6 +1676,28 @@ components: resourceSource: name: name name: datasets/awesome-dataset/annotationStores/awesome-annotation-store/annotations/awesome-annotation + textIdAnnotations: + - start: 42 + length: 11 + text: 203-11-4535 + idType: ssn + confidence: 95.5 + - start: 42 + length: 11 + text: 203-11-4535 + idType: ssn + confidence: 95.5 + textContactAnnotations: + - start: 42 + length: 11 + text: dave@uw.edu + contactType: email + confidence: 95.5 + - start: 42 + length: 11 + text: dave@uw.edu + contactType: email + confidence: 95.5 properties: name: description: The resource name of the annotation record, of the form datasets/{datasetId}/annotationStores/{annotationStoreId}/annotations/{annotationId} @@ -1649,6 +1721,21 @@ components: items: $ref: '#/components/schemas/TextPhysicalAddressAnnotation' type: array + textIdAnnotations: + description: ID annotations in a text + items: + $ref: '#/components/schemas/TextIdAnnotation' + type: array + textContactAnnotations: + description: Contact annotations in a text + items: + $ref: '#/components/schemas/TextContactAnnotation' + type: array + textCovidSymptomAnnotations: + description: COVID symptom annotations in a text + items: + $ref: '#/components/schemas/TextCovidSymptomAnnotation' + type: array required: - annotationSource - name @@ -1680,6 +1767,19 @@ components: text: 10/26/2020 dateFormat: MM/DD/YYYY confidence: 95.5 + textCovidSymptomAnnotations: + - start: 42 + length: 9 + text: dry cough + condition: cough + certainty: positive + confidence: 95.5 + - start: 42 + length: 9 + text: dry cough + condition: cough + certainty: positive + confidence: 95.5 textPersonNameAnnotations: - start: 42 length: 11 @@ -1703,6 +1803,28 @@ components: annotationSource: resourceSource: name: name + textIdAnnotations: + - start: 42 + length: 11 + text: 203-11-4535 + idType: ssn + confidence: 95.5 + - start: 42 + length: 11 + text: 203-11-4535 + idType: ssn + confidence: 95.5 + textContactAnnotations: + - start: 42 + length: 11 + text: dave@uw.edu + contactType: email + confidence: 95.5 + - start: 42 + length: 11 + text: dave@uw.edu + contactType: email + confidence: 95.5 properties: annotationSource: $ref: '#/components/schemas/AnnotationSource' @@ -1721,6 +1843,21 @@ components: items: $ref: '#/components/schemas/TextPhysicalAddressAnnotation' type: array + textIdAnnotations: + description: ID annotations in a text + items: + $ref: '#/components/schemas/TextIdAnnotation' + type: array + textContactAnnotations: + description: Contact annotations in a text + items: + $ref: '#/components/schemas/TextContactAnnotation' + type: array + textCovidSymptomAnnotations: + description: COVID symptom annotations in a text + items: + $ref: '#/components/schemas/TextCovidSymptomAnnotation' + type: array required: - annotationSource type: object @@ -2007,6 +2144,79 @@ components: - street - zip type: string + required: + - addressType + type: object + TextIdAnnotation_allOf: + properties: + idType: + description: Type of ID information + enum: + - account + - bio_id + - device + - health_plan + - id_num + - license + - medical_record + - ssn + - vehicle + type: string + required: + - idType + type: object + TextContactAnnotation_allOf: + properties: + contactType: + description: Type of contact information + enum: + - email + - fax + - phone + - url + - other + type: string + required: + - contactType + type: object + TextCovidSymptomAnnotation_allOf: + properties: + condition: + description: | + The sign/symptom type according to CDC definition + enum: + - fever + - chill + - cough + - fatigue + - nasal_obstruction + - loss_of_appetite + - diarrhea + - abdominal_pain + - nausea + - vomiting + - sore_throat + - headache + - myalgia + - loss_of_taste + - loss_of_smell + - dyspnea + - chest_pain + - delirium + - hypersomnia + - cyanosis + type: string + certainty: + description: | + Whether the annotation is positively or negatively correlated with the presence of COVID + enum: + - positive + - negated + - possible + type: string + required: + - certainty + - condition type: object PageOfAnnotations_allOf: properties: diff --git a/server/openapi_server/test/integration/util.py b/server/openapi_server/test/integration/util.py index 115c927..6924b16 100644 --- a/server/openapi_server/test/integration/util.py +++ b/server/openapi_server/test/integration/util.py @@ -74,5 +74,8 @@ def create_test_annotation(dataset_id, annotation_store_id, annotation_id): annotationStoreName=store_name, textDateAnnotations=[], textPersonNameAnnotations=[], - textPhysicalAddressAnnotations=[] + textPhysicalAddressAnnotations=[], + textIdAnnotations=[], + textContactAnnotations=[], + textCovidSymptomAnnotations=[] ).save() diff --git a/server/requirements.txt b/server/requirements.txt index 68704d7..2b8e9d4 100644 --- a/server/requirements.txt +++ b/server/requirements.txt @@ -1,5 +1,5 @@ connexion==2.7.0 -mongoengine==0.23.0 +mongoengine==0.23.1 psycopg2-binary==2.8.6 requests==2.25.1 swagger-ui-bundle==0.0.8 \ No newline at end of file