diff --git a/target/fhir-lens-HIV.json b/target/fhir-lens-HIV.json
deleted file mode 100644
index dfd507c..0000000
--- a/target/fhir-lens-HIV.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "resourceType" : "Library",
- "id" : "fhir-lens-HIV",
- "meta" : {
- "profile" : ["http://hl7.eu/fhir/ig/gravitate-health/StructureDefinition/lens"]
- },
- "text" : {
- "status" : "generated",
- "div" : "
Parameters
| in | | | CodeableConcept | parameter documentation |
Contents
application/javascript
Classic Pregnancy Lens
"
- },
- "extension" : [{
- "url" : "http://hl7.eu/fhir/ig/gravitate-health/StructureDefinition/lee-version",
- "valueString" : "0.1"
- }],
- "url" : "http://hl7.eu/fhir/ig/gravitate-health/Library/mock-lib",
- "identifier" : [{
- "system" : "http://gravitate-health.lst.tfo.upm.es",
- "value" : "fhir-lens-HIV"
- }],
- "version" : "0.1.0",
- "name" : "fhir-lens-HIV",
- "title" : "HIV Lens - Now in FHIR format and with metadata",
- "status" : "draft",
- "experimental" : true,
- "type" : {
- "coding" : [{
- "code" : "logical-library"
- }]
- },
- "date" : "2024-02-29T10:54:27+00:00",
- "publisher" : "Gravitate Health Project - UPM Team",
- "contact" : [{
- "name" : "Gravitate Health Project",
- "telecom" : [{
- "system" : "url",
- "value" : "https://www.gravitatehealth.eu/"
- }]
- },
- {
- "name" : "Gravitate Health Project",
- "telecom" : [{
- "system" : "url",
- "value" : "https://www.gravitatehealth.eu/"
- }]
- }],
- "description" : "This lens is intended to be used by patients to identify relevant information about information related to HIV.",
- "jurisdiction" : [{
- "coding" : [{
- "system" : "urn:iso:std:iso:3166",
- "code" : "AD"
- }]
- }],
- "purpose" : "This lens is intended to be used by patients to identify relevant information about information related to HIV.",
- "usage" : "Just apply it on the app",
- "copyright" : "copyright label",
- "parameter" : [{
- "use" : "in",
- "documentation" : "parameter documentation",
- "type" : "CodeableConcept"
- }],
- "content" : [{
- "contentType" : "application/javascript",
- "data" : "bGV0IHB2RGF0YSA9IHB2OwpsZXQgaHRtbERhdGEgPSBodG1sOwoKbGV0IGVwaURhdGEgPSBlcGk7CmxldCBpcHNEYXRhID0gaXBzOwoKbGV0IGdldFNwZWNpZmljYXRpb24gPSAoKSA9PiB7CiAgICByZXR1cm4gIjEuMC4wIjsKfTsKCmxldCBhbm5vdGF0aW9uUHJvY2VzcyA9IChsaXN0T2ZDYXRlZ29yaWVzLCBlbmhhbmNlVGFnLCBkb2N1bWVudCwgcmVzcG9uc2UpID0+IHsKICAgIGxpc3RPZkNhdGVnb3JpZXMuZm9yRWFjaCgoY2hlY2spID0+IHsKICAgICAgICBpZiAocmVzcG9uc2UuaW5jbHVkZXMoY2hlY2spKSB7CiAgICAgICAgICAgIGxldCBlbGVtZW50cyA9IGRvY3VtZW50LmdldEVsZW1lbnRzQnlDbGFzc05hbWUoY2hlY2spOwogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGVsZW1lbnRzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICBlbGVtZW50c1tpXS5jbGFzc0xpc3QuYWRkKGVuaGFuY2VUYWcpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChkb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZSgiaGVhZCIpLmxlbmd0aCA+IDApIHsKICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCJoZWFkIilbMF0ucmVtb3ZlKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCJib2R5IikubGVuZ3RoID4gMCkgewogICAgICAgICAgICAgICAgcmVzcG9uc2UgPSBkb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZSgiYm9keSIpWzBdLmlubmVySFRNTDsKICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCJSZXNwb25zZTogIiArIHJlc3BvbnNlKTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCJSZXNwb25zZTogIiArIGRvY3VtZW50LmRvY3VtZW50RWxlbWVudC5pbm5lckhUTUwpOwogICAgICAgICAgICAgICAgcmVzcG9uc2UgPSBkb2N1bWVudC5kb2N1bWVudEVsZW1lbnQuaW5uZXJIVE1MOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfSk7CgogICAgaWYgKHJlc3BvbnNlID09IG51bGwgfHwgcmVzcG9uc2UgPT0gIiIpIHsKICAgICAgICB0aHJvdyBuZXcgRXJyb3IoCiAgICAgICAgICAgICJBbm5vdGF0aW9uIHByb2NjZXNzIGZhaWxlZDogUmV0dXJuZWQgZW1wdHkgb3IgbnVsbCByZXNwb25zZSIKICAgICAgICApOwogICAgICAgIC8vcmV0dXJuIGh0bWxEYXRhCiAgICB9IGVsc2UgewogICAgICAgIGNvbnNvbGUubG9nKCJSZXNwb25zZTogIiArIHJlc3BvbnNlKTsKICAgICAgICByZXR1cm4gcmVzcG9uc2U7CiAgICB9Cn0KCmxldCBhbm5vdGF0ZUhUTUxzZWN0aW9uID0gYXN5bmMgKGxpc3RPZkNhdGVnb3JpZXMsIGVuaGFuY2VUYWcpID0+IHsKICAgIGxldCByZXNwb25zZSA9IGh0bWxEYXRhOwogICAgbGV0IGRvY3VtZW50OwoKICAgIGlmICh0eXBlb2Ygd2luZG93ID09PSAidW5kZWZpbmVkIikgewogICAgICAgIGxldCBqc2RvbSA9IGF3YWl0IGltcG9ydCgianNkb20iKTsKICAgICAgICBsZXQgeyBKU0RPTSB9ID0ganNkb207CiAgICAgICAgbGV0IGRvbSA9IG5ldyBKU0RPTShodG1sRGF0YSk7CiAgICAgICAgZG9jdW1lbnQgPSBkb20ud2luZG93LmRvY3VtZW50OwogICAgICAgIHJldHVybiBhbm5vdGF0aW9uUHJvY2VzcyhsaXN0T2ZDYXRlZ29yaWVzLCBlbmhhbmNlVGFnLCBkb2N1bWVudCwgcmVzcG9uc2UpOwogICAgfSBlbHNlIHsKICAgIC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gICAgZWxlbWVudC5leHRlbnNpb25bMV0udmFsdWVDb2RlYWJsZVJlZmVyZW5jZS5jb25jZXB0LmNvZGluZy5mb3JFYWNoKAogICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNvZGluZykgPT4gewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCJFeHRlbnNpb246ICIgKyBlbGVtZW50LmV4dGVuc2lvblswXS52YWx1ZVN0cmluZyArICI6IiArIGNvZGluZy5jb2RlKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIENoZWNrIGlmIHRoZSBjb2RlIGlzIGluIHRoZSBsaXN0IG9mIGNhdGVnb3JpZXMgdG8gc2VhcmNoCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGxpc3RPZkNhdGVnb3JpZXNUb1NlYXJjaC5pbmNsdWRlcyhjb2RpbmcuY29kZSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ2hlY2sgaWYgdGhlIGNhdGVnb3J5IGlzIGFscmVhZHkgaW4gdGhlIGxpc3Qgb2YgY2F0ZWdvcmllcwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXRlZ29yaWVzLnB1c2goZWxlbWVudC5leHRlbnNpb25bMF0udmFsdWVTdHJpbmcpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgIH0pOwoKICAgIGlmIChjb21wb3NpdGlvbnMgPT0gMCkgewogICAgICAgIHRocm93IG5ldyBFcnJvcignQmFkIGVQSTogbm8gY2F0ZWdvcnkgIkNvbXBvc2l0aW9uIiBmb3VuZCcpOwogICAgfQoKICAgIGlmIChjYXRlZ29yaWVzLmxlbmd0aCA9PSAwKSB7CiAgICAgICAgLy90aHJvdyBuZXcgRXJyb3IoIk5vIGNhdGVnb3JpZXMgZm91bmQiLCBjYXRlZ29yaWVzKTsKICAgICAgICByZXR1cm4gaHRtbERhdGE7CiAgICB9CiAgICAvL0ZvY3VzIChhZGRzIGhpZ2hsaWdodCBjbGFzcykgdGhlIGh0bWwgYXBwbHlpbmcgZXZlcnkgY2F0ZWdvcnkgZm91bmQKICAgIHJldHVybiBhd2FpdCBhbm5vdGF0ZUhUTUxzZWN0aW9uKGNhdGVnb3JpZXMsICJoaWdobGlnaHQiKTsKfTsKcmV0dXJuIHsKICAgIGVuaGFuY2U6IGVuaGFuY2UsCiAgICBnZXRTcGVjaWZpY2F0aW9uOiBnZXRTcGVjaWZpY2F0aW9uLAp9Ow=="
- }]
- }
\ No newline at end of file
diff --git a/target/fhir-lens-allergy.json b/target/fhir-lens-allergy.json
deleted file mode 100644
index df73da6..0000000
--- a/target/fhir-lens-allergy.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "resourceType" : "Library",
- "id" : "fhir-lens-allergy",
- "meta" : {
- "profile" : ["http://hl7.eu/fhir/ig/gravitate-health/StructureDefinition/lens"]
- },
- "text" : {
- "status" : "generated",
- "div" : "Parameters
| in | | | CodeableConcept | parameter documentation |
Contents
application/javascript
Classic Pregnancy Lens
"
- },
- "extension" : [{
- "url" : "http://hl7.eu/fhir/ig/gravitate-health/StructureDefinition/lee-version",
- "valueString" : "0.1"
- }],
- "url" : "http://hl7.eu/fhir/ig/gravitate-health/Library/mock-lib",
- "identifier" : [{
- "system" : "http://gravitate-health.lst.tfo.upm.es",
- "value" : "fhir-lens-allergy"
- }],
- "version" : "0.1.0",
- "name" : "fhir-lens-allergy",
- "title" : "Allergy Lens - Now in FHIR format and with metadata",
- "status" : "draft",
- "experimental" : true,
- "type" : {
- "coding" : [{
- "code" : "logical-library"
- }]
- },
- "date" : "2024-02-29T10:54:27+00:00",
- "publisher" : "Gravitate Health Project - UPM Team",
- "contact" : [{
- "name" : "Gravitate Health Project",
- "telecom" : [{
- "system" : "url",
- "value" : "https://www.gravitatehealth.eu/"
- }]
- },
- {
- "name" : "Gravitate Health Project",
- "telecom" : [{
- "system" : "url",
- "value" : "https://www.gravitatehealth.eu/"
- }]
- }],
- "description" : "This lens is intended to be used by patients to identify relevant information about information related to allergies.",
- "jurisdiction" : [{
- "coding" : [{
- "system" : "urn:iso:std:iso:3166",
- "code" : "AD"
- }]
- }],
- "purpose" : "This lens is intended to be used by patients to identify relevant information about information related to allergies.",
- "usage" : "Just apply it on the app",
- "copyright" : "copyright label",
- "parameter" : [{
- "use" : "in",
- "documentation" : "parameter documentation",
- "type" : "CodeableConcept"
- }],
- "content" : [{
- "contentType" : "application/javascript",
- "data" : "bGV0IHB2RGF0YSA9IHB2OwpsZXQgaHRtbERhdGEgPSBodG1sOwoKbGV0IGVwaURhdGEgPSBlcGk7CmxldCBpcHNEYXRhID0gaXBzOwoKbGV0IGdldFNwZWNpZmljYXRpb24gPSAoKSA9PiB7CiAgICByZXR1cm4gIjEuMC4wIjsKfTsKCmxldCBhbm5vdGF0aW9uUHJvY2VzcyA9IChsaXN0T2ZDYXRlZ29yaWVzLCBlbmhhbmNlVGFnLCBkb2N1bWVudCwgcmVzcG9uc2UpID0+IHsKICAgIGxpc3RPZkNhdGVnb3JpZXMuZm9yRWFjaCgoY2hlY2spID0+IHsKICAgICAgICBpZiAocmVzcG9uc2UuaW5jbHVkZXMoY2hlY2spKSB7CiAgICAgICAgICAgIGxldCBlbGVtZW50cyA9IGRvY3VtZW50LmdldEVsZW1lbnRzQnlDbGFzc05hbWUoY2hlY2spOwogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGVsZW1lbnRzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICBlbGVtZW50c1tpXS5jbGFzc0xpc3QuYWRkKGVuaGFuY2VUYWcpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChkb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZSgiaGVhZCIpLmxlbmd0aCA+IDApIHsKICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCJoZWFkIilbMF0ucmVtb3ZlKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCJib2R5IikubGVuZ3RoID4gMCkgewogICAgICAgICAgICAgICAgcmVzcG9uc2UgPSBkb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZSgiYm9keSIpWzBdLmlubmVySFRNTDsKICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCJSZXNwb25zZTogIiArIHJlc3BvbnNlKTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCJSZXNwb25zZTogIiArIGRvY3VtZW50LmRvY3VtZW50RWxlbWVudC5pbm5lckhUTUwpOwogICAgICAgICAgICAgICAgcmVzcG9uc2UgPSBkb2N1bWVudC5kb2N1bWVudEVsZW1lbnQuaW5uZXJIVE1MOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfSk7CgogICAgaWYgKHJlc3BvbnNlID09IG51bGwgfHwgcmVzcG9uc2UgPT0gIiIpIHsKICAgICAgICB0aHJvdyBuZXcgRXJyb3IoCiAgICAgICAgICAgICJBbm5vdGF0aW9uIHByb2NjZXNzIGZhaWxlZDogUmV0dXJuZWQgZW1wdHkgb3IgbnVsbCByZXNwb25zZSIKICAgICAgICApOwogICAgICAgIC8vcmV0dXJuIGh0bWxEYXRhCiAgICB9IGVsc2UgewogICAgICAgIGNvbnNvbGUubG9nKCJSZXNwb25zZTogIiArIHJlc3BvbnNlKTsKICAgICAgICByZXR1cm4gcmVzcG9uc2U7CiAgICB9Cn0KCmxldCBhbm5vdGF0ZUhUTUxzZWN0aW9uID0gYXN5bmMgKGxpc3RPZkNhdGVnb3JpZXMsIGVuaGFuY2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mNlLnJlc291cmNlVHlwZSA9PSAiUGF0aWVudCIpIHsKICAgICAgICAgICAgZ2VuZGVyID0gZWxlbWVudC5yZXNvdXJjZS5nZW5kZXI7CiAgICAgICAgICAgIGlmIChnZW5kZXIgIT0gImZlbWFsZSIpIHsKICAgICAgICAgICAgICAgIHJldHVybiBodG1sRGF0YTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0pOwoKICAgIC8vIGVQSSB0cmFzbGF0aW9uIGZyb20gdGVybWlub2xvZ3kgY29kZXMgdG8gdGhlaXIgaHVtYW4gcmVkYWJsZSB0cmFuc2xhdGlvbnMgaW4gdGhlIHNlY3Rpb25zCiAgICBsZXQgY29tcG9zaXRpb25zID0gMDsKICAgIGxldCBjYXRlZ29yaWVzID0gW107CiAgICBlcGkuZW50cnkuZm9yRWFjaCgoZW50cnkpID0+IHsKICAgICAgICBpZiAoZW50cnkucmVzb3VyY2UucmVzb3VyY2VUeXBlID09ICJDb21wb3NpdGlvbiIpIHsKICAgICAgICAgICAgY29tcG9zaXRpb25zKys7CiAgICAgICAgICAgIC8vSXRlcmF0ZWQgdGhyb3VnaCB0aGUgQ29uZGl0aW9uIGVsZW1lbnQgc2VhcmNoaW5nIGZvciBjb25kaXRpb25zCiAgICAgICAgICAgIGVudHJ5LnJlc291cmNlLmV4dGVuc2lvbi5mb3JFYWNoKChlbGVtZW50KSA9PiB7CiAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgIC8vIENoZWNrIGlmIHRoZSBwb3NpdGlvbiBvZiB0aGUgZXh0ZW5zaW9uWzFdIGlzIGNvcnJlY3QKICAgICAgICAgICAgICAgIGlmIChlbGVtZW50LmV4dGVuc2lvblsxXS51cmwgPT0gImNvbmNlcHQiKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gU2VhcmNoIHRocm91Z2ggdGhlIGRpZmZlcmVudCB0ZXJtaW5vbG9naWVzIHRoYXQgbWF5IGJlIGF2YWlibGUgdG8gY2hlY2sgaW4gdGhlIGNvbmRpdGlvbgogICAgICAgICAgICAgICAgICAgIGlmIChlbGVtZW50LmV4dGVuc2lvblsxXS52YWx1ZUNvZGVhYmxlUmVmZXJlbmNlLmNvbmNlcHQgIT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGVsZW1lbnQuZXh0ZW5zaW9uWzFdLnZhbHVlQ29kZWFibGVSZWZlcmVuY2UuY29uY2VwdC5jb2RpbmcuZm9yRWFjaCgKICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjb2RpbmcpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygiRXh0ZW5zaW9uOiAiICsgZWxlbWVudC5leHRlbnNpb25bMF0udmFsdWVTdHJpbmcgKyAiOiIgKyBjb2RpbmcuY29kZSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBDaGVjayBpZiB0aGUgY29kZSBpcyBpbiB0aGUgbGlzdCBvZiBjYXRlZ29yaWVzIHRvIHNlYXJjaAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsaXN0T2ZDYXRlZ29yaWVzVG9TZWFyY2guaW5jbHVkZXMoY29kaW5nLmNvZGUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIENoZWNrIGlmIHRoZSBjYXRlZ29yeSBpcyBhbHJlYWR5IGluIHRoZSBsaXN0IG9mIGNhdGVnb3JpZXMKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZWdvcmllcy5wdXNoKGVsZW1lbnQuZXh0ZW5zaW9uWzBdLnZhbHVlU3RyaW5nKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICB9KTsKCiAgICBpZiAoY29tcG9zaXRpb25zID09IDApIHsKICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0JhZCBlUEk6IG5vIGNhdGVnb3J5ICJDb21wb3NpdGlvbiIgZm91bmQnKTsKICAgIH0KCiAgICBpZiAoY2F0ZWdvcmllcy5sZW5ndGggPT0gMCkgewogICAgICAgIC8vIHRocm93IG5ldyBFcnJvcigiTm8gY2F0ZWdvcmllcyBmb3VuZCIsIGNhdGVnb3JpZXMpOwogICAgICAgIHJldHVybiBodG1sRGF0YTsKICAgIH0KICAgIC8vRm9jdXMgKGFkZHMgaGlnaGxpZ2h0IGNsYXNzKSB0aGUgaHRtbCBhcHBseWluZyBldmVyeSBjYXRlZ29yeSBmb3VuZAogICAgcmV0dXJuIGF3YWl0IGFubm90YXRlSFRNTHNlY3Rpb24oY2F0ZWdvcmllcywgImhpZ2hsaWdodCIpOwp9OwoKcmV0dXJuIHsKICAgIGVuaGFuY2U6IGVuaGFuY2UsCiAgICBnZXRTcGVjaWZpY2F0aW9uOiBnZXRTcGVjaWZpY2F0aW9uLAp9Owo="
- }]
- }
\ No newline at end of file
diff --git a/target/fhir-lens-diabetes.json b/target/fhir-lens-diabetes.json
deleted file mode 100644
index dfc2055..0000000
--- a/target/fhir-lens-diabetes.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "resourceType" : "Library",
- "id" : "fhir-lens-diabetes",
- "meta" : {
- "profile" : ["http://hl7.eu/fhir/ig/gravitate-health/StructureDefinition/lens"]
- },
- "text" : {
- "status" : "generated",
- "div" : "Parameters
| in | | | CodeableConcept | parameter documentation |
Contents
application/javascript
Classic Pregnancy Lens
"
- },
- "extension" : [{
- "url" : "http://hl7.eu/fhir/ig/gravitate-health/StructureDefinition/lee-version",
- "valueString" : "0.1"
- }],
- "url" : "http://hl7.eu/fhir/ig/gravitate-health/Library/mock-lib",
- "identifier" : [{
- "system" : "http://gravitate-health.lst.tfo.upm.es",
- "value" : "fhir-lens-diabetes"
- }],
- "version" : "0.1.0",
- "name" : "fhir-lens-diabetes",
- "title" : "Diabetes Lens - Now in FHIR format and with metadata",
- "status" : "draft",
- "experimental" : true,
- "type" : {
- "coding" : [{
- "code" : "logical-library"
- }]
- },
- "date" : "2024-02-29T10:54:27+00:00",
- "publisher" : "Gravitate Health Project - UPM Team",
- "contact" : [{
- "name" : "Gravitate Health Project",
- "telecom" : [{
- "system" : "url",
- "value" : "https://www.gravitatehealth.eu/"
- }]
- },
- {
- "name" : "Gravitate Health Project",
- "telecom" : [{
- "system" : "url",
- "value" : "https://www.gravitatehealth.eu/"
- }]
- }],
- "description" : "This lens is intended to be used by patients to identify relevant information about information related to diabetes.",
- "jurisdiction" : [{
- "coding" : [{
- "system" : "urn:iso:std:iso:3166",
- "code" : "AD"
- }]
- }],
- "purpose" : "This lens is intended to be used by patients to identify relevant information about information related to diabetes.",
- "usage" : "Just apply it on the app",
- "copyright" : "copyright label",
- "parameter" : [{
- "use" : "in",
- "documentation" : "parameter documentation",
- "type" : "CodeableConcept"
- }],
- "content" : [{
- "contentType" : "application/javascript",
- "data" : "CmxldCBwdkRhdGEgPSBwdgpsZXQgaHRtbERhdGEgPSBodG1sCgpsZXQgZXBpRGF0YSA9IGVwaTsKbGV0IGlwc0RhdGEgPSBpcHM7CgpsZXQgZ2V0U3BlY2lmaWNhdGlvbiA9ICgpID0+IHsKICAgIHJldHVybiAiMS4wLjAiCn0KCmxldCBhbm5vdGF0aW9uUHJvY2VzcyA9IChsaXN0T2ZDYXRlZ29yaWVzLCBlbmhhbmNlVGFnLCBkb2N1bWVudCwgcmVzcG9uc2UpID0+IHsKICAgIGxpc3RPZkNhdGVnb3JpZXMuZm9yRWFjaCgoY2hlY2spID0+IHsKICAgICAgICBpZiAocmVzcG9uc2UuaW5jbHVkZXMoY2hlY2spKSB7CiAgICAgICAgICAgIGxldCBlbGVtZW50cyA9IGRvY3VtZW50LmdldEVsZW1lbnRzQnlDbGFzc05hbWUoY2hlY2spOwogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGVsZW1lbnRzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICBlbGVtZW50c1tpXS5jbGFzc0xpc3QuYWRkKGVuaGFuY2VUYWcpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChkb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZSgiaGVhZCIpLmxlbmd0aCA+IDApIHsKICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCJoZWFkIilbMF0ucmVtb3ZlKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCJib2R5IikubGVuZ3RoID4gMCkgewogICAgICAgICAgICAgICAgcmVzcG9uc2UgPSBkb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZSgiYm9keSIpWzBdLmlubmVySFRNTDsKICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCJSZXNwb25zZTogIiArIHJlc3BvbnNlKTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCJSZXNwb25zZTogIiArIGRvY3VtZW50LmRvY3VtZW50RWxlbWVudC5pbm5lckhUTUwpOwogICAgICAgICAgICAgICAgcmVzcG9uc2UgPSBkb2N1bWVudC5kb2N1bWVudEVsZW1lbnQuaW5uZXJIVE1MOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfSk7CgogICAgaWYgKHJlc3BvbnNlID09IG51bGwgfHwgcmVzcG9uc2UgPT0gIiIpIHsKICAgICAgICB0aHJvdyBuZXcgRXJyb3IoCiAgICAgICAgICAgICJBbm5vdGF0aW9uIHByb2NjZXNzIGZhaWxlZDogUmV0dXJuZWQgZW1wdHkgb3IgbnVsbCByZXNwb25zZSIKICAgICAgICApOwogICAgICAgIC8vcmV0dXJuIGh0bWxEYXRhCiAgICB9IGVsc2UgewogICAgICAgIG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No newline at end of file
diff --git a/target/fhir-lens-interaction.json b/target/fhir-lens-interaction.json
deleted file mode 100644
index 192f0b3..0000000
--- a/target/fhir-lens-interaction.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "resourceType" : "Library",
- "id" : "fhir-lens-interaction",
- "meta" : {
- "profile" : ["http://hl7.eu/fhir/ig/gravitate-health/StructureDefinition/lens"]
- },
- "text" : {
- "status" : "generated",
- "div" : "Parameters
| in | | | CodeableConcept | parameter documentation |
Contents
application/javascript
Classic Pregnancy Lens
"
- },
- "extension" : [{
- "url" : "http://hl7.eu/fhir/ig/gravitate-health/StructureDefinition/lee-version",
- "valueString" : "0.1"
- }],
- "url" : "http://hl7.eu/fhir/ig/gravitate-health/Library/mock-lib",
- "identifier" : [{
- "system" : "http://gravitate-health.lst.tfo.upm.es",
- "value" : "fhir-lens-interaction"
- }],
- "version" : "0.1.0",
- "name" : "fhir-lens-interaction",
- "title" : "Interaction Lens - Now in FHIR format and with metadata",
- "status" : "draft",
- "experimental" : true,
- "type" : {
- "coding" : [{
- "code" : "logical-library"
- }]
- },
- "date" : "2024-02-29T10:54:27+00:00",
- "publisher" : "Gravitate Health Project - UPM Team",
- "contact" : [{
- "name" : "Gravitate Health Project",
- "telecom" : [{
- "system" : "url",
- "value" : "https://www.gravitatehealth.eu/"
- }]
- },
- {
- "name" : "Gravitate Health Project",
- "telecom" : [{
- "system" : "url",
- "value" : "https://www.gravitatehealth.eu/"
- }]
- }],
- "description" : "This lens is intended to be used by patients to identify relevant information about interaction between drugs in the leaflets.",
- "jurisdiction" : [{
- "coding" : [{
- "system" : "urn:iso:std:iso:3166",
- "code" : "AD"
- }]
- }],
- "purpose" : "This lens is intended to be used by patients to identify relevant information about interaction between drugs in the leaflets.",
- "usage" : "Just apply it on the app",
- "copyright" : "copyright label",
- "parameter" : [{
- "use" : "in",
- "documentation" : "parameter documentation",
- "type" : "CodeableConcept"
- }],
- "content" : [{
- "contentType" : "application/javascript",
- "data" : "bGV0IHB2R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fSBlbHNlIHsKICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCJSZXNwb25zZTogIiArIGRvY3VtZW50LmRvY3VtZW50RWxlbWVudC5pbm5lckhUTUwpOwogICAgICAgICAgICAgICAgcmVzcG9uc2UgPSBkb2N1bWVudC5kb2N1bWVudEVsZW1lbnQuaW5uZXJIVE1MOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfSk7CgogICAgaWYgKHJlc3BvbnNlID09IG51bGwgfHwgcmVzcG9uc2UgPT0gIiIpIHsKICAgICAgICB0aHJvdyBuZXcgRXJyb3IoCiAgICAgICAgICAgICJBbm5vdGF0aW9uIHByb2NjZXNzIGZhaWxlZDogUmV0dXJuZWQgZW1wdHkgb3IgbnVsbCByZXNwb25zZSIKICAgICAgICApOwogICAgICAgIC8vcmV0dXJuIGh0bWxEYXRhCiAgICB9IGVsc2UgewogICAgICAgIGNvbnNvbGUubG9nKCJSZXNwb25zZTogIiArIHJlc3BvbnNlKTsKICAgICAgICByZXR1cm4gcmVzcG9uc2U7CiAgICB9Cn0KCmxldCBhbm5vdGF0ZUhUTUxzZWN0aW9uID0gYXN5bmMgKGxpc3RPZkNhdGVnb3JpZXMsIGVuaGFuY2VUYWcpID0+IHsKICAgIGxldCByZXNwb25zZSA9IGh0bWxEYXRhOwogICAgbGV0IGRvY3VtZW50OwoKICAgIGlmICh0eXBlb2Ygd2luZG93ID09PSAidW5kZWZpbmVkIikgewogICAgICAgIGxldCBqc2RvbSA9IGF3YWl0IGltcG9ydCgianNkb20iKTsKICAgICAgICBsZXQgeyBKU0RPTSB9ID0ganNkb207CiAgICAgICAgbGV0IGRvbSA9IG5ldyBKU0RPTShodG1sRGF0YSk7CiAgICAgICAgZG9jdW1lbnQgPSBkb20ud2luZG93LmRvY3VtZW50OwogICAgICAgIHJldHVybiBhbm5vdGF0aW9uUHJvY2VzcyhsaXN0T2ZDYXRlZ29yaWVzLCBlbmhhbmNlVGFnLCBkb2N1bWVudCwgcmVzcG9uc2U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lIHNlY3Rpb25zCiAgICBsZXQgY29tcG9zaXRpb25zID0gMDsKICAgIGxldCBjYXRlZ29yaWVzID0gW107CiAgICBlcGkuZW50cnkuZm9yRWFjaCgoZW50cnkpID0+IHsKICAgICAgICBpZiAoZW50cnkucmVzb3VyY2UucmVzb3VyY2VUeXBlID09ICJDb21wb3NpdGlvbiIpIHsKICAgICAgICAgICAgY29tcG9zaXRpb25zKys7CiAgICAgICAgICAgIC8vSXRlcmF0ZWQgdGhyb3VnaCB0aGUgQ29uZGl0aW9uIGVsZW1lbnQgc2VhcmNoaW5nIGZvciBjb25kaXRpb25zCiAgICAgICAgICAgIGVudHJ5LnJlc291cmNlLmV4dGVuc2lvbi5mb3JFYWNoKChlbGVtZW50KSA9PiB7CiAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgIC8vIENoZWNrIGlmIHRoZSBwb3NpdGlvbiBvZiB0aGUgZXh0ZW5zaW9uWzFdIGlzIGNvcnJlY3QKICAgICAgICAgICAgICAgIGlmIChlbGVtZW50LmV4dGVuc2lvblsxXS51cmwgPT0gImNvbmNlcHQiKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gU2VhcmNoIHRocm91Z2ggdGhlIGRpZmZlcmVudCB0ZXJtaW5vbG9naWVzIHRoYXQgbWF5IGJlIGF2YWlibGUgdG8gY2hlY2sgaW4gdGhlIGNvbmRpdGlvbgogICAgICAgICAgICAgICAgICAgIGlmIChlbGVtZW50LmV4dGVuc2lvblsxXS52YWx1ZUNvZGVhYmxlUmVmZXJlbmNlLmNvbmNlcHQgIT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGVsZW1lbnQuZXh0ZW5zaW9uWzFdLnZhbHVlQ29kZWFibGVSZWZlcmVuY2UuY29uY2VwdC5jb2RpbmcuZm9yRWFjaCgKICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjb2RpbmcpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygiRXh0ZW5zaW9uOiAiICsgZWxlbWVudC5leHRlbnNpb25bMF0udmFsdWVTdHJpbmcgKyAiOiIgKyBjb2RpbmcuY29kZSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBDaGVjayBpZiB0aGUgY29kZSBpcyBpbiB0aGUgbGlzdCBvZiBjYXRlZ29yaWVzIHRvIHNlYXJjaAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsaXN0T2ZDYXRlZ29yaWVzVG9TZWFyY2guaW5jbHVkZXMoY29kaW5nLmNvZGUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIENoZWNrIGlmIHRoZSBjYXRlZ29yeSBpcyBhbHJlYWR5IGluIHRoZSBsaXN0IG9mIGNhdGVnb3JpZXMKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZWdvcmllcy5wdXNoKGVsZW1lbnQuZXh0ZW5zaW9uWzBdLnZhbHVlU3RyaW5nKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICB9KTsKCiAgICBpZiAoY29tcG9zaXRpb25zID09IDApIHsKICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0JhZCBlUEk6IG5vIGNhdGVnb3J5ICJDb21wb3NpdGlvbiIgZm91bmQnKTsKICAgIH0KCiAgICBpZiAoY2F0ZWdvcmllcy5sZW5ndGggPT0gMCkgewogICAgICAgIC8vIHRocm93IG5ldyBFcnJvcigiTm8gY2F0ZWdvcmllcyBmb3VuZCIsIGNhdGVnb3JpZXMpOwogICAgICAgIHJldHVybiBodG1sRGF0YTsKICAgIH0KICAgIC8vRm9jdXMgKGFkZHMgaGlnaGxpZ2h0IGNsYXNzKSB0aGUgaHRtbCBhcHBseWluZyBldmVyeSBjYXRlZ29yeSBmb3VuZAogICAgcmV0dXJuIGF3YWl0IGFubm90YXRlSFRNTHNlY3Rpb24oY2F0ZWdvcmllcywgImhpZ2hsaWdodCIpOwp9OwoKcmV0dXJuIHsKICAgIGVuaGFuY2U6IGVuaGFuY2UsCiAgICBnZXRTcGVjaWZpY2F0aW9uOiBnZXRTcGVjaWZpY2F0aW9uLAp9Ow=="
- }]
- }
\ No newline at end of file
diff --git a/target/fhir-lens-intolerance.json b/target/fhir-lens-intolerance.json
deleted file mode 100644
index c8a2575..0000000
--- a/target/fhir-lens-intolerance.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "resourceType" : "Library",
- "id" : "fhir-lens-intolerance",
- "meta" : {
- "profile" : ["http://hl7.eu/fhir/ig/gravitate-health/StructureDefinition/lens"]
- },
- "text" : {
- "status" : "generated",
- "div" : "Parameters
| in | | | CodeableConcept | parameter documentation |
Contents
application/javascript
Classic Pregnancy Lens
"
- },
- "extension" : [{
- "url" : "http://hl7.eu/fhir/ig/gravitate-health/StructureDefinition/lee-version",
- "valueString" : "0.1"
- }],
- "url" : "http://hl7.eu/fhir/ig/gravitate-health/Library/mock-lib",
- "identifier" : [{
- "system" : "http://gravitate-health.lst.tfo.upm.es",
- "value" : "fhir-lens-intolerance"
- }],
- "version" : "0.1.0",
- "name" : "fhir-lens-intolerance",
- "title" : "Intolerance Lens - Now in FHIR format and with metadata",
- "status" : "draft",
- "experimental" : true,
- "type" : {
- "coding" : [{
- "code" : "logical-library"
- }]
- },
- "date" : "2024-02-29T10:54:27+00:00",
- "publisher" : "Gravitate Health Project - UPM Team",
- "contact" : [{
- "name" : "Gravitate Health Project",
- "telecom" : [{
- "system" : "url",
- "value" : "https://www.gravitatehealth.eu/"
- }]
- },
- {
- "name" : "Gravitate Health Project",
- "telecom" : [{
- "system" : "url",
- "value" : "https://www.gravitatehealth.eu/"
- }]
- }],
- "description" : "This is a lens that highlights information about intolerance in the ePIs. It is intended to be used by patients to identify relevant information about intolerance in the leaflets.",
- "jurisdiction" : [{
- "coding" : [{
- "system" : "urn:iso:std:iso:3166",
- "code" : "AD"
- }]
- }],
- "purpose" : "This lens is intended to be used by patients to identify relevant information about intolerance in the leaflets.",
- "usage" : "Just apply it on the app",
- "copyright" : "copyright label",
- "parameter" : [{
- "use" : "in",
- "documentation" : "parameter documentation",
- "type" : "CodeableConcept"
- }],
- "content" : [{
- "contentType" : "application/javascript",
- "data" : "bGV0IHB2RGF0YSA9IHB2OwpsZXQgaHRtbERhdGEgPSBodG1sOwoKbGV0IGVwaURhdGEgPSBlcGk7CmxldCBpcHNEYXRhID0gaXBzOwoKbGV0IGdldFNwZWNpZmljYXRpb24gPSAoKSA9PiB7CiAgICByZXR1cm4gIjEuMC4wIjsKfTsKCmxldCBhbm5vdGF0aW9uUHJvY2VzcyA9IChsaXN0T2ZDYXRlZ29yaWVzLCBlbmhhbmNlVGFnLCBkb2N1bWVudCwgcmVzcG9uc2UpID0+IHsKICAgIGxpc3RPZkNhdGVnb3JpZXMuZm9yRWFjaCgoY2hlY2spID0+IHsKICAgICAgICBpZiAocmVzcG9uc2UuaW5jbHVkZXMoY2hlY2spKSB7CiAgICAgICAgICAgIGxldCBlbGVtZW50cyA9IGRvY3VtZW50LmdldEVsZW1lbnRzQnlDbGFzc05hbWUoY2hlY2spOwogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGVsZW1lbnRzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICBlbGVtZW50c1tpXS5jbGFzc0xpc3QuYWRkKGVuaGFuY2VUYWcpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChkb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZSgiaGVhZCIpLmxlbmd0aCA+IDApIHsKICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCJoZWFkIilbMF0ucmVtb3ZlKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCJib2R5IikubGVuZ3RoID4gMCkgewogICAgICAgICAgICAgICAgcmVzcG9uc2UgPSBkb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZSgiYm9keSIpWzBdLmlubmVySFRNTDsKICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCJSZXNwb25zZTogIiArIHJlc3BvbnNlKTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCJSZXNwb25zZTogIiArIGRvY3VtZW50LmRvY3VtZW50RWxlbWVudC5pbm5lckhUTUwpOwogICAgICAgICAgICAgICAgcmVzcG9uc2UgPSBkb2N1bWVudC5kb2N1bWVudEVsZW1lbnQuaW5uZXJIVE1MOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfSk7CgogICAgaWYgKHJlc3BvbnNlID09IG51bGwgfHwgcmVzcG9uc2UgPT0gIiIpIHsKICAgICAgICB0aHJvdyBuZXcgRXJyb3IoCiAgICAgICAgICAgICJBbm5vdGF0aW9uIHByb2NjZXNzIGZhaWxlZDogUmV0dXJuZWQgZW1wdHkgb3IgbnVsbCByZXNwb25zZSIKICAgICAgICApOwogICAgICAgIC8vcmV0dXJuIGh0bWxEYXRhCiAgICB9IGVsc2UgewogICAgICAgIGNvbnNvbGUubG9nKCJSZXNwb25zZTogIiArIHJlc3BvbnNlKTsKICAgICAgICByZXR1cm4gcmVzcG9uc2U7CiAgICB9Cn0KCmxldCBhbm5vdGF0ZUhUTUxzZWN0aW9uID0gYXN5bmMgKGxpc3RPZkNhdGVnb3JpZXMsIGVuaGFuY2VUYWcpID0+IHsKICAgIGxldCByZXNwb25zZSA9IGh0bWxEYXRhOwogICAgbGV0IGRvY3VtZW50OwoKICAgIGlmICh0eXBlb2Ygd2luZG93ID09PSAidW5kZWZpbmVkIikgewogICAgICAgIGxldCBqc2Rv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ICAgICAgICAgICAgICAgICAgICAgIGVsZW1lbnQuZXh0ZW5zaW9uWzFdLnZhbHVlQ29kZWFibGVSZWZlcmVuY2UuY29uY2VwdC5jb2RpbmcuZm9yRWFjaCgKICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjb2RpbmcpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygiRXh0ZW5zaW9uOiAiICsgZWxlbWVudC5leHRlbnNpb25bMF0udmFsdWVTdHJpbmcgKyAiOiIgKyBjb2RpbmcuY29kZSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBDaGVjayBpZiB0aGUgY29kZSBpcyBpbiB0aGUgbGlzdCBvZiBjYXRlZ29yaWVzIHRvIHNlYXJjaAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsaXN0T2ZDYXRlZ29yaWVzVG9TZWFyY2guaW5jbHVkZXMoY29kaW5nLmNvZGUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIENoZWNrIGlmIHRoZSBjYXRlZ29yeSBpcyBhbHJlYWR5IGluIHRoZSBsaXN0IG9mIGNhdGVnb3JpZXMKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZWdvcmllcy5wdXNoKGVsZW1lbnQuZXh0ZW5zaW9uWzBdLnZhbHVlU3RyaW5nKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICB9KTsKCiAgICBpZiAoY29tcG9zaXRpb25zID09IDApIHsKICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0JhZCBlUEk6IG5vIGNhdGVnb3J5ICJDb21wb3NpdGlvbiIgZm91bmQnKTsKICAgIH0KCiAgICBpZiAoY2F0ZWdvcmllcy5sZW5ndGggPT0gMCkgewogICAgICAgIC8vIHRocm93IG5ldyBFcnJvcigiTm8gY2F0ZWdvcmllcyBmb3VuZCIsIGNhdGVnb3JpZXMpOwogICAgICAgIHJldHVybiBodG1sRGF0YTsKICAgIH0KICAgIC8vRm9jdXMgKGFkZHMgaGlnaGxpZ2h0IGNsYXNzKSB0aGUgaHRtbCBhcHBseWluZyBldmVyeSBjYXRlZ29yeSBmb3VuZAogICAgcmV0dXJuIGF3YWl0IGFubm90YXRlSFRNTHNlY3Rpb24oY2F0ZWdvcmllcywgImhpZ2hsaWdodCIpOwp9OwoKcmV0dXJuIHsKICAgIGVuaGFuY2U6IGVuaGFuY2UsCiAgICBnZXRTcGVjaWZpY2F0aW9uOiBnZXRTcGVjaWZpY2F0aW9uLAp9Owo="
- }]
- }
\ No newline at end of file
diff --git a/target/fhir-lens-pregnancy.json b/target/fhir-lens-pregnancy.json
deleted file mode 100644
index 07eeebf..0000000
--- a/target/fhir-lens-pregnancy.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "resourceType" : "Library",
- "id" : "fhir-lens-pregnancy",
- "meta" : {
- "profile" : ["http://hl7.eu/fhir/ig/gravitate-health/StructureDefinition/lens"]
- },
- "text" : {
- "status" : "generated",
- "div" : "Parameters
| in | | | CodeableConcept | parameter documentation |
Contents
application/javascript
Classic Pregnancy Lens
"
- },
- "extension" : [{
- "url" : "http://hl7.eu/fhir/ig/gravitate-health/StructureDefinition/lee-version",
- "valueString" : "0.1"
- }],
- "url" : "http://hl7.eu/fhir/ig/gravitate-health/Library/mock-lib",
- "identifier" : [{
- "system" : "http://gravitate-health.lst.tfo.upm.es",
- "value" : "fhir-lens-pregnancy"
- }],
- "version" : "0.1.0",
- "name" : "fhir-lens-pregnancy",
- "title" : "Pregnancy Lens - Now in FHIR format and with metadata",
- "status" : "draft",
- "experimental" : true,
- "type" : {
- "coding" : [{
- "code" : "logical-library"
- }]
- },
- "date" : "2024-02-29T10:54:27+00:00",
- "publisher" : "Gravitate Health Project - UPM Team",
- "contact" : [{
- "name" : "Gravitate Health Project",
- "telecom" : [{
- "system" : "url",
- "value" : "https://www.gravitatehealth.eu/"
- }]
- },
- {
- "name" : "Gravitate Health Project",
- "telecom" : [{
- "system" : "url",
- "value" : "https://www.gravitatehealth.eu/"
- }]
- }],
- "description" : "if a person is female and between 18 and 70 years, information about pregnancy is going to be highlighted. if a person is a man, the information is collapsed",
- "jurisdiction" : [{
- "coding" : [{
- "system" : "urn:iso:std:iso:3166",
- "code" : "AD"
- }]
- }],
- "purpose" : "The Pregnancy Lens is a lens that highlights information about pregnancy in the ePIs. It is intended to be used by patients to identify relevant information about pregnancy in the leaflets.",
- "usage" : "Just apply it on the app",
- "copyright" : "copyright label",
- "parameter" : [{
- "use" : "in",
- "documentation" : "parameter documentation",
- "type" : "CodeableConcept"
- }],
- "content" : [{
- "contentType" : "application/javascript",
- "data" : "bGV0IHB2RGF0YSA9IHB2OwpsZXQgaHRtbERhdGEgPSBodG1sOwoKbGV0IGVwaURhdGEgPSBlcGk7CmxldCBpcHNEYXRhID0gaXBzOwoKbGV0IGdldFNwZWNpZmljYXRpb24gPSAoKSA9PiB7CiAgICByZXR1cm4gIjEuMC4wIjsKfTsKCmxldCBhbm5vdGF0aW9uUHJvY2VzcyA9IChsaXN0T2ZDYXRlZ29yaWVzLCBlbmhhbmNlVGFnLCBkb2N1bWVudCwgcmVzcG9uc2UpID0+IHsKICAgIGxpc3RPZkNhdGVnb3JpZXMuZm9yRWFjaCgoY2hlY2spID0+IHsKICAgICAgICBpZiAocmVzcG9uc2UuaW5jbHVkZXMoY2hlY2spKSB7CiAgICAgICAgICAgIGNvbnNvbGUubG9nKCJEZWJlcsOtYSB0ZW5lciBlbCBjaGVjazogIiArIGNoZWNrKTsKICAgICAgICAgICAgbGV0IGVsZW1lbnRzID0gZG9jdW1lbnQuZ2V0RWxlbWVudHNCeUNsYXNzTmFtZShjaGVjayk7CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZWxlbWVudHMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIGVsZW1lbnRzW2ldLmNsYXNzTGlzdC5hZGQoZW5oYW5jZVRhZyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCJoZWFkIikubGVuZ3RoID4gMCkgewogICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudHNCeVRhZ05hbWUoImhlYWQiKVswXS5yZW1vdmUoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoZG9jdW1lbnQuZ2V0RWxlbWVudHNCeVRhZ05hbWUoImJvZHkiKS5sZW5ndGggPiAwKSB7CiAgICAgICAgICAgICAgICByZXNwb25zZSA9IGRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCJib2R5IilbMF0uaW5uZXJIVE1MOwogICAgICAgICAgICAgICAgY29uc29sZS5sb2coIlJlc3BvbnNlOiAiICsgcmVzcG9uc2UpOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgY29uc29sZS5sb2coIlJlc3BvbnNlOiAiICsgZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50LmlubmVySFRNTCk7CiAgICAgICAgICAgICAgICByZXNwb25zZSA9IGRvY3VtZW50LmRvY3VtZW50RWxlbWVudC5pbm5lckhUTUw7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9KTsKCiAgICBpZiAocmVzcG9uc2UgPT0gbnVsbCB8fCByZXNwb25zZSA9PSAiIikgewogICAgICAgIHRocm93IG5ldyBFcnJvcigKICAgICAgICAgICAgIkFubm90YXRpb24gcHJvY2Nlc3MgZmFpbGVkOiBSZXR1cm5lZCBlbXB0eSBvciBudWxsIHJlc3BvbnNlIgogICAgICAgICk7CiAgICAgICAgLy9yZXR1cm4gaHRtbERhdGEKICAgIH0gZWxzZSB7CiA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leHRlbnNpb24uZm9yRWFjaCgoZWxlbWVudCkgPT4gewogICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAvLyBDaGVjayBpZiB0aGUgcG9zaXRpb24gb2YgdGhlIGV4dGVuc2lvblsxXSBpcyBjb3JyZWN0CiAgICAgICAgICAgICAgICBpZiAoZWxlbWVudC5leHRlbnNpb25bMV0udXJsID09ICJjb25jZXB0IikgewogICAgICAgICAgICAgICAgICAgIC8vIFNlYXJjaCB0aHJvdWdoIHRoZSBkaWZmZXJlbnQgdGVybWlub2xvZ2llcyB0aGF0IG1heSBiZSBhdmFpYmxlIHRvIGNoZWNrIGluIHRoZSBjb25kaXRpb24KICAgICAgICAgICAgICAgICAgICBpZiAoZWxlbWVudC5leHRlbnNpb25bMV0udmFsdWVDb2RlYWJsZVJlZmVyZW5jZS5jb25jZXB0ICE9IHVuZGVmaW5lZCkgewogICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50LmV4dGVuc2lvblsxXS52YWx1ZUNvZGVhYmxlUmVmZXJlbmNlLmNvbmNlcHQuY29kaW5nLmZvckVhY2goCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY29kaW5nKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coIkV4dGVuc2lvbjogIiArIGVsZW1lbnQuZXh0ZW5zaW9uWzBdLnZhbHVlU3RyaW5nICsgIjoiICsgY29kaW5nLmNvZGUpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ2hlY2sgaWYgdGhlIGNvZGUgaXMgaW4gdGhlIGxpc3Qgb2YgY2F0ZWdvcmllcyB0byBzZWFyY2gKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobGlzdE9mQ2F0ZWdvcmllc1RvU2VhcmNoLmluY2x1ZGVzKGNvZGluZy5jb2RlKSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBDaGVjayBpZiB0aGUgY2F0ZWdvcnkgaXMgYWxyZWFkeSBpbiB0aGUgbGlzdCBvZiBjYXRlZ29yaWVzCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVnb3JpZXMucHVzaChlbGVtZW50LmV4dGVuc2lvblswXS52YWx1ZVN0cmluZyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICApOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgfSk7CgogICAgaWYgKGNvbXBvc2l0aW9ucyA9PSAwKSB7CiAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdCYWQgZVBJOiBubyBjYXRlZ29yeSAiQ29tcG9zaXRpb24iIGZvdW5kJyk7CiAgICB9CgogICAgaWYgKGNhdGVnb3JpZXMubGVuZ3RoID09IDApIHsKICAgICAgICAvLyB0aHJvdyBuZXcgRXJyb3IoIk5vIGNhdGVnb3JpZXMgZm91bmQiLCBjYXRlZ29yaWVzKTsKICAgICAgICByZXR1cm4gaHRtbERhdGE7CiAgICB9CiAgICAvL0ZvY3VzIChhZGRzIGhpZ2hsaWdodCBjbGFzcykgdGhlIGh0bWwgYXBwbHlpbmcgZXZlcnkgY2F0ZWdvcnkgZm91bmQKICAgIHJldHVybiBhd2FpdCBhbm5vdGF0ZUhUTUxzZWN0aW9uKGNhdGVnb3JpZXMsICJoaWdobGlnaHQiKTsKfTsKCnJldHVybiB7CiAgICBlbmhhbmNlOiBlbmhhbmNlLAogICAgZ2V0U3BlY2lmaWNhdGlvbjogZ2V0U3BlY2lmaWNhdGlvbiwKfTs="
- }]
- }
\ No newline at end of file
diff --git a/target/fhir-lens-proxy-pregnancy.json b/target/fhir-lens-proxy-pregnancy.json
deleted file mode 100644
index 9c961c7..0000000
--- a/target/fhir-lens-proxy-pregnancy.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "resourceType" : "Library",
- "id" : "fhir-lens-proxy-pregnancy",
- "meta" : {
- "profile" : ["http://hl7.eu/fhir/ig/gravitate-health/StructureDefinition/lens"]
- },
- "text" : {
- "status" : "generated",
- "div" : "Parameters
| in | | | CodeableConcept | parameter documentation |
Contents
application/javascript
Classic Pregnancy Lens
"
- },
- "extension" : [{
- "url" : "http://hl7.eu/fhir/ig/gravitate-health/StructureDefinition/lee-version",
- "valueString" : "0.1"
- }],
- "url" : "http://hl7.eu/fhir/ig/gravitate-health/Library/mock-lib",
- "identifier" : [{
- "system" : "http://gravitate-health.lst.tfo.upm.es",
- "value" : "fhir-lens-proxy-pregnancy"
- }],
- "version" : "0.1.0",
- "name" : "fhir-lens-proxy-pregnancy",
- "title" : "Proxy Pregnancy Lens - Now in FHIR format and with metadata",
- "status" : "draft",
- "experimental" : true,
- "type" : {
- "coding" : [{
- "code" : "logical-library"
- }]
- },
- "date" : "2024-02-29T10:54:27+00:00",
- "publisher" : "Gravitate Health Project - UPM Team",
- "contact" : [{
- "name" : "Gravitate Health Project",
- "telecom" : [{
- "system" : "url",
- "value" : "https://www.gravitatehealth.eu/"
- }]
- },
- {
- "name" : "Gravitate Health Project",
- "telecom" : [{
- "system" : "url",
- "value" : "https://www.gravitatehealth.eu/"
- }]
- }],
- "description" : "Original Lens made on Python. This lens connect with a service that executes the core computiong of the lens. If a person is female and between 18 and 70 years, information about pregnancy is going to be highlighted. if a person is a man, the information is collapsed",
- "jurisdiction" : [{
- "coding" : [{
- "system" : "urn:iso:std:iso:3166",
- "code" : "AD"
- }]
- }],
- "purpose" : "The Pregnancy Lens is a lens that highlights information about pregnancy in the ePIs. It is intended to be used by patients to identify relevant information about pregnancy in the leaflets.",
- "usage" : "Deploy the external service. Just apply it on the app",
- "copyright" : "copyright label",
- "parameter" : [{
- "use" : "in",
- "documentation" : "parameter documentation",
- "type" : "CodeableConcept"
- }],
- "content" : [{
- "contentType" : "application/javascript",
- "data" : "bGV0IHB2RGF0YSA9IHB2OwpsZXQgaHRtbERhdGEgPSBodG1sOwoKbGV0IGVwaURhdGEgPSBlcGk7CmxldCBpcHNEYXRhID0gaXBzOwoKbGV0IGdldFNwZWNpZmljYXRpb24gPSAoKSA9PiB7CiAgICByZXR1cm4gIjEuMC4wIjsKfTsKCmxldCBlbmhhbmNlID0gYXN5bmMgKCkgPT4gewogICAgCiAgICBjb25zdCBob3N0ID0gcHJvY2Vzcy5lbnYuUFJPWFlfTEVOU19FTlYgPT0gImRldiIgPyAiaHR0cHM6Ly9ncmF2aXRhdGUtaGVhbHRoLmxzdC50Zm8udXBtLmVzIiA6ICJodHRwczovL2dyYXZpdGF0ZS1oZWFsdGgubHN0LnRmby51cG0uZXMiIC8vImh0dHBzOi8vZm9zcHMuZ3Jhdml0YXRlaGVhbHRoLmV1LyI7CiAgICBjb25zdCB1cmwgPSBgJHtob3N0fS9leHRlcm5hbC9wcmVnbmFuY3lgCiAgICBjb25zdCBvcHRpb25zID0gewogICAgICAgIG1ldGhvZDogIlBPU1QiLAogICAgICAgIGhlYWRlcnM6IHsKICAgICAgICAgICAgIkNvbnRlbnQtVHlwZSI6ICJhcHBsaWNhdGlvbi9qc29uIiwKICAgICAgICAgICAgIkFjY2VwdCI6ICJhcHBsaWNhdGlvbi9qc29uIgogICAgICAgIH0sCiAgICAgICAgYm9keTogSlNPTi5zdHJpbmdpZnkoewogICAgICAgICAgICBwdkRhdGE6IHB2LAogICAgICAgICAgICBodG1sRGF0YTogaHRtbCwKICAgICAgICAgICAgZXBpRGF0YTogSlNPTi5zdHJpbmdpZnkoZXBpKSwKICAgICAgICAgICAgaXBzRGF0YTogSlNPTi5zdHJpbmdpZnkoaXBzKQogICAgICAgIH0pCiAgICB9OwoKICAgIGxldCByZXNwb25zZSA9IGF3YWl0IGZldGNoKHVybCwgb3B0aW9ucykKICAgIC50aGVuKChyZXNwb25zZSkgPT4gewogICAgICAgIHJldHVybiByZXNwb25zZS5qc29uKCk7CiAgICB9KS5jYXRjaCgoZXJyb3IpID0+IHsKICAgICAgICB0aHJvdyBuZXcgRXJyb3IoZXJyb3IpOwogICAgfSk7CgogICAgcmV0dXJuIHJlc3BvbnNlLmh0bWxTdHJpbmc7Cn07CgpyZXR1cm4gewogICAgZW5oYW5jZTogZW5oYW5jZSwKICAgIGdldFNwZWNpZmljYXRpb246IGdldFNwZWNpZmljYXRpb24sCn07"
- }]
- }
\ No newline at end of file