{"_id":"@amida-tech/blue-button-model","_rev":"3-28e0875a81ecf96eef50b4da752b3127","name":"@amida-tech/blue-button-model","dist-tags":{"latest":"1.10.5"},"versions":{"1.10.2":{"name":"@amida-tech/blue-button-model","version":"1.10.2","description":"Blue Button Model Validation","main":"index.js","directories":{"lib":"lib"},"scripts":{"test":"grunt"},"author":{"name":"Dmitry Kachaev","email":"dmitry@amida-tech.com"},"contributors":[{"name":"Matthew McCall","email":"matt@amida-tech.com"},{"name":"Afsin Ustundag","email":"afsin.ustundag@us.pwc.com"},{"name":"Jacob Sachs","email":"jacob@amida-tech.com"},{"name":"Matt Martz","email":"matt.martz@amida-tech.com"},{"name":"Christopher Best","email":"bestchris@gmail.com"},{"name":"Marc Sylvestre","email":"marc.sylvestre@manhydra.com"}],"license":"Apache-2.0","engines":{"node":">= 14.19.1"},"dependencies":{"lodash":"^4.17.21","z-schema":"^5.0.3"},"devDependencies":{"grunt":"^1.5.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-jshint":"^3.2.0","grunt-contrib-watch":"^1.1.0","grunt-jsbeautifier":"^0.2.13","grunt-run":"^0.8.1","jest":"^27.5.1"},"repository":{"type":"git","url":"git+https://github.com/amida-tech/blue-button-model.git"},"keywords":["bluebutton","blue-button","model"],"bugs":{"url":"https://github.com/amida-tech/blue-button-model/issues"},"homepage":"https://github.com/amida-tech/blue-button-model","gitHead":"f446e5811df77b4f9608094be10635fd383dfc03","_id":"@amida-tech/blue-button-model@1.10.2","_nodeVersion":"16.14.2","_npmVersion":"8.6.0","dist":{"integrity":"sha512-BpVTOOrkPpSdifB9qgBDhuLq56WRRSTDrbI9d3aTIVIMLJ2FiqUPnxOKgMd3JhGG9AQrigte/4O7F9IPSOHnVA==","shasum":"4847ca74530a1213d2470ca8244ed85ec7055335","tarball":"https://registry.npmjs.org/@amida-tech/blue-button-model/-/blue-button-model-1.10.2.tgz","fileCount":136,"unpackedSize":436764,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDeFG4ieRrGs4+zPwaBew06cYP91r9XwsCOxtbPAYZ+lwIhAMHz2TkfkclgcVPPZXDQ3pVETcr0iqXC+pUZjA2DmTrY"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiYuwyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpcXhAAlIXqDhxt36yZVw56mIFwWIWLnM2t4M0QqeZld+b9w0qlhf4Z\r\noAaIHXpbpxGhx8VQNtoMlvZH0BRYqX02hkCZsWEBFTnCGlbm+TTSGqC8MrgQ\r\nnjYwfpo2mr2Bg68umh5NOQASaH99TVt1CtSOcxRCOsFTplodzfEll1KFzOK8\r\nKT06c0i70M6wOLt+nIb8D+a9vY/fAOM6FFU6S02DF84ehlR20jbaFHpPUk47\r\nm37RhSgMz+nFWZOe6bdhcJbx2JvPuIHwz9GEqCMbjqbtsCbicarClQYksncZ\r\nJnSVgxx85yoWjJtsheoU8DORuOBGxmr1y4T4cEXrBFk+cpj1uz8ek8554gMF\r\nQF2VjfzXlpQWsgQF+lZcxlKjInXhtY01zcT3P+WJDRQVtfePQ6VPXZEHhJ9g\r\nn5xDQ3/aRO8xw9s32DAQHUuvc0Q6bEBzl6HiAHDSRMLdZQ8NzCAVKSUXbFbN\r\nMBUcxjLcwDIKmEH52pKd4hi+FGzXeYsrnz+8nMOamrqJlEG9kLSxg/lRlefr\r\nBMxZ6SFoGAWOKmEqzuIknOsg+0gxCyc5fuPdaV16XFAwmExurAme4mwzziju\r\nUmUYF0z9oHz2ElmqHjGMNyFtQuoB0/jw17qWOX3UYxRCyT+qgznwW6XqFqpM\r\nLukH9MxI+w4T/5fjzqzsDoIPh4r9f0+I/uc=\r\n=hv6X\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"manhydra","email":"marc.sylvestre@manhydra.com"},"maintainers":[{"name":"manhydra","email":"marc.sylvestre@manhydra.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/blue-button-model_1.10.2_1650650162532_0.8313804505296625"},"_hasShrinkwrap":false},"1.10.3":{"name":"@amida-tech/blue-button-model","version":"1.10.3","description":"Blue Button Model Validation","main":"index.js","directories":{"lib":"lib"},"scripts":{"test":"grunt"},"author":{"name":"Dmitry Kachaev","email":"dmitry@amida-tech.com"},"contributors":[{"name":"Matthew McCall","email":"matt@amida-tech.com"},{"name":"Afsin Ustundag","email":"afsin.ustundag@us.pwc.com"},{"name":"Jacob Sachs","email":"jacob@amida-tech.com"},{"name":"Matt Martz","email":"matt.martz@amida-tech.com"},{"name":"Christopher Best","email":"bestchris@gmail.com"},{"name":"Marc Sylvestre","email":"marc.sylvestre@manhydra.com"}],"license":"Apache-2.0","engines":{"node":">= 14.19.3"},"dependencies":{"lodash":"^4.17.21","z-schema":"^5.0.3"},"devDependencies":{"grunt":"^1.5.3","grunt-contrib-connect":"^3.0.0","grunt-contrib-jshint":"^3.2.0","grunt-contrib-watch":"^1.1.0","grunt-jsbeautifier":"^0.2.13","grunt-run":"^0.8.1","jest":"^27.5.1"},"repository":{"type":"git","url":"git+https://github.com/amida-tech/blue-button-model.git"},"keywords":["bluebutton","blue-button","model"],"bugs":{"url":"https://github.com/amida-tech/blue-button-model/issues"},"homepage":"https://github.com/amida-tech/blue-button-model","gitHead":"e6806945949f3ec7f70f867e92ed2a43376153f3","_id":"@amida-tech/blue-button-model@1.10.3","_nodeVersion":"16.14.2","_npmVersion":"8.10.0","dist":{"integrity":"sha512-K0sv0EmVS2Ffy2sQcCYupW7Knuv8P2zx5nuMUTiMMXDpv5o1UNzGGwW+U4jXEeO/r2jiHb32qxFOQe4w/zKpAw==","shasum":"c44fac624e84606c3b8629cf4a05a633ff02f962","tarball":"https://registry.npmjs.org/@amida-tech/blue-button-model/-/blue-button-model-1.10.3.tgz","fileCount":136,"unpackedSize":436923,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIERrZfgVmLuZ3+51upwkq7EMQQVm4cmvXcXD3RhibAyVAiA3ua0X+4XRW5ifkv0l2Z3qtxGxw+6Rp9W+s2s5wjdfxg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJilolRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmof8A//XEmyCA20z3EbbA+241gVQxc2rSJunDnccs0JrZAuTQBPAun0\r\n12/PPZ7o4JJN1JbPaRe68k+2AwRJRqQnuoqaxQXjFCNcviDYH0p+SR9vn6NQ\r\nNI1x276CBBmIEVYvMlaLAoPTLC4bkViHEL4669whNNYXDzmJHmijWNeYmFqM\r\nx4c0SUlsm3Of1nbQqCtO12tYbShInq3sHi4UQ3IDPb7xlo2b5BY/3QM1g5ir\r\nMfKOFkxMk5ktflrJk24OkLrxCy2U7c4HqMYU3xzsVjcsYnj93tUi+3cDR0TE\r\nCS61WDMzbSKZl3s2yR2uKI6MEk9jDctC8CTUnuzS5bMi7lasbR/dum0L7JMN\r\nFxUzEhMZdQYYEO28Ak5Q9sf11dy2XLqis3Kg122v/ebNz6u0Af0Td/uCHFRp\r\ni3OBofBP293MFxsoz3i6eQ50q8ifQ4aXv/LrLOfUArGYoWG69SHgnrlaIvTt\r\nFkmiEzkx3LWB0twM1ZkiCcXs2hNAbMVD82v+aX0aq5OLMgqo2GNoN1vALHib\r\nTSezYaMQFoNv4WcP6JsJl4820LOHrgpJsCXlWVmh1KL1vleJAjHGi0uPUsb3\r\nZTJh2Pxl25N5bj92r8Jj+fgozdYI5REhU7Nf6H00apbt7nbpeVk0fvbk3ufM\r\nTCp9gxZI2IItXIcNKLrnfaU9z7vjeXh+Drw=\r\n=jljH\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"manhydra","email":"marc.sylvestre@manhydra.com"},"maintainers":[{"name":"manhydra","email":"marc.sylvestre@manhydra.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/blue-button-model_1.10.3_1654032720963_0.6512812074542094"},"_hasShrinkwrap":false},"1.10.4":{"name":"@amida-tech/blue-button-model","version":"1.10.4","description":"Blue Button Model Validation","main":"index.js","directories":{"lib":"lib"},"scripts":{"test":"grunt"},"author":{"name":"Dmitry Kachaev","email":"dmitry@amida-tech.com"},"contributors":[{"name":"Matthew McCall","email":"matt@amida-tech.com"},{"name":"Afsin Ustundag","email":"afsin.ustundag@us.pwc.com"},{"name":"Jacob Sachs","email":"jacob@amida-tech.com"},{"name":"Matt Martz","email":"matt.martz@amida-tech.com"},{"name":"Christopher Best","email":"bestchris@gmail.com"},{"name":"Marc Sylvestre","email":"marc.sylvestre@manhydra.com"}],"license":"Apache-2.0","engines":{"node":">= 14.19.3"},"dependencies":{"lodash":"^4.17.21","z-schema":"^5.0.5"},"devDependencies":{"grunt":"^1.5.3","grunt-contrib-connect":"^3.0.0","grunt-contrib-jshint":"^3.2.0","grunt-contrib-watch":"^1.1.0","grunt-jsbeautifier":"^0.2.13","grunt-run":"^0.8.1","jest":"^29.3.1"},"repository":{"type":"git","url":"git+https://github.com/amida-tech/blue-button-model.git"},"keywords":["bluebutton","blue-button","model"],"bugs":{"url":"https://github.com/amida-tech/blue-button-model/issues"},"homepage":"https://github.com/amida-tech/blue-button-model","gitHead":"8d2dfb882df01ffba157d6bfb258dc58a71d2240","_id":"@amida-tech/blue-button-model@1.10.4","_nodeVersion":"16.18.1","_npmVersion":"9.1.2","dist":{"integrity":"sha512-Jw40Fdo6j8/iAu9oqwP8eqMvXXc5qP/Ma/027jVqOzu7qSYAv+vnvtsxXG0gwR75a9EomHzZq2LLfN3WF+Y8cw==","shasum":"c2b7b78046451cec14c7b346c5937999e4103ae3","tarball":"https://registry.npmjs.org/@amida-tech/blue-button-model/-/blue-button-model-1.10.4.tgz","fileCount":136,"unpackedSize":436923,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAMw9v9YCbkYaOhauqmIEygnVw/pxKtVuKh2+Z6V1FuLAiEA2jc2l0UzkjSH7d6B2CEzKgHkUiC4ROpQ8EsYEPViiq0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjtu0UACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrDCA//f2UZ2z2hI8kUi+SLu9+N8WV56NbUbcy7K3JwKfPjB6UH/v+5\r\nYfjLNjW8iKDWij6jO4zf4zlxMiqY8bfwfgsIiqbveQQQCXLQgwEVgqhp/7cY\r\nqeB2fabyZnufPqlrGTFYrDmu+nI+ezrt0hLfuePOEE32Opp0vhpQr0ye0P9j\r\nZy5XoAbXfzDpvtUpa6sQq0vYnBSGQ8SeWQ2yf2uWwNJm4+bG8XZWwmRIFl/s\r\nwZyGzZs9LKnqKW4youlgGdcTrPVflU6o6oadN1+lZNTYNMaJM2ad8Td2rlgt\r\nUe72V/e57wyvlnP5RIQshdILY9qUwE8bnebWKW2VnaguIQAPLb4qdAC6EhVE\r\natpFJAx8u7c/hV9JHA/RS+K9qxGBuqjU6pkuSUVGXfA37daHPn0blWgO/qcv\r\ncRwiRxm1JY53ethr8VbpCZ7z897JbTlf0ml4YzWarnP1tkGhz+hp8vHXazef\r\nSyEWJFegdY55ft2I7Huyzb7gUxmjmwDv0pIG0QSQqneaI8z0wRHTFafbvXpY\r\nqdP/H/t73S9sOUTW/PwIMVz9sOZyrnUebQZcBLTx6MCW0nrcgzF/KGMe0qHM\r\n9s4s+kpdSO9S7sZRWmXseft31c1mRSLbzpSxF7rqh9XF+/9q6kebkYkPIJys\r\n9Kuxozg+OQGbyTwJ8dj6ayJUzAlPY5rlUVA=\r\n=bk4j\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"manhydra","email":"marc.sylvestre@manhydra.com"},"maintainers":[{"name":"manhydra","email":"marc.sylvestre@manhydra.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/blue-button-model_1.10.4_1672932628053_0.8296779061171975"},"_hasShrinkwrap":false},"1.10.5":{"name":"@amida-tech/blue-button-model","version":"1.10.5","description":"Blue Button Model Validation","main":"index.js","directories":{"lib":"lib"},"scripts":{"test":"grunt"},"author":{"name":"Dmitry Kachaev","email":"dmitry@amida-tech.com"},"contributors":[{"name":"Matthew McCall","email":"matt@amida-tech.com"},{"name":"Afsin Ustundag","email":"afsin.ustundag@us.pwc.com"},{"name":"Jacob Sachs","email":"jacob@amida-tech.com"},{"name":"Matt Martz","email":"matt.martz@amida-tech.com"},{"name":"Christopher Best","email":"bestchris@gmail.com"},{"name":"Marc Sylvestre","email":"marc.sylvestre@manhydra.com"}],"license":"Apache-2.0","engines":{"node":">= 18.20.0"},"dependencies":{"lodash":"^4.17.21","z-schema":"^6.0.1"},"devDependencies":{"grunt":"^1.6.1","grunt-contrib-connect":"^4.0.0","grunt-contrib-jshint":"^3.2.0","grunt-contrib-watch":"^1.1.0","grunt-jsbeautifier":"^0.2.13","grunt-run":"^0.8.1","jest":"^29.7.0"},"repository":{"type":"git","url":"git+https://github.com/amida-tech/blue-button-model.git"},"keywords":["bluebutton","blue-button","model"],"bugs":{"url":"https://github.com/amida-tech/blue-button-model/issues"},"homepage":"https://github.com/amida-tech/blue-button-model","_id":"@amida-tech/blue-button-model@1.10.5","gitHead":"b6c4543aaf93699e295f3ca6ad4473466f167ef4","_nodeVersion":"18.19.1","_npmVersion":"10.5.0","dist":{"integrity":"sha512-fDVDHM/TnN2zR9KV1B4pNdJbjpbUExJQ4KC9YwfYECxYv6exbhrCo59b2eXiwPYPgGEya5GSwFUWOI/rWSHiMQ==","shasum":"bafd7c7b505cb08fffa048f451121de2a47deebb","tarball":"https://registry.npmjs.org/@amida-tech/blue-button-model/-/blue-button-model-1.10.5.tgz","fileCount":137,"unpackedSize":437353,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcljl+gu9haL6jXYMTb5OPasiU0F68hAodQ7nJrPVFNAIgeH5ZY3wRbXw0UqcNNAcAopWR/b/ruqzpZ/lV7/uLZo8="}]},"_npmUser":{"name":"manhydra","email":"marc.sylvestre@manhydra.com"},"maintainers":[{"name":"manhydra","email":"marc.sylvestre@manhydra.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/blue-button-model_1.10.5_1712344282681_0.6117245771049657"},"_hasShrinkwrap":false}},"time":{"created":"2022-04-22T17:56:02.440Z","1.10.2":"2022-04-22T17:56:02.755Z","modified":"2024-04-05T19:11:23.088Z","1.10.3":"2022-05-31T21:32:01.158Z","1.10.4":"2023-01-05T15:30:28.209Z","1.10.5":"2024-04-05T19:11:22.878Z"},"maintainers":[{"name":"manhydra","email":"marc.sylvestre@manhydra.com"}],"description":"Blue Button Model Validation","homepage":"https://github.com/amida-tech/blue-button-model","keywords":["bluebutton","blue-button","model"],"repository":{"type":"git","url":"git+https://github.com/amida-tech/blue-button-model.git"},"contributors":[{"name":"Matthew McCall","email":"matt@amida-tech.com"},{"name":"Afsin Ustundag","email":"afsin.ustundag@us.pwc.com"},{"name":"Jacob Sachs","email":"jacob@amida-tech.com"},{"name":"Matt Martz","email":"matt.martz@amida-tech.com"},{"name":"Christopher Best","email":"bestchris@gmail.com"},{"name":"Marc Sylvestre","email":"marc.sylvestre@manhydra.com"}],"author":{"name":"Dmitry Kachaev","email":"dmitry@amida-tech.com"},"bugs":{"url":"https://github.com/amida-tech/blue-button-model/issues"},"license":"Apache-2.0","readme":"Blue Button Model\n=================\n\nBlue Button Model Definition and Validation\n\n[![NPM](https://nodei.co/npm/blue-button-model.png)](https://nodei.co/npm/blue-button-model/)\n\n[![Build Status](https://travis-ci.org/amida-tech/blue-button-model.svg)](https://travis-ci.org/amida-tech/blue-button-model)\n[![Coverage Status](https://coveralls.io/repos/amida-tech/blue-button-model/badge.png)](https://coveralls.io/r/amida-tech/blue-button-model)\n\nThis library defines a JSON Blue Button health data model. All parsers in [blue-button](https://github.com/amida-tech/blue-button) library generate data that follow this model.  The schema can be found [here](http://developers.amida-tech.com/document_model.html) or programmatically [here](#schemaListMethod).  The implementation uses [z-schema](https://github.com/zaggino/z-schema).\n\n## Quick up and running guide\n\n### Prerequisites\n\n- Node.js (v14.19+) and NPM\n- Grunt.js\n\n```\n# Install dependencies\nnpm i\n\n# Install grunt\nnpm i -g grunt\n\n# Test\ngrunt\n\n```\n\n## Usage\n\n``` javascript\nvar fs = require('fs');\nvar bb = require('@amida-tech/blue-button');\nvar bbm = require('@amida-tech/blue-button-model');\n\nvar xmlString = fs.readFileSync('CCD_1.xml', 'utf-8');\nvar record = bb.parseString(xmlString);\n\nvar valid = bbm.validator.validateDocumentModel(record);\nif (!valid) {\n  var error = bbm.validator.getLastError();\n    console.log(error);\n}\n```\n\n## API\n\n### validator.validateDocumentModel(document)\n\nPrimary method to validate Blue Button JSON documents.\n\n__Arguments__\n\n* `document` - JSON health data document.\n* returns - `true` or `false`.\n\n### validator.validate(obj, schemaName)\n\nValidates individual components in Blue Button documents such as sections and entries.\n\n__Arguments__\n\n* `obj` - Component in the JSON health data document.\n* `schemaName` - Type of `obj`.  You can use `id` property of any schema avaiable in the [list](#schemaListMethod).\n* returns - `true` or `false`.\n\n### validator.getLastError()\n\nIf validation fails this method returns the details of the errors.  The error object is actually an array of errors and directly provided by the underlying library [z-schema](https://github.com/zaggino/z-schema).\n\n### schemas.list(expandCommon)\n\nProvides the list of schemas that are used in the model.  The list includes section schemas, entry schemas and common component schemas.  Full document schema is also available with id `document_model`.\n\n__Arguments__\n\n* `expandCommon` - If this is falsy, common component (such as address, time, etc.) schemas are provided in an array.\n* returns - List of schemas.\n\n### schemas.map(expandCommon)\n\nSimilar to [list](#schemaListMethod) but provides a map of schema ids (name) to schemas.  If `expandCommon` is falsy, the array of common component schemas are provided with `common_models` key.\n\n## License\n\nLicensed under [Apache 2.0](./LICENSE).\n","readmeFilename":"README.md"}