From ecaaa6ee8181a25189ba2eb73a358f643dd4d929 Mon Sep 17 00:00:00 2001 From: Francis Li Date: Mon, 14 Jul 2025 18:57:56 -0700 Subject: [PATCH 01/12] Simplify interface screen assocation --- .../20250715014215-fix-interface-screens.js | 45 +++++++++++++++++++ models/interface.js | 1 - models/interfaceScreen.js | 22 --------- models/screen.js | 1 - 4 files changed, 45 insertions(+), 24 deletions(-) create mode 100644 migrations/20250715014215-fix-interface-screens.js delete mode 100644 models/interfaceScreen.js diff --git a/migrations/20250715014215-fix-interface-screens.js b/migrations/20250715014215-fix-interface-screens.js new file mode 100644 index 00000000..ff669fe3 --- /dev/null +++ b/migrations/20250715014215-fix-interface-screens.js @@ -0,0 +1,45 @@ +/** @type {import('sequelize-cli').Migration} */ +module.exports = { + async up(queryInterface, Sequelize) { + await queryInterface.dropTable('interface_screens'); + await queryInterface.addColumn('screens', 'position', { + type: Sequelize.INTEGER, + }); + await queryInterface.sequelize.query('ALTER TABLE "screens" ALTER COLUMN "interface_id" SET NOT NULL;'); + }, + + async down(queryInterface, Sequelize) { + await queryInterface.sequelize.query('ALTER TABLE "screens" ALTER COLUMN "interface_id" DROP NOT NULL;'); + await queryInterface.removeColumn('screens', 'position'); + await queryInterface.createTable('interface_screens', { + id: { + allowNull: false, + defaultValue: Sequelize.literal('gen_random_uuid()'), + primaryKey: true, + type: Sequelize.UUID, + }, + interface_id: { + type: Sequelize.UUID, + references: { + model: { + tableName: 'interfaces', + }, + key: 'id', + }, + }, + screen_id: { + type: Sequelize.UUID, + references: { + model: { + tableName: 'screens', + }, + key: 'id', + }, + }, + position: { + type: Sequelize.UUID, + }, + }); + await queryInterface.addIndex('interface_screens', ['interface_id', 'screen_id'], { unique: true }); + }, +}; diff --git a/models/interface.js b/models/interface.js index 2feeb89f..76557aff 100644 --- a/models/interface.js +++ b/models/interface.js @@ -5,7 +5,6 @@ module.exports = (sequelize, DataTypes) => { static associate(models) { Interface.belongsTo(models.User, { as: 'createdBy' }); Interface.belongsTo(models.User, { as: 'updatedBy' }); - Interface.hasMany(models.InterfaceScreen, { as: 'interfaceScreens' }); Interface.hasMany(models.Screen, { as: 'screens' }); } } diff --git a/models/interfaceScreen.js b/models/interfaceScreen.js deleted file mode 100644 index 4be2d630..00000000 --- a/models/interfaceScreen.js +++ /dev/null @@ -1,22 +0,0 @@ -const { Model } = require('sequelize'); - -module.exports = (sequelize, DataTypes) => { - class InterfaceScreen extends Model { - static associate(models) { - InterfaceScreen.belongsTo(models.Interface, { as: 'interface' }); - InterfaceScreen.belongsTo(models.Screen, { as: 'screen' }); - } - } - InterfaceScreen.init( - { - position: DataTypes.STRING, - }, - { - sequelize, - modelName: 'InterfaceScreen', - tableName: 'interface_screens', - underscored: true, - }, - ); - return InterfaceScreen; -}; diff --git a/models/screen.js b/models/screen.js index c6a2806d..334829bf 100644 --- a/models/screen.js +++ b/models/screen.js @@ -4,7 +4,6 @@ module.exports = (sequelize, DataTypes) => { class Screen extends Model { static associate(models) { Screen.belongsTo(models.Interface, { as: 'interface' }); - Screen.hasOne(models.InterfaceScreen, { as: 'interfaceScreen' }); Screen.belongsTo(models.User, { as: 'createdBy' }); Screen.belongsTo(models.User, { as: 'updatedBy' }); Screen.hasMany(models.Section, { as: 'sections' }); From 138c5a7a66b14e581ce2648aed11606590f73b83 Mon Sep 17 00:00:00 2001 From: Francis Li Date: Sat, 28 Mar 2026 17:40:06 -0700 Subject: [PATCH 02/12] Add name override to section element association record --- .../elements/interface-element-form.component.html | 3 +++ .../admin/src/app/nemsis/list-nemsis.component.html | 5 ++++- .../20260329001859-add-name-to-section-elements.js | 12 ++++++++++++ models/sectionElement.js | 1 + 4 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 migrations/20260329001859-add-name-to-section-elements.js diff --git a/angular/projects/admin/src/app/interfaces/elements/interface-element-form.component.html b/angular/projects/admin/src/app/interfaces/elements/interface-element-form.component.html index f7e446d8..fdb339ff 100644 --- a/angular/projects/admin/src/app/interfaces/elements/interface-element-form.component.html +++ b/angular/projects/admin/src/app/interfaces/elements/interface-element-form.component.html @@ -30,3 +30,6 @@
+
+ +
diff --git a/angular/projects/admin/src/app/nemsis/list-nemsis.component.html b/angular/projects/admin/src/app/nemsis/list-nemsis.component.html index 67517104..dc03de07 100644 --- a/angular/projects/admin/src/app/nemsis/list-nemsis.component.html +++ b/angular/projects/admin/src/app/nemsis/list-nemsis.component.html @@ -14,7 +14,10 @@

National Repository

- {{ version }} + {{ + version + }} + {{ version }} diff --git a/migrations/20260329001859-add-name-to-section-elements.js b/migrations/20260329001859-add-name-to-section-elements.js new file mode 100644 index 00000000..3af2925e --- /dev/null +++ b/migrations/20260329001859-add-name-to-section-elements.js @@ -0,0 +1,12 @@ +/** @type {import('sequelize-cli').Migration} */ +module.exports = { + async up(queryInterface, Sequelize) { + await queryInterface.addColumn('section_elements', 'name', { + type: Sequelize.STRING, + }); + }, + + async down(queryInterface, Sequelize) { + await queryInterface.removeColumn('section_elements', 'name'); + }, +}; diff --git a/models/sectionElement.js b/models/sectionElement.js index 72650fa6..f0167bd6 100644 --- a/models/sectionElement.js +++ b/models/sectionElement.js @@ -15,6 +15,7 @@ module.exports = (sequelize, DataTypes) => { position: DataTypes.INTEGER, column: DataTypes.INTEGER, customId: DataTypes.STRING, + name: DataTypes.STRING, }, { sequelize, From d5febf0081d3ae0ad531f516c53d4dea68673a9e Mon Sep 17 00:00:00 2001 From: Francis Li Date: Sat, 11 Apr 2026 10:28:52 -0700 Subject: [PATCH 03/12] Calculate XSD and XML xpath for each node --- lib/nemsis/emsXsdParser.js | 122 +++++++++++++++++---------- test/unit/lib/nemsis/emsXsdParser.js | 2 + 2 files changed, 81 insertions(+), 43 deletions(-) diff --git a/lib/nemsis/emsXsdParser.js b/lib/nemsis/emsXsdParser.js index ca229f5e..9e5f020d 100644 --- a/lib/nemsis/emsXsdParser.js +++ b/lib/nemsis/emsXsdParser.js @@ -3,85 +3,121 @@ const path = require('path'); const { XmlParser } = require('./xmlParser'); class NemsisEmsXsdParser extends XmlParser { - onStartElement(name, attr) { - if (name === 'xs:include') { + getCurrentXsdPath() { + return `/${this.stack + .map((s) => { + let component = s.element; + if (s.attr.id) { + component += `[@id='${s.attr.id}']`; + } else if (s.attr.name) { + component += `[@name='${s.attr.name}']`; + } + return component; + }) + .join('/')}`; + } + + getCurrentXmlPath() { + return ( + this.xmlXPathPrefix + + this.nodes.map((n) => `${n.name}${n.maxOccurs === null || (Number.isInteger(n.maxOccurs) && n.maxOccurs > 1) ? `[]` : ''}`).join('/') + ); + } + + onStartElement(element, attr) { + this.stack.push({ xsd: this.xsd, element, attr }); + if (element === 'xs:include') { this.includes.push(attr.schemaLocation); - } - if (this.stack.length === 0) { + } else if (this.nodes.length === 0) { // watch for start element - if (attr.name.startsWith(this.startElement.name)) { - this.stack.push(this.startElement); + if (attr.name?.startsWith(this.startingNode.name)) { + this.nodes.push(this.startingNode); + this.stack[this.stack.length - 1].node = this.startingNode; + this.startingNode.xsdPath = this.getCurrentXsdPath(); + this.startingNode.xmlPath = this.getCurrentXmlPath(); } - } else if (name === 'xs:element') { + } else if (element === 'xs:element') { const minOccurs = parseInt(attr.minOccurs ?? '1', 10); const maxOccurs = parseInt(attr.maxOccurs ?? '1', 10); const node = { - name: attr.name, xsd: this.xsd, + name: attr.name, minOccurs, maxOccurs: Number.isNaN(maxOccurs) ? null : maxOccurs, + xsdPath: '', + xmlPath: '', children: [], }; if (attr.nillable) { node.isNillable = attr.nillable === 'true'; } - for (let i = this.stack.length - 1; i >= 0; i -= 1) { - if (this.stack[i].name) { - this.stack[i].children.push(node); + for (let i = this.nodes.length - 1; i >= 0; i -= 1) { + if (this.nodes[i].name) { + this.nodes[i].children?.push(node); break; } } - this.stack.push(node); - } else { - this.stack.push({ attr }); + this.nodes.push(node); + this.stack[this.stack.length - 1].node = node; + node.xsdPath = this.getCurrentXsdPath(); + node.xmlPath = this.getCurrentXmlPath(); } } - onEndElement(name) { - if (this.stack.length > 0) { - const { _text } = this.stack[this.stack.length - 1]; - let element; - for (let i = this.stack.length - 2; i >= 0; i -= 1) { - if (this.stack[i].name) { - element = this.stack[i]; - break; - } - } - if ((name === 'definition' || name === 'xs:documentation') && element && _text) { - element.definition = _text; - } else if (name === 'name' && element && _text) { - element.displayName = _text; - } else if (name === 'national' && element) { - element.isNational = _text === 'Yes'; - } else if (name === 'state' && element) { - element.isState = _text === 'Yes'; - } else if (name === 'usage' && element) { - element.usage = _text; - } - delete this.stack[this.stack.length - 1]._text; - this.stack.pop(); - if (this.stack.length === 0) { - this.resolve(); + onEndElement(element) { + const { _text } = this.stack[this.stack.length - 1]; + let node; + for (let i = this.stack.length - 2; i >= 0; i -= 1) { + if (this.stack[i].node) { + ({ node } = this.stack[i]); + break; } } + if ((element === 'definition' || element === 'xs:documentation') && node && _text) { + node.definition = _text; + } else if (element === 'name' && node && _text) { + node.displayName = _text; + } else if (element === 'national' && node) { + node.isNational = _text === 'Yes'; + } else if (element === 'state' && node) { + node.isState = _text === 'Yes'; + } else if (element === 'usage' && node) { + node.usage = _text; + } + if (this.stack[this.stack.length - 1].node) { + this.nodes.pop(); + } + this.stack.pop(); + if (this.stack.length === 0) { + this.resolve(); + } } async parsePatientCareReport() { this.includes = []; + this.nodes = []; this.xsd = path.basename(this.filePath); - this.result = { xsd: this.xsd, name: 'PatientCareReport', children: [] }; - this.startElement = this.result; + this.result = { + xsd: this.xsd, + name: 'PatientCareReport', + xsdPath: '', + xmlPath: '', + children: [], + }; + this.startingNode = this.result; + this.xmlXPathPrefix = '/'; await this.parse((_, parser) => { parser.on('startElement', (name, attr) => this.onStartElement(name, attr)); parser.on('endElement', (name) => this.onEndElement(name)); }); + this.xmlXPathPrefix = '/PatientCareReport/'; for (const child of this.result.children) { const xsd = this.includes.find((i) => i.startsWith(child.name)); if (xsd) { this.filePath = path.resolve(path.dirname(this.filePath), xsd); this.xsd = xsd; - this.startElement = child; - this.startElement.xsd = xsd; + this.startingNode = child; + this.startingNode.xsd = xsd; // eslint-disable-next-line no-await-in-loop await this.parse((_, parser) => { parser.on('startElement', (name, attr) => this.onStartElement(name, attr)); diff --git a/test/unit/lib/nemsis/emsXsdParser.js b/test/unit/lib/nemsis/emsXsdParser.js index 2629374a..33281279 100644 --- a/test/unit/lib/nemsis/emsXsdParser.js +++ b/test/unit/lib/nemsis/emsXsdParser.js @@ -20,6 +20,8 @@ describe('lib', () => { assert.deepStrictEqual(result.children?.length, 25); assert.deepStrictEqual(result.children[0].name, 'eRecord'); assert.deepStrictEqual(result.children[0].xsd, 'eRecord_v3.xsd'); + assert.deepStrictEqual(result.children[0].xsdPath, "/xs:schema/xs:complexType[@id='eRecord.RecordInformation']"); + assert.deepStrictEqual(result.children[0].xmlPath, '/PatientCareReport/eRecord'); assert.deepStrictEqual(result.children[0].minOccurs, 1); assert.deepStrictEqual(result.children[0].maxOccurs, 1); assert.deepStrictEqual(result.children[0].definition, 'Patient Record Information'); From c848b62d39f6f9f3adee7305b7ef3699f380f8a8 Mon Sep 17 00:00:00 2001 From: Francis Li Date: Sat, 11 Apr 2026 10:48:20 -0700 Subject: [PATCH 04/12] Add xsdPath and xmlPath to NemsisElement --- ...-add-xsd-and-xml-paths-to-nemsis-elements.js | 17 +++++++++++++++++ models/nemsisElement.js | 2 ++ 2 files changed, 19 insertions(+) create mode 100644 migrations/20260411172934-add-xsd-and-xml-paths-to-nemsis-elements.js diff --git a/migrations/20260411172934-add-xsd-and-xml-paths-to-nemsis-elements.js b/migrations/20260411172934-add-xsd-and-xml-paths-to-nemsis-elements.js new file mode 100644 index 00000000..ea238cab --- /dev/null +++ b/migrations/20260411172934-add-xsd-and-xml-paths-to-nemsis-elements.js @@ -0,0 +1,17 @@ +module.exports = { + async up(queryInterface, Sequelize) { + await queryInterface.addColumn('nemsis_elements', 'xsd_path', { + type: Sequelize.TEXT, + allowNull: true, + }); + await queryInterface.addColumn('nemsis_elements', 'xml_path', { + type: Sequelize.TEXT, + allowNull: true, + }); + }, + + async down(queryInterface, Sequelize) { + await queryInterface.removeColumn('nemsis_elements', 'xsd_path'); + await queryInterface.removeColumn('nemsis_elements', 'xml_path'); + }, +}; diff --git a/models/nemsisElement.js b/models/nemsisElement.js index 9ee27574..da77b33e 100644 --- a/models/nemsisElement.js +++ b/models/nemsisElement.js @@ -64,6 +64,8 @@ module.exports = (sequelize, DataTypes) => { nemsisVersion: DataTypes.STRING, dataSet: DataTypes.STRING, xsd: DataTypes.STRING, + xsdPath: DataTypes.TEXT, + xmlPath: DataTypes.TEXT, name: DataTypes.STRING, displayName: DataTypes.STRING, definition: DataTypes.TEXT, From e8cf04e3fbc4bec6a50b8c719424938fc5575128 Mon Sep 17 00:00:00 2001 From: Francis Li Date: Wed, 15 Apr 2026 13:24:51 -0700 Subject: [PATCH 05/12] Add Screen position within Interface editing --- .../interfaces/screens/edit-interface-screen.component.html | 4 ++++ .../interfaces/screens/interface-screen-form.component.html | 3 +++ models/screen.js | 1 + routes/api/screens.js | 4 ++-- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/angular/projects/admin/src/app/interfaces/screens/edit-interface-screen.component.html b/angular/projects/admin/src/app/interfaces/screens/edit-interface-screen.component.html index 4672682e..d58db360 100644 --- a/angular/projects/admin/src/app/interfaces/screens/edit-interface-screen.component.html +++ b/angular/projects/admin/src/app/interfaces/screens/edit-interface-screen.component.html @@ -22,6 +22,10 @@

Edit Screen

{{ record.name }}

+
+ +

{{ record.position }}

+
diff --git a/angular/projects/admin/src/app/interfaces/screens/interface-screen-form.component.html b/angular/projects/admin/src/app/interfaces/screens/interface-screen-form.component.html index 593e4146..014f1d0d 100644 --- a/angular/projects/admin/src/app/interfaces/screens/interface-screen-form.component.html +++ b/angular/projects/admin/src/app/interfaces/screens/interface-screen-form.component.html @@ -1,3 +1,6 @@
+
+ +
diff --git a/models/screen.js b/models/screen.js index 334829bf..689b38cf 100644 --- a/models/screen.js +++ b/models/screen.js @@ -12,6 +12,7 @@ module.exports = (sequelize, DataTypes) => { Screen.init( { name: DataTypes.STRING, + position: DataTypes.INTEGER, }, { sequelize, diff --git a/routes/api/screens.js b/routes/api/screens.js index 5a9568c3..dfa19933 100644 --- a/routes/api/screens.js +++ b/routes/api/screens.js @@ -45,7 +45,7 @@ router.post( '/', interceptors.requireAdmin, helpers.async(async (req, res) => { - const record = models.Screen.build(_.pick(req.body, ['interfaceId', 'name'])); + const record = models.Screen.build(_.pick(req.body, ['interfaceId', 'name', 'position'])); record.createdById = req.user.id; record.updatedById = req.user.id; await record.save(); @@ -61,7 +61,7 @@ router.patch( await models.sequelize.transaction(async (transaction) => { record = await models.Screen.findByPk(req.params.id, { transaction }); if (record) { - record.set(_.pick(req.body, ['name'])); + record.set(_.pick(req.body, ['name', 'position'])); record.updatedById = req.user.id; await record.save({ transaction }); } From c7be1bac1d384ef1fc1753422850c21ac35a7764 Mon Sep 17 00:00:00 2001 From: Francis Li Date: Wed, 15 Apr 2026 13:42:16 -0700 Subject: [PATCH 06/12] Add an Export endpoint for testing/dev for now --- .../interfaces/edit-interface.component.html | 3 ++ models/interface.js | 2 +- models/screen.js | 2 +- models/section.js | 2 +- routes/api/interfaces.js | 42 +++++++++++++++++++ 5 files changed, 48 insertions(+), 3 deletions(-) diff --git a/angular/projects/admin/src/app/interfaces/edit-interface.component.html b/angular/projects/admin/src/app/interfaces/edit-interface.component.html index d94c886a..f54ca7c6 100644 --- a/angular/projects/admin/src/app/interfaces/edit-interface.component.html +++ b/angular/projects/admin/src/app/interfaces/edit-interface.component.html @@ -36,6 +36,9 @@

{{ record.dataSet }}

+ Export
diff --git a/models/interface.js b/models/interface.js index 76557aff..5dc312ae 100644 --- a/models/interface.js +++ b/models/interface.js @@ -5,7 +5,7 @@ module.exports = (sequelize, DataTypes) => { static associate(models) { Interface.belongsTo(models.User, { as: 'createdBy' }); Interface.belongsTo(models.User, { as: 'updatedBy' }); - Interface.hasMany(models.Screen, { as: 'screens' }); + Interface.hasMany(models.Screen, { as: 'screens', foreignKey: 'interfaceId' }); } } Interface.init( diff --git a/models/screen.js b/models/screen.js index 689b38cf..8a0792db 100644 --- a/models/screen.js +++ b/models/screen.js @@ -6,7 +6,7 @@ module.exports = (sequelize, DataTypes) => { Screen.belongsTo(models.Interface, { as: 'interface' }); Screen.belongsTo(models.User, { as: 'createdBy' }); Screen.belongsTo(models.User, { as: 'updatedBy' }); - Screen.hasMany(models.Section, { as: 'sections' }); + Screen.hasMany(models.Section, { as: 'sections', foreignKey: 'screenId' }); } } Screen.init( diff --git a/models/section.js b/models/section.js index cf4b3651..a9814e52 100644 --- a/models/section.js +++ b/models/section.js @@ -6,7 +6,7 @@ module.exports = (sequelize, DataTypes) => { Section.belongsTo(models.Screen, { as: 'screen' }); Section.belongsTo(models.User, { as: 'createdBy' }); Section.belongsTo(models.User, { as: 'updatedBy' }); - Section.hasMany(models.SectionElement, { as: 'elements' }); + Section.hasMany(models.SectionElement, { as: 'elements', foreignKey: 'sectionId' }); } } Section.init( diff --git a/routes/api/interfaces.js b/routes/api/interfaces.js index 2452f786..1af4edd5 100644 --- a/routes/api/interfaces.js +++ b/routes/api/interfaces.js @@ -35,6 +35,48 @@ router.get( }), ); +router.get( + '/:id/export', + interceptors.requireAdmin, + helpers.async(async (req, res) => { + const { id } = req.params; + const record = await models.Interface.findByPk(id, { + include: [ + { + model: models.Screen, + as: 'screens', + order: [['position', 'ASC']], + include: [ + { + model: models.Section, + as: 'sections', + order: [['position', 'ASC']], + include: [ + { + model: models.SectionElement, + as: 'elements', + order: [['position', 'ASC']], + include: [ + { + model: models.NemsisElement, + as: 'nemsisElement', + }, + ], + }, + ], + }, + ], + }, + ], + }); + if (record) { + res.json(record.toJSON()); + } else { + res.status(StatusCodes.NOT_FOUND).end(); + } + }), +); + router.post( '/', interceptors.requireAdmin, From 6554e70371ab407e3bfd0408620e721852bddf5b Mon Sep 17 00:00:00 2001 From: Francis Li Date: Thu, 20 Aug 2026 16:07:51 -0700 Subject: [PATCH 07/12] Don't include trailing [] on group nodes --- lib/nemsis/emsXsdParser.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/nemsis/emsXsdParser.js b/lib/nemsis/emsXsdParser.js index 9e5f020d..9f9664a3 100644 --- a/lib/nemsis/emsXsdParser.js +++ b/lib/nemsis/emsXsdParser.js @@ -18,10 +18,13 @@ class NemsisEmsXsdParser extends XmlParser { } getCurrentXmlPath() { - return ( + let path = this.xmlXPathPrefix + - this.nodes.map((n) => `${n.name}${n.maxOccurs === null || (Number.isInteger(n.maxOccurs) && n.maxOccurs > 1) ? `[]` : ''}`).join('/') - ); + this.nodes.map((n) => `${n.name}${n.maxOccurs === null || (Number.isInteger(n.maxOccurs) && n.maxOccurs > 1) ? `[]` : ''}`).join('/'); + if (path.endsWith('[]')) { + path = path.slice(0, -2); + } + return path; } onStartElement(element, attr) { From 001a8c7bc979faf1ebb4c7f5af5adc99b3dfd044 Mon Sep 17 00:00:00 2001 From: Francis Li Date: Thu, 20 Aug 2026 16:10:44 -0700 Subject: [PATCH 08/12] Fix linter issue --- lib/nemsis/emsXsdParser.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/nemsis/emsXsdParser.js b/lib/nemsis/emsXsdParser.js index 9f9664a3..e98a94de 100644 --- a/lib/nemsis/emsXsdParser.js +++ b/lib/nemsis/emsXsdParser.js @@ -18,13 +18,13 @@ class NemsisEmsXsdParser extends XmlParser { } getCurrentXmlPath() { - let path = + let xmlPath = this.xmlXPathPrefix + this.nodes.map((n) => `${n.name}${n.maxOccurs === null || (Number.isInteger(n.maxOccurs) && n.maxOccurs > 1) ? `[]` : ''}`).join('/'); - if (path.endsWith('[]')) { - path = path.slice(0, -2); + if (xmlPath.endsWith('[]')) { + xmlPath = xmlPath.slice(0, -2); } - return path; + return xmlPath; } onStartElement(element, attr) { From 86c58300adf337b9e97a0cf5a5b0e05b70d07500 Mon Sep 17 00:00:00 2001 From: Francis Li Date: Thu, 20 Aug 2026 16:15:14 -0700 Subject: [PATCH 09/12] Add new section element columns --- ...0820231121-add-columns-to-section-elements.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 migrations/20260820231121-add-columns-to-section-elements.js diff --git a/migrations/20260820231121-add-columns-to-section-elements.js b/migrations/20260820231121-add-columns-to-section-elements.js new file mode 100644 index 00000000..a02487a6 --- /dev/null +++ b/migrations/20260820231121-add-columns-to-section-elements.js @@ -0,0 +1,16 @@ +/** @type {import('sequelize-cli').Migration} */ +module.exports = { + async up(queryInterface, Sequelize) { + await queryInterface.addColumn('section_elements', 'short_name', Sequelize.STRING); + await queryInterface.addColumn('section_elements', 'unit', Sequelize.STRING); + await queryInterface.addColumn('section_elements', 'visible_if', Sequelize.JSONB); + await queryInterface.addColumn('section_elements', 'on_change', Sequelize.JSONB); + }, + + async down(queryInterface, Sequelize) { + await queryInterface.removeColumn('section_elements', 'on_change'); + await queryInterface.removeColumn('section_elements', 'visible_if'); + await queryInterface.removeColumn('section_elements', 'unit'); + await queryInterface.removeColumn('section_elements', 'short_name'); + }, +}; From 05d8df72e011dcb1d7c9b31fdbdf9077552821ee Mon Sep 17 00:00:00 2001 From: Francis Li Date: Mon, 24 Aug 2026 09:58:24 -0700 Subject: [PATCH 10/12] Additional sectionElement model fields --- EMSDataSet.sch | 2380 +++ EMSDataSet.sch.xsl | 15629 ++++++++++++++++ .../edit-interface-element.component.html | 2 +- .../interface-element-form.component.html | 6 + models/sectionElement.js | 4 + routes/api/sectionElements.js | 4 +- 6 files changed, 18022 insertions(+), 3 deletions(-) create mode 100644 EMSDataSet.sch create mode 100644 EMSDataSet.sch.xsl diff --git a/EMSDataSet.sch b/EMSDataSet.sch new file mode 100644 index 00000000..c4510be7 --- /dev/null +++ b/EMSDataSet.sch @@ -0,0 +1,2380 @@ + + + NEMSIS National ISO Schematron file for EMSDataSet + + + + + + + + + + + + + EMS Agency Unique State ID + EMS Agency Number + EMS Agency Name + EMS Agency State + EMS Agency Service Area States + EMS Agency Service Area County(ies) + EMS Agency Census Tracts + EMS Agency Service Area ZIP Codes + Primary Type of Service + Other Types of Service + Level of Service + Organization Status + Organizational Type + EMS Agency Organizational Tax Status + Statistical Calendar Year + Total Primary Service Area Size + Total Service Area Population + 911 EMS Call Center Volume per Year + EMS Dispatch Volume per Year + EMS Patient Transport Volume per Year + EMS Patient Contact Volume per Year + EMS Billable Calls per Year + EMS Agency Time Zone + EMS Agency Daylight Savings Time Use + National Provider Identifier + Fire Department ID Number + State Associated with this Configuration + EMS Certification Levels Permitted to Perform Each Procedure + EMS Agency Procedures + EMS Certification Levels Permitted to Administer Each Medication + EMS Agency Medications + EMS Agency Protocols + EMS Agency Specialty Service Capability + Billing Status + Emergency Medical Dispatch (EMD) Provided to EMS Agency Service Area + EMD Vendor + Patient Monitoring Capability(ies) + Crew Call Sign + Dispatch Center (CAD) Name or ID + Agency Contact Type + Agency Contact Last Name + Agency Contact First Name + Agency Contact Middle Name/Initial + Agency Contact Address + Agency Contact City + Agency Contact State + Agency Contact ZIP Code + Agency Contact Country + Agency Contact Phone Number + Agency Contact Email Address + EMS Agency Contact Web Address + Agency Medical Director Degree + Agency Medical Director Board Certification Type + Medical Director Compensation + EMS Medical Director Fellowship Trained Status + Custom Data Element Title + Custom Definition + Custom Data Type + Custom Data Element Recurrence + Custom Data Element Usage + Custom Data Element Potential Values + Custom Data Element Potential NOT Values (NV) + Custom Data Element Potential Pertinent Negative Values (PN) + Custom Data Element Grouping ID + Custom Data Element Result + Custom Element ID Referenced + CorrelationID of DemographicReport Element or Group + Medical Device Serial Number + Medical Device Name or ID + Medical Device Type + Medical Device Manufacturer + Medical Device Model Number + Medical Device Purchase Date + Type of Facility + Facility Name + Facility Location Code + Hospital Designations + Facility National Provider Identifier + Facility Room, Suite, or Apartment + Facility Street Address + Facility City + Facility State + Facility ZIP Code + Facility County + Facility Country + Facility GPS Location + Facility US National Grid Coordinates + Facility Phone Number + EMS Location Type + EMS Location Name + EMS Location Number + EMS Location GPS + EMS Location US National Grid Coordinates + EMS Location Address + EMS Location City + EMS Location State + EMS Station or Location ZIP Code + EMS Location County + EMS Location Country + EMS Location Phone Number + EMS Personnel's Last Name + EMS Personnel's First Name + EMS Personnel's Middle Name/Initial + EMS Personnel's Mailing Address + EMS Personnel's City of Residence + EMS Personnel's State + EMS Personnel's ZIP Code + EMS Personnel's Country + EMS Personnel's Phone Number + EMS Personnel's Email Address + EMS Personnel's Date of Birth + dPersonnel.12 + EMS Personnel's Race + EMS Personnel's Citizenship + EMS Personnel's Highest Educational Degree + EMS Personnel's Degree Subject/Field of Study + EMS Personnel's Motor Vehicle License Type + EMS Personnel's Immunization Status + EMS Personnel's Immunization Year + EMS Personnel's Foreign Language Ability + EMS Personnel's Agency ID Number + EMS Personnel's State of Licensure + EMS Personnel's State's Licensure ID Number + EMS Personnel's State EMS Certification Licensure Level + EMS Personnel's State EMS Current Certification Date + EMS Personnel's Initial State's Licensure Issue Date + EMS Personnel's Current State's Licensure Expiration Date + EMS Personnel's National Registry Number + EMS Personnel's National Registry Certification Level + EMS Personnel's Current National Registry Expiration Date + EMS Personnel's Employment Status + EMS Personnel's Employment Status Date + EMS Personnel's Hire Date + EMS Personnel's Primary EMS Job Role + EMS Personnel's Other Job Responsibilities + EMS Personnel's Total Length of Service in Years + EMS Personnel's Date Length of Service Documented + EMS Personnel's Practice Level + Date of Personnel's Certification or Licensure for Agency + EMS Personnel's Sex + Unit/Vehicle Number + Vehicle Identification Number + EMS Unit Call Sign + Vehicle Type + Crew State Certification/Licensure Levels + Number of Each EMS Personnel Level on Normal 911 Ambulance Response + Number of Each EMS Personnel Level on Normal 911 Response (Non-Transport) Vehicle + Number of Each EMS Personnel Level on Normal Medical (Non-911) Transport Ambulance + Vehicle Initial Cost + Vehicle Model Year + Year Miles/Kilometers Hours Accrued + Annual Vehicle Hours + Annual Vehicle Miles/Kilometers + Indications for Invasive Airway + Date/Time Airway Device Placement Confirmation + Airway Device Being Confirmed + Airway Device Placement Confirmed Method + Tube Depth + Type of Individual Confirming Airway Device Placement + Crew Member ID + Airway Complications Encountered + Suspected Reasons for Failed Airway Management + Date/Time Decision to Manage the Patient with an Invasive Airway + Date/Time Invasive Airway Placement Attempts Abandoned + Cardiac Arrest + Cardiac Arrest Etiology + Resuscitation Attempted By EMS + Arrest Witnessed By + AED Use Prior to EMS Arrival + Type of CPR Provided + Therapeutic Hypothermia by EMS + First Monitored Arrest Rhythm of the Patient + Any Return of Spontaneous Circulation + Neurological Outcome at Hospital Discharge + Date/Time of Cardiac Arrest + Date/Time Resuscitation Discontinued + Reason CPR/Resuscitation Discontinued + Cardiac Rhythm on Arrival at Destination + End of EMS Cardiac Arrest Event + Date/Time of Initial CPR + Who First Initiated CPR + Who First Applied the AED + Who First Defibrillated the Patient + Crew Member ID + Crew Member Level + Crew Member Response Role + Custom Data Element Title + Custom Definition + Custom Data Type + Custom Data Element Recurrence + Custom Data Element Usage + Custom Data Element Potential Values + Custom Data Element Potential NOT Values (NV) + Custom Data Element Potential Pertinent Negative Values (PN) + Custom Data Element Grouping ID + Custom Data Element Result + Custom Element ID Referenced + CorrelationID of PatientCareReport Element or Group + Medical Device Serial Number + Date/Time of Event (per Medical Device) + Medical Device Event Type + Medical Device Waveform Graphic Type + Medical Device Waveform Graphic + Medical Device Mode (Manual, AED, Pacing, CO2, O2, etc) + Medical Device ECG Lead + Medical Device ECG Interpretation + Type of Shock + Shock or Pacing Energy + Total Number of Shocks Delivered + Pacing Rate + Dispatch Reason + EMD Performed + EMD Card Number + Dispatch Center Name or ID + Dispatch Priority (Patient Acuity) + Unit Dispatched CAD Record ID + Destination/Transferred To, Name + Destination/Transferred To, Code + Destination Street Address + Destination City + Destination State + Destination County + Destination ZIP Code + Destination Country + Destination GPS Location + Destination Location US National Grid Coordinates + Number of Patients Transported in this EMS Unit + How Patient Was Moved to Ambulance + Position of Patient During Transport + How Patient Was Moved From Ambulance + EMS Transport Method + Transport Mode from Scene + Additional Transport Mode Descriptors + Final Patient Acuity + Reason for Choosing Destination + Type of Destination + Hospital In-Patient Destination + Hospital Capability + Destination Team Pre-Arrival Alert or Activation + Date/Time of Destination Prearrival Alert or Activation + Disposition Instructions Provided + Unit Disposition + Patient Evaluation/Care + Crew Disposition + Transport Disposition + Reason for Refusal/Release + Level of Care Provided per Protocol + Estimated Body Weight in Kilograms + Length Based Tape Measure + Date/Time of Assessment + Skin Assessment + Head Assessment + Face Assessment + Neck Assessment + Heart Assessment + Abdominal Assessment Finding Location + Abdomen Assessment + Pelvis/Genitourinary Assessment + Back and Spine Assessment Finding Location + Back and Spine Assessment + Extremity Assessment Finding Location + Extremities Assessment + Eye Assessment Finding Location + Eye Assessment + Mental Status Assessment + Neurological Assessment + Stroke/CVA Symptoms Resolved + Lung Assessment Finding Location + Lung Assessment + Chest Assessment Finding Location + Chest Assessment + Barriers to Patient Care + Last Name of Patient's Practitioner + First Name of Patient's Practitioner + Middle Name/Initial of Patient's Practitioner + Advance Directives + Medication Allergies + Environmental/Food Allergies + Medical/Surgical History + Medical History Obtained From + The Patient's Type of Immunization + Immunization Year + Current Medications + Current Medication Dose + Current Medication Dosage Unit + Current Medication Administration Route + Presence of Emergency Information Form + Alcohol/Drug Use Indicators + Pregnancy + Last Oral Intake + Current Medication Frequency + Cause of Injury + Mechanism of Injury + Trauma Triage Criteria (High Risk for Serious Injury) + Trauma Triage Criteria (Moderate Risk for Serious Injury) + Main Area of the Vehicle Impacted by the Collision + Location of Patient in Vehicle + Use of Occupant Safety Equipment + Airbag Deployment + Height of Fall (feet) + OSHA Personal Protective Equipment Used + ACN System/Company Providing ACN Data + ACN Incident ID + ACN Call Back Phone Number + Date/Time of ACN Incident + ACN Incident Location + ACN Incident Vehicle Body Type + ACN Incident Vehicle Manufacturer + ACN Incident Vehicle Make + ACN Incident Vehicle Model + ACN Incident Vehicle Model Year + ACN Incident Multiple Impacts + ACN Incident Delta Velocity + ACN High Probability of Injury + ACN Incident PDOF + ACN Incident Rollover + ACN Vehicle Seat Location + Seat Occupied + ACN Incident Seatbelt Use + ACN Incident Airbag Deployed + Date/Time of Laboratory or Imaging Result + Study/Result Prior to this Unit's EMS Care + Laboratory Result Type + Laboratory Result + Imaging Study Type + Imaging Study Results + Imaging Study File or Waveform Graphic Type + Imaging Study File or Waveform Graphic + Date/Time Medication Administered + Medication Administered Prior to this Unit's EMS Care + Medication Administered + Medication Administered Route + Medication Dosage + Medication Dosage Units + Response to Medication + Medication Complication + Medication Crew (Healthcare Professionals) ID + Role/Type of Person Administering Medication + Medication Authorization + Medication Authorizing Physician + Patient Care Report Narrative + Review Requested + Potential System of Care/Specialty/Registry Patient + Personal Protective Equipment Used + EMS Professional (Crew Member) ID + Suspected EMS Work Related Exposure, Injury, or Death + The Type of Work-Related Injury, Death or Suspected Exposure + Natural, Suspected, Intentional, or Unintentional Disaster + Crew Member Completing this Report + External Electronic Document Type + File Attachment Type + File Attachment Image + Type of Person Signing + Signature Reason + Type Of Patient Representative + Signature Status + Signature File Name + Signature File Type + Signature Graphic + Date/Time of Signature + Signature Last Name + Signature First Name + File Attachment Name + Emergency Department Disposition + Hospital Disposition + External Report ID/Number Type + External Report ID/Number + Other Report Registry Type + Emergency Department Procedures + Emergency Department Diagnosis + Date/Time of Hospital Admission + Hospital Procedures + Hospital Diagnosis + Date/Time of Hospital Discharge + Outcome at Hospital Discharge + Date/Time of Emergency Department Admission + Date/Time Emergency Department Procedure Performed + Date/Time Hospital Procedure Performed + EMS Patient ID + Last Name + First Name + Middle Initial/Name + Patient's Home Address + Patient's Home City + Patient's Home County + Patient's Home State + Patient's Home ZIP Code + Patient's Country of Residence + Patient Home Census Tract + Social Security Number + ePatient.13 + Race + Age + Age Units + Date of Birth + Patient's Phone Number + Patient's Email Address + State Issuing Driver's License + Driver's License Number + Alternate Home Residence + Sex + Primary Method of Payment + Physician Certification Statement + Date Physician Certification Statement Signed + Reason for Physician Certification Statement + Healthcare Provider Type Signing Physician Certification Statement + Last Name of Individual Signing Physician Certification Statement + First Name of Individual Signing Physician Certification Statement + Patient Resides in Service Area + Insurance Company ID + Insurance Company Name + Insurance Company Billing Priority + Insurance Company Address + Insurance Company City + Insurance Company State + Insurance Company ZIP Code + Insurance Company Country + Insurance Group ID + Insurance Policy ID Number + Last Name of the Insured + First Name of the Insured + Middle Initial/Name of the Insured + Relationship to the Insured + Closest Relative/Guardian Last Name + Closest Relative/ Guardian First Name + Closest Relative/ Guardian Middle Initial/Name + Closest Relative/ Guardian Street Address + Closest Relative/ Guardian City + Closest Relative/ Guardian State + Closest Relative/ Guardian ZIP Code + Closest Relative/ Guardian Country + Closest Relative/ Guardian Phone Number + Closest Relative/ Guardian Relationship + Patient's Employer + Patient's Employer's Address + Patient's Employer's City + Patient's Employer's State + Patient's Employer's ZIP Code + Patient's Employer's Country + Patient's Employer's Primary Phone Number + Response Urgency + Patient Transport Assessment + Specialty Care Transport Care Provider + Ambulance Transport Reason Code + Round Trip Purpose Description + Stretcher Purpose Description + Ambulance Conditions Indicator + Mileage to Closest Hospital Facility + ALS Assessment Performed and Warranted + CMS Service Level + EMS Condition Code + CMS Transportation Indicator + Transport Authorization Code + Prior Authorization Code Payer + Supply Item Used Name + Number of Supply Item(s) Used + Payer Type + Insurance Group Name + Insurance Company Phone Number + Date of Birth of the Insured + Date/Time Procedure Performed + Procedure Performed Prior to this Unit's EMS Care + Procedure + Size of Procedure Equipment + Number of Procedure Attempts + Procedure Successful + Procedure Complication + Response to Procedure + Procedure Crew Members ID + Role/Type of Person Performing the Procedure + Procedure Authorization + Procedure Authorizing Physician + Vascular Access Location + Protocols Used + Protocol Age Category + Patient Care Report Number + Software Creator + Software Name + Software Version + EMS Agency Number + EMS Agency Name + Incident Number + EMS Response Number + Type of Service Requested + Standby Purpose + Unit Transport and Equipment Capability + Type of Dispatch Delay + Type of Response Delay + Type of Scene Delay + Type of Transport Delay + Type of Turn-Around Delay + EMS Vehicle (Unit) Number + EMS Unit Call Sign + Vehicle Dispatch Location + Vehicle Dispatch GPS Location + Vehicle Dispatch Location US National Grid Coordinates + Beginning Odometer Reading of Responding Vehicle + On-Scene Odometer Reading of Responding Vehicle + Patient Destination Odometer Reading of Responding Vehicle + Ending Odometer Reading of Responding Vehicle + Response Mode to Scene + Additional Response Mode Descriptors + First EMS Unit on Scene + Other EMS or Public Safety Agencies at Scene + Other EMS or Public Safety Agency ID Number + Type of Other Service at Scene + Date/Time Initial Responder Arrived on Scene + Number of Patients at Scene + Mass Casualty Incident + Triage Classification for MCI Patient + Incident Location Type + Incident Facility Code + Scene GPS Location + Scene US National Grid Coordinates + Incident Facility or Location Name + Mile Post or Major Roadway + Incident Street Address + Incident Apartment, Suite, or Room + Incident City + Incident State + Incident ZIP Code + Scene Cross Street or Directions + Incident County + Incident Country + Incident Census Tract + First Other EMS or Public Safety Agency at Scene to Provide Patient Care + Date/Time of Symptom Onset + Possible Injury + Complaint Type + Complaint + Duration of Complaint + Time Units of Duration of Complaint + Chief Complaint Anatomic Location + Chief Complaint Organ System + Primary Symptom + Other Associated Symptoms + Provider's Primary Impression + Provider's Secondary Impressions + Initial Patient Acuity + Work-Related Illness/Injury + Patient's Occupational Industry + Patient's Occupation + Patient Activity + Date/Time Last Known Well + Justification for Transfer or Encounter + Reason for Interfacility Transfer/Medical Transport + PSAP Call Date/Time + Dispatch Notified Date/Time + Unit Notified by Dispatch Date/Time + Dispatch Acknowledged Date/Time + Unit En Route Date/Time + Unit Arrived on Scene Date/Time + Arrived at Patient Date/Time + Transfer of EMS Patient Care Date/Time + Unit Left Scene Date/Time + Arrival at Destination Landing Area Date/Time + Patient Arrived at Destination Date/Time + Destination Patient Transfer of Care Date/Time + Unit Back in Service Date/Time + Unit Canceled Date/Time + Unit Back at Home Location Date/Time + EMS Call Completed Date/Time + Unit Arrived at Staging Area Date/Time + Date/Time Vital Signs Taken + Obtained Prior to this Unit's EMS Care + Cardiac Rhythm / Electrocardiography (ECG) + ECG Type + Method of ECG Interpretation + SBP (Systolic Blood Pressure) + DBP (Diastolic Blood Pressure) + Method of Blood Pressure Measurement + Mean Arterial Pressure + Heart Rate + Method of Heart Rate Measurement + Pulse Oximetry + Pulse Rhythm + Respiratory Rate + Respiratory Effort + End Tidal Carbon Dioxide (ETCO2) + Carbon Monoxide (CO) + Blood Glucose Level + Glasgow Coma Score-Eye + Glasgow Coma Score-Verbal + Glasgow Coma Score-Motor + Glasgow Coma Score-Qualifier + Total Glasgow Coma Score + Temperature + Temperature Method + Level of Responsiveness (AVPU) + Pain Scale Score + Pain Scale Type + Stroke Scale Score + Stroke Scale Type + Reperfusion Checklist + APGAR + Revised Trauma Score + EMS Agency Unique State ID + EMS Agency Number + EMS Agency Name + State Certification/Licensure Levels + EMS Certification Levels Permitted to Perform Each Procedure + Procedures Permitted by the State + EMS Certification Levels Permitted to Administer Each Medication + Medications Permitted by the State + Protocols Permitted by the State + State Collected Element + Type of Facility + Facility Name + Facility Location Code + Hospital Designations + Facility National Provider Identifier + Facility Room, Suite, or Apartment + Facility Street Address + Facility City + Facility State + Facility ZIP Code + Facility County + Facility Country + Facility GPS Location + Facility US National Grid Coordinates + Facility Phone Number + Software Creator + Software Name + Software Version + State + Agency Demographic Custom Data Element Title + Agency Demographic Custom Definition + Agency Demographic Custom Data Type + Agency Demographic Custom Data Element Recurrence + Agency Demographic Custom Data Element Usage + Agency Demographic Custom Data Element Potential Values + Agency Demographic Custom Data Element Potential NOT Values (NV) + Agency Demographic Custom Data Element Potential Pertinent Negative Values (PN) + Agency Demographic Custom Data Element Grouping ID + Patient Care Report Custom Data Element Title + Patient Care Report Custom Definition + Patient Care Report Custom Data Type + Patient Care Report Custom Data Element Recurrence + Patient Care Report Custom Data Element Usage + Patient Care Report Custom Data Element Potential Values + Patient Care Report Custom Data Element Potential NOT Values (NV) + Patient Care Report Custom Data Element Potential Pertinent Negative Values (PN) + Patient Care Report Custom Data Element Grouping ID + + + + + + + + + + + + + + EMSDataSet / Nil/Not Value/Pertinent Negative Attributes + + + + + + + + + This rule enforces no constraints on the combination of xsi:nil, Not Value, and Pertinent Negative attributes on eCustomResults.01. + + + + + + + + + + + + This rule enforces no constraints on the Pertinent Negative attribute on elements in eExam.AssessmentGroup. + + + + + + + + + + + + This rule enforces no constraints on the Pertinent Negative attribute on eHistory.10. + + + + + + + + + + When has a Pertinent Negative of "Unable to Complete", it should be empty and it should not have a Not Value (Not Applicable, Not Recorded, or Not Reporting). + + + + + + + + + + When has a Pertinent Negative of "Approximate", it should have a value and it should not have a Not Value (Not Applicable, Not Recorded, or Not Reporting). + + + + + + + + + + When has a Pertinent Negative, it should have a value and it should not have a Not Value (Not Applicable, Not Recorded, or Not Reporting). + + + + + + + + + + When has a Pertinent Negative, it should have a value and it should not have a Not Value (Not Applicable, Not Recorded, or Not Reporting). + + + + + + + + + + When has a Pertinent Negative, it should have a value and it should not have a Not Value (Not Applicable, Not Recorded, or Not Reporting). + + + + + + + + + + When has a Pertinent Negative, it should be empty and it should not have a Not Value (Not Applicable, Not Recorded, or Not Reporting). + + + + + + + + + + When is empty, it should have a Not Value (Not Applicable, Not Recorded, or Not Reporting, if allowed for the element) or a Pertinent Negative (if allowed for the element), or it should be omitted (if the element is optional). + + + + + + + + + + When has a Not Value (Not Applicable, Not Recorded, or Not Reporting), it should be empty. + + + + + + + + EMSDataSet / Not Value/Pertinent Negative Uniqueness + + + + + + + + + This rule enforces no constraints on the uniqueness of eCustomResults.01 with Not Value or Pertinent Negative attribute. + + + + + + + + + + + + This rule enforces no constraints on the uniqueness of elements in eExam.AssessmentGroup with a Pertinent Negative Attribute. + + + + + + + + + + + + This rule enforces no constraints on the uniqueness of elements in eExam.AssessmentGroup with a Pertinent Negative Attribute. + + + + + + + + + + When has a Not Value, no other value should be recorded. + + + + + + + + + + When has a Pertinent Negative, no other value should be recorded. + + + + + + + + EMSDataSet / Unit Agency Information + + + + + + + in the patient care report should match in the agency demographic information. + + + + + + + + + + When is "None/No Delay", no other value should be recorded. + + + + + + + + + + When is "None/No Delay", no other value should be recorded. + + + + + + + + + + When is "None/No Delay", no other value should be recorded. + + + + + + + + + + When is "None/No Delay", no other value should be recorded. + + + + + + + + + + When is "None/No Delay", no other value should be recorded. + + + + + + + + EMSDataSet / Call Event Times Information + + + + + + + should not be earlier than . + + + + + + + + + + should be recorded unless is "Cancelled Prior to Arrival at Scene". + + + + + + + + + + should not be earlier than . + + + + + + + + + + should be recorded unless is "Cancelled Prior to Arrival at Scene". + + + + + + + + + + should not be earlier than . + + + + should not be earlier than . + + + + + + + + + + should be recorded when is "Patient Contact Made". + + + + + + + + + + should not be earlier than . + + + + + + + + + + + + should be recorded unless is "Cancelled Prior to Arrival at Scene". + + + + + + + + + + should not be earlier than . + + + + should not be earlier than . + + + + should not be earlier than . + + + + should not be earlier than . + + + + + + + + + + should be recorded when is "Transport by This EMS Unit...". + + + + + + + + + + should not be earlier than . + + + + should not be earlier than . + + + + should not be earlier than . + + + + should not be earlier than . + + + + should not be earlier than . + + + + + + + + + + should be recorded when is "Transport by This EMS Unit...". + + + + + + + + + + should not be earlier than . + + + + should not be earlier than . + + + + should not be earlier than . + + + + should not be earlier than . + + + + should not be earlier than . + + + + should not be earlier than . + + + + should not be earlier than . + + + + should not be earlier than . + + + + should not be earlier than . + + + + + + + + + + should not be earlier than . + + + + should not be earlier than . + + + + should not be earlier than . + + + + should not be earlier than . + + + + should not be earlier than . + + + + should not be earlier than . + + + + should not be earlier than . + + + + should not be earlier than . + + + + should not be earlier than . + + + + should not be earlier than . + + + + should not be in the future (the current time according to this system is ). + + + + + + + + EMSDataSet / Patient Information + + + + + + + should be recorded when is "Patient Evaluated and Care Provided". + + + + + + + + + + should belong within the . + + + + + + + + + + should be recorded when is "Patient Evaluated and Care Provided". + + + + + + + + + + should be recorded when is "Patient Evaluated and Care Provided". + + + + + + + + + + should be recorded when is "Patient Evaluated and Care Provided". + + + + + + + + + + should be recorded when is "Patient Evaluated and Care Provided". + + + + + + + + + + should be recorded when is "Patient Evaluated and Care Provided". + + + + should be recorded when is recorded. + + + + + + + + + + + should be recorded when is "Patient Evaluated and Care Provided". + + + + + + + + EMSDataSet / Insurance/Payment Information + + + + + + + should be recorded when is "Transport by This EMS Unit...". + + + + + + + + EMSDataSet / Incident Scene Information + + + + + + + should be "Multiple" or "Single" when is "Patient Contact Made". + + + + should be "Multiple" when is "Yes". + + + + + + + + + + should be recorded when is "Yes". + + + + + + + + + + should be recorded unless is "Cancelled Prior to Arrival at Scene". + + + + + + + + + + should be recorded unless is "Cancelled Prior to Arrival at Scene". + + + + + + + + + + should be recorded unless is "Cancelled Prior to Arrival at Scene". + + + + + + + + + + should be recorded unless is "Cancelled Prior to Arrival at Scene". + + + + + + + + + + should belong within the . + + + + + + + + EMSDataSet / Situation Information + + + + + + + should be recorded when is "Emergency Response (Primary Response Area)" and is "Patient Evaluated and Care Provided". + + + + + + + + + + should be recorded when is "Emergency Response (Primary Response Area)" and is "Patient Evaluated and Care Provided". + + + + should be "Yes" when a symptom or impression is injury-related. + + + + + + + + + + should be recorded when is "Emergency Response (Primary Response Area)" and is "Patient Evaluated and Care Provided". + + + + + + + + + + should be recorded when is "Emergency Response (Primary Response Area)" and is "Patient Evaluated and Care Provided". + + + + + + + + + + should be recorded when is "Emergency Response (Primary Response Area)" and is "Patient Evaluated and Care Provided". + + + + + + + + + + should only be recorded when is recorded. + + + + + + + + + + should be recorded when is "Emergency Response (Primary Response Area)" and is "Patient Evaluated and Care Provided". + + + + + + + + + + should only be recorded when is recorded. + + + + + + + + + + should be recorded when is "Emergency Response (Primary Response Area)" and is "Patient Evaluated and Care Provided". + + + + + + + + + + should be recorded when is "Patient Evaluated and Care Provided" and is "Yes...". + + + + should be recorded when is "Patient Evaluated and Care Provided" and is "Positive". + + + + should be recorded when is "Patient Evaluated and Care Provided" and is "STEMI...". + + + + + + + + + + should only be recorded when is "... Transfer" or "Other Routine Medical Transport". + + + + + + + + EMSDataSet / Injury Information + + + + + + + should be recorded when is "Patient Evaluated and Care Provided" and is "Yes". + + + + + + + + + + should only be recorded when is "Yes". + + + + + + + + + + should only be recorded when is "Yes". + + + + + + + + + + should only be recorded when is "Yes". + + + + + + + + EMSDataSet / Cardiac Arrest Information + + + + + + + should be recorded when is "Patient Evaluated and Care Provided" and is "Yes...". + + + + + + + + + + should only be recorded when is "Yes...". + + + + + + + + + + should be recorded when is "Patient Evaluated and Care Provided" and is "Yes...". + + + + should only be recorded when is "Yes...". + + + + should not contain both "Attempted/Initiated..." and "Not Attempted...". + + + + should contain "Initiated Chest Compressions" when contains "Compressions...". + + + + should contain "Attempted Ventilation" when contains "Ventilation..." or "Compressions-Intermittent with Ventilation". + + + + + + + + + + should be recorded when is "Patient Evaluated and Care Provided" and is "Yes...". + + + + + + + + + + should only be recorded when is "Yes...". + + + + When is "Not Witnessed", no other value should be recorded. + + + + + + + + + + should be recorded when is "Patient Evaluated and Care Provided" and is "Yes...". + + + + + + + + + + should only be recorded when is "Yes...". + + + + + + + + + + should only be recorded when is "Yes...". + + + + should contain "Compressions..." when contains "Initiated Chest Compressions". + + + + should contain "Ventilation..." or "Compressions-Intermittent with Ventilation" when contains "Attempted Ventilation". + + + + + + + + + + should be recorded when is "Patient Evaluated and Care Provided" and is "Yes...". + + + + + + + + + + should only be recorded when is "Yes...". + + + + When is "No", no other value should be recorded. + + + + + + + + + + should only be recorded when is "Yes...". + + + + + + + + + + should only be recorded when is "Yes...". + + + + + + + + + + should be recorded when is "Transport by This EMS Unit..." and is "Yes...". + + + + + + + + + + should only be recorded when is "Yes...". + + + + + + + + + + should be recorded when is "Patient Evaluated and Care Provided" and is "Yes...". + + + + + + + + + + should only be recorded when is "Yes...". + + + + + + + + + + should be recorded when is "Attempted..." or "Initiated...". + + + + + + + + + + should only be recorded when is "Yes...". + + + + + + + + + + should be recorded when is "Yes...". + + + + + + + + + + should only be recorded when is "Yes...". + + + + + + + + + + should be recorded when is "Yes, With Defibrillation". + + + + + + + + + + should only be recorded when is "Yes...". + + + + + + + + EMSDataSet / Patient History Information + + + + + + + When is "None Noted", no other value should be recorded. + + + + + + + + EMSDataSet / Patient Vital Sign Information + + + + + + + should be recorded, unless is "Yes". + + + + + + + + + + should not be earlier than , unless is "Yes". + + + + should not be earlier than , unless is "Yes". + + + + should not be later than . + + + + should not be later than . + + + + should not be later than when is "Yes". + + + + + + + + + + should be no more than 100 when ETCO2 Type is "Percentage". + + + + should be no more than 100 when ETCO2 Type is "kPa". + + + + should be an integer when ETCO2 Type is "mmHg". + + + + ETCO2 Type should be recorded when is recorded. + + + + + + + + + + When is "Initial GCS has legitimate values without interventions such as intubation and sedation", no other value should be recorded. + + + + + + + + EMSDataSet / Intervention Medications Information + + + + + + + should be recorded, unless is "Yes". + + + + + + + + + + should not be earlier than , unless is "Yes". + + + + should not be earlier than , unless is "Yes". + + + + should not be later than . + + + + should not be later than . + + + + should not be later than when is "Yes". + + + + + + + + + + should be recorded when a medication is administered. + + + + + + + + + + should be a code of between 2 and 7 digits when Code Type is "RxNorm". + + + + should be a SNOMED code specifically allowed in the data dictionary when Code Type is "SNOMED". + + + + + + + + + + should be an RxNorm code of between 2 and 7 digits or a SNOMED code specifically allowed in the data dictionary. + + + + + + + + + + should be recorded, unless is "Yes". + + + + + + + + + + should be recorded, unless is "Yes". + + + + + + + + + + should be recorded, unless is "Yes". + + + + + + + + + + When is "None", no other value should be recorded. + + + + + + + + + + should be recorded, unless is "Yes". + + + + + + + + EMSDataSet / Intervention Procedures Information + + + + + + + should be recorded, unless is "Yes". + + + + + + + + + + should not be earlier than , unless is "Yes". + + + + should not be earlier than , unless is "Yes". + + + + should not be later than . + + + + should not be later than . + + + + should not be later than when is "Yes". + + + + + + + + + + should be recorded when a procedure is performed. + + + + + + + + + + When is "None", no other value should be recorded. + + + + + + + + + + should be recorded, unless is "Yes". + + + + + + + + EMSDataSet / Patient Disposition Information + + + + + + + should be recorded when is "Transport by This EMS Unit...". + + + + + + + + + + should be recorded when is "Transport by This EMS Unit...". + + + + + + + + + + should belong within the . + + + + + + + + + + should be recorded when is "Transport by This EMS Unit...". + + + + + + + + + + should be recorded when is "Transport by This EMS Unit...". + + + + should not be recorded when is "Patient Refused Transport" or "No Transport". + + + + + + + + + + should be recorded when is "Transport by This EMS Unit...". + + + + should not be recorded when is "Patient Refused Transport" or "No Transport". + + + + + + + + + + should be recorded when is "Patient Evaluated and Care Provided". + + + + + + + + + + should be recorded when is "Transport by This EMS Unit...". + + + + + + + + + + should be recorded when is "Transport by This EMS Unit...". + + + + + + + + + + should be recorded when is "Hospital..." or "Freestanding Emergency Department" and is "Yes...". + + + + should be recorded when is "Hospital..." or "Freestanding Emergency Department" and is "Positive". + + + + should be recorded when is "Hospital..." or "Freestanding Emergency Department" and is "STEMI...". + + + + + + + + + + When is "No", no other value should be recorded. + + + + + + + + + + should be recorded when is recorded. + + + + should be recorded when is recorded with a value other than "None". + + + + + + + + + + should not be earlier than . + + + + should not be later than . + + + + should not be later than . + + + + + + + + + + should be "Patient Contact Made" when is "Patient Evaluated..." or "Patient Refused Evaluation/Care". + + + + should be "Patient Contact Made" when contains "... Primary Care..." or "Provided Care Supporting Primary EMS Crew". + + + + should be "Patient Contact Made" when is a value other than "Non-Patient Transport (Not Otherwise Listed)" or "No Transport". + + + + + + + + + + should be recorded when is "Patient Contact Made". + + + + should be "Patient Evaluated and Care Provided" when contains "... Primary Care..." or "Provided Care Supporting Primary EMS Crew". + + + + + + + + + + should be recorded when is "Patient Contact Made". + + + + + + + + + + should be recorded when is "Patient Contact Made". + + + + + + + + + + should be recorded (with a value other than "No Care Provided") when is "Patient Evaluated and Care Provided". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/EMSDataSet.sch.xsl b/EMSDataSet.sch.xsl new file mode 100644 index 00000000..2c2586fd --- /dev/null +++ b/EMSDataSet.sch.xsl @@ -0,0 +1,15629 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + / + + + + + + *: + + [namespace-uri()=' + + '] + + + + [ + + ] + + + + / + + @ + + + @*[local-name()=' + + ' and namespace-uri()=' + + '] + + + + + + + + / + + + [ + + ] + + + + /@ + + + + + + + / + + + [ + + ] + + + + /@ + + + + + + + + + + + + + + + + + + + + + + + . + + + +U + + U + + + + U. + + n + + + + U. + + _ + + _ + + + + + + + +   +   +   + + + + + + + + + nemSch_eNilNvPn + EMSDataSet / Nil/Not Value/Pertinent Negative Attributes + + + + + + + + nemSch_eNvPn + EMSDataSet / Not Value/Pertinent Negative Uniqueness + + + + + + + + nemSch_eResponse + EMSDataSet / Unit Agency Information + + + + + + + + nemSch_eTimes + EMSDataSet / Call Event Times Information + + + + + + + + nemSch_ePatient + EMSDataSet / Patient Information + + + + + + + + nemSch_ePayment + EMSDataSet / Insurance/Payment Information + + + + + + + + nemSch_eScene + EMSDataSet / Incident Scene Information + + + + + + + + nemSch_eSituation + EMSDataSet / Situation Information + + + + + + + + nemSch_eInjury + EMSDataSet / Injury Information + + + + + + + + nemSch_eArrest + EMSDataSet / Cardiac Arrest Information + + + + + + + + nemSch_eHistory + EMSDataSet / Patient History Information + + + + + + + + nemSch_eVitals + EMSDataSet / Patient Vital Sign Information + + + + + + + + nemSch_eMedications + EMSDataSet / Intervention Medications Information + + + + + + + + nemSch_eProcedures + EMSDataSet / Intervention Procedures Information + + + + + + + + nemSch_eDisposition + EMSDataSet / Patient Disposition Information + + + + + + +NEMSIS National ISO Schematron file for EMSDataSet + + + + + + EMS Agency Unique State ID + EMS Agency Number + EMS Agency Name + EMS Agency State + EMS Agency Service Area States + EMS Agency Service Area County(ies) + EMS Agency Census Tracts + EMS Agency Service Area ZIP Codes + Primary Type of Service + Other Types of Service + Level of Service + Organization Status + Organizational Type + EMS Agency Organizational Tax Status + Statistical Calendar Year + Total Primary Service Area Size + Total Service Area Population + 911 EMS Call Center Volume per Year + EMS Dispatch Volume per Year + EMS Patient Transport Volume per Year + EMS Patient Contact Volume per Year + EMS Billable Calls per Year + EMS Agency Time Zone + EMS Agency Daylight Savings Time Use + National Provider Identifier + Fire Department ID Number + State Associated with this Configuration + EMS Certification Levels Permitted to Perform Each Procedure + EMS Agency Procedures + EMS Certification Levels Permitted to Administer Each Medication + EMS Agency Medications + EMS Agency Protocols + EMS Agency Specialty Service Capability + Billing Status + Emergency Medical Dispatch (EMD) Provided to EMS Agency Service Area + EMD Vendor + Patient Monitoring Capability(ies) + Crew Call Sign + Dispatch Center (CAD) Name or ID + Agency Contact Type + Agency Contact Last Name + Agency Contact First Name + Agency Contact Middle Name/Initial + Agency Contact Address + Agency Contact City + Agency Contact State + Agency Contact ZIP Code + Agency Contact Country + Agency Contact Phone Number + Agency Contact Email Address + EMS Agency Contact Web Address + Agency Medical Director Degree + Agency Medical Director Board Certification Type + Medical Director Compensation + EMS Medical Director Fellowship Trained Status + Custom Data Element Title + Custom Definition + Custom Data Type + Custom Data Element Recurrence + Custom Data Element Usage + Custom Data Element Potential Values + Custom Data Element Potential NOT Values (NV) + Custom Data Element Potential Pertinent Negative Values (PN) + Custom Data Element Grouping ID + Custom Data Element Result + Custom Element ID Referenced + CorrelationID of DemographicReport Element or Group + Medical Device Serial Number + Medical Device Name or ID + Medical Device Type + Medical Device Manufacturer + Medical Device Model Number + Medical Device Purchase Date + Type of Facility + Facility Name + Facility Location Code + Hospital Designations + Facility National Provider Identifier + Facility Room, Suite, or Apartment + Facility Street Address + Facility City + Facility State + Facility ZIP Code + Facility County + Facility Country + Facility GPS Location + Facility US National Grid Coordinates + Facility Phone Number + EMS Location Type + EMS Location Name + EMS Location Number + EMS Location GPS + EMS Location US National Grid Coordinates + EMS Location Address + EMS Location City + EMS Location State + EMS Station or Location ZIP Code + EMS Location County + EMS Location Country + EMS Location Phone Number + EMS Personnel's Last Name + EMS Personnel's First Name + EMS Personnel's Middle Name/Initial + EMS Personnel's Mailing Address + EMS Personnel's City of Residence + EMS Personnel's State + EMS Personnel's ZIP Code + EMS Personnel's Country + EMS Personnel's Phone Number + EMS Personnel's Email Address + EMS Personnel's Date of Birth + dPersonnel.12 + EMS Personnel's Race + EMS Personnel's Citizenship + EMS Personnel's Highest Educational Degree + EMS Personnel's Degree Subject/Field of Study + EMS Personnel's Motor Vehicle License Type + EMS Personnel's Immunization Status + EMS Personnel's Immunization Year + EMS Personnel's Foreign Language Ability + EMS Personnel's Agency ID Number + EMS Personnel's State of Licensure + EMS Personnel's State's Licensure ID Number + EMS Personnel's State EMS Certification Licensure Level + EMS Personnel's State EMS Current Certification Date + EMS Personnel's Initial State's Licensure Issue Date + EMS Personnel's Current State's Licensure Expiration Date + EMS Personnel's National Registry Number + EMS Personnel's National Registry Certification Level + EMS Personnel's Current National Registry Expiration Date + EMS Personnel's Employment Status + EMS Personnel's Employment Status Date + EMS Personnel's Hire Date + EMS Personnel's Primary EMS Job Role + EMS Personnel's Other Job Responsibilities + EMS Personnel's Total Length of Service in Years + EMS Personnel's Date Length of Service Documented + EMS Personnel's Practice Level + Date of Personnel's Certification or Licensure for Agency + EMS Personnel's Sex + Unit/Vehicle Number + Vehicle Identification Number + EMS Unit Call Sign + Vehicle Type + Crew State Certification/Licensure Levels + Number of Each EMS Personnel Level on Normal 911 Ambulance Response + Number of Each EMS Personnel Level on Normal 911 Response (Non-Transport) Vehicle + Number of Each EMS Personnel Level on Normal Medical (Non-911) Transport Ambulance + Vehicle Initial Cost + Vehicle Model Year + Year Miles/Kilometers Hours Accrued + Annual Vehicle Hours + Annual Vehicle Miles/Kilometers + Indications for Invasive Airway + Date/Time Airway Device Placement Confirmation + Airway Device Being Confirmed + Airway Device Placement Confirmed Method + Tube Depth + Type of Individual Confirming Airway Device Placement + Crew Member ID + Airway Complications Encountered + Suspected Reasons for Failed Airway Management + Date/Time Decision to Manage the Patient with an Invasive Airway + Date/Time Invasive Airway Placement Attempts Abandoned + Cardiac Arrest + Cardiac Arrest Etiology + Resuscitation Attempted By EMS + Arrest Witnessed By + AED Use Prior to EMS Arrival + Type of CPR Provided + Therapeutic Hypothermia by EMS + First Monitored Arrest Rhythm of the Patient + Any Return of Spontaneous Circulation + Neurological Outcome at Hospital Discharge + Date/Time of Cardiac Arrest + Date/Time Resuscitation Discontinued + Reason CPR/Resuscitation Discontinued + Cardiac Rhythm on Arrival at Destination + End of EMS Cardiac Arrest Event + Date/Time of Initial CPR + Who First Initiated CPR + Who First Applied the AED + Who First Defibrillated the Patient + Crew Member ID + Crew Member Level + Crew Member Response Role + Custom Data Element Title + Custom Definition + Custom Data Type + Custom Data Element Recurrence + Custom Data Element Usage + Custom Data Element Potential Values + Custom Data Element Potential NOT Values (NV) + Custom Data Element Potential Pertinent Negative Values (PN) + Custom Data Element Grouping ID + Custom Data Element Result + Custom Element ID Referenced + CorrelationID of PatientCareReport Element or Group + Medical Device Serial Number + Date/Time of Event (per Medical Device) + Medical Device Event Type + Medical Device Waveform Graphic Type + Medical Device Waveform Graphic + Medical Device Mode (Manual, AED, Pacing, CO2, O2, etc) + Medical Device ECG Lead + Medical Device ECG Interpretation + Type of Shock + Shock or Pacing Energy + Total Number of Shocks Delivered + Pacing Rate + Dispatch Reason + EMD Performed + EMD Card Number + Dispatch Center Name or ID + Dispatch Priority (Patient Acuity) + Unit Dispatched CAD Record ID + Destination/Transferred To, Name + Destination/Transferred To, Code + Destination Street Address + Destination City + Destination State + Destination County + Destination ZIP Code + Destination Country + Destination GPS Location + Destination Location US National Grid Coordinates + Number of Patients Transported in this EMS Unit + How Patient Was Moved to Ambulance + Position of Patient During Transport + How Patient Was Moved From Ambulance + EMS Transport Method + Transport Mode from Scene + Additional Transport Mode Descriptors + Final Patient Acuity + Reason for Choosing Destination + Type of Destination + Hospital In-Patient Destination + Hospital Capability + Destination Team Pre-Arrival Alert or Activation + Date/Time of Destination Prearrival Alert or Activation + Disposition Instructions Provided + Unit Disposition + Patient Evaluation/Care + Crew Disposition + Transport Disposition + Reason for Refusal/Release + Level of Care Provided per Protocol + Estimated Body Weight in Kilograms + Length Based Tape Measure + Date/Time of Assessment + Skin Assessment + Head Assessment + Face Assessment + Neck Assessment + Heart Assessment + Abdominal Assessment Finding Location + Abdomen Assessment + Pelvis/Genitourinary Assessment + Back and Spine Assessment Finding Location + Back and Spine Assessment + Extremity Assessment Finding Location + Extremities Assessment + Eye Assessment Finding Location + Eye Assessment + Mental Status Assessment + Neurological Assessment + Stroke/CVA Symptoms Resolved + Lung Assessment Finding Location + Lung Assessment + Chest Assessment Finding Location + Chest Assessment + Barriers to Patient Care + Last Name of Patient's Practitioner + First Name of Patient's Practitioner + Middle Name/Initial of Patient's Practitioner + Advance Directives + Medication Allergies + Environmental/Food Allergies + Medical/Surgical History + Medical History Obtained From + The Patient's Type of Immunization + Immunization Year + Current Medications + Current Medication Dose + Current Medication Dosage Unit + Current Medication Administration Route + Presence of Emergency Information Form + Alcohol/Drug Use Indicators + Pregnancy + Last Oral Intake + Current Medication Frequency + Cause of Injury + Mechanism of Injury + Trauma Triage Criteria (High Risk for Serious Injury) + Trauma Triage Criteria (Moderate Risk for Serious Injury) + Main Area of the Vehicle Impacted by the Collision + Location of Patient in Vehicle + Use of Occupant Safety Equipment + Airbag Deployment + Height of Fall (feet) + OSHA Personal Protective Equipment Used + ACN System/Company Providing ACN Data + ACN Incident ID + ACN Call Back Phone Number + Date/Time of ACN Incident + ACN Incident Location + ACN Incident Vehicle Body Type + ACN Incident Vehicle Manufacturer + ACN Incident Vehicle Make + ACN Incident Vehicle Model + ACN Incident Vehicle Model Year + ACN Incident Multiple Impacts + ACN Incident Delta Velocity + ACN High Probability of Injury + ACN Incident PDOF + ACN Incident Rollover + ACN Vehicle Seat Location + Seat Occupied + ACN Incident Seatbelt Use + ACN Incident Airbag Deployed + Date/Time of Laboratory or Imaging Result + Study/Result Prior to this Unit's EMS Care + Laboratory Result Type + Laboratory Result + Imaging Study Type + Imaging Study Results + Imaging Study File or Waveform Graphic Type + Imaging Study File or Waveform Graphic + Date/Time Medication Administered + Medication Administered Prior to this Unit's EMS Care + Medication Administered + Medication Administered Route + Medication Dosage + Medication Dosage Units + Response to Medication + Medication Complication + Medication Crew (Healthcare Professionals) ID + Role/Type of Person Administering Medication + Medication Authorization + Medication Authorizing Physician + Patient Care Report Narrative + Review Requested + Potential System of Care/Specialty/Registry Patient + Personal Protective Equipment Used + EMS Professional (Crew Member) ID + Suspected EMS Work Related Exposure, Injury, or Death + The Type of Work-Related Injury, Death or Suspected Exposure + Natural, Suspected, Intentional, or Unintentional Disaster + Crew Member Completing this Report + External Electronic Document Type + File Attachment Type + File Attachment Image + Type of Person Signing + Signature Reason + Type Of Patient Representative + Signature Status + Signature File Name + Signature File Type + Signature Graphic + Date/Time of Signature + Signature Last Name + Signature First Name + File Attachment Name + Emergency Department Disposition + Hospital Disposition + External Report ID/Number Type + External Report ID/Number + Other Report Registry Type + Emergency Department Procedures + Emergency Department Diagnosis + Date/Time of Hospital Admission + Hospital Procedures + Hospital Diagnosis + Date/Time of Hospital Discharge + Outcome at Hospital Discharge + Date/Time of Emergency Department Admission + Date/Time Emergency Department Procedure Performed + Date/Time Hospital Procedure Performed + EMS Patient ID + Last Name + First Name + Middle Initial/Name + Patient's Home Address + Patient's Home City + Patient's Home County + Patient's Home State + Patient's Home ZIP Code + Patient's Country of Residence + Patient Home Census Tract + Social Security Number + ePatient.13 + Race + Age + Age Units + Date of Birth + Patient's Phone Number + Patient's Email Address + State Issuing Driver's License + Driver's License Number + Alternate Home Residence + Sex + Primary Method of Payment + Physician Certification Statement + Date Physician Certification Statement Signed + Reason for Physician Certification Statement + Healthcare Provider Type Signing Physician Certification Statement + Last Name of Individual Signing Physician Certification Statement + First Name of Individual Signing Physician Certification Statement + Patient Resides in Service Area + Insurance Company ID + Insurance Company Name + Insurance Company Billing Priority + Insurance Company Address + Insurance Company City + Insurance Company State + Insurance Company ZIP Code + Insurance Company Country + Insurance Group ID + Insurance Policy ID Number + Last Name of the Insured + First Name of the Insured + Middle Initial/Name of the Insured + Relationship to the Insured + Closest Relative/Guardian Last Name + Closest Relative/ Guardian First Name + Closest Relative/ Guardian Middle Initial/Name + Closest Relative/ Guardian Street Address + Closest Relative/ Guardian City + Closest Relative/ Guardian State + Closest Relative/ Guardian ZIP Code + Closest Relative/ Guardian Country + Closest Relative/ Guardian Phone Number + Closest Relative/ Guardian Relationship + Patient's Employer + Patient's Employer's Address + Patient's Employer's City + Patient's Employer's State + Patient's Employer's ZIP Code + Patient's Employer's Country + Patient's Employer's Primary Phone Number + Response Urgency + Patient Transport Assessment + Specialty Care Transport Care Provider + Ambulance Transport Reason Code + Round Trip Purpose Description + Stretcher Purpose Description + Ambulance Conditions Indicator + Mileage to Closest Hospital Facility + ALS Assessment Performed and Warranted + CMS Service Level + EMS Condition Code + CMS Transportation Indicator + Transport Authorization Code + Prior Authorization Code Payer + Supply Item Used Name + Number of Supply Item(s) Used + Payer Type + Insurance Group Name + Insurance Company Phone Number + Date of Birth of the Insured + Date/Time Procedure Performed + Procedure Performed Prior to this Unit's EMS Care + Procedure + Size of Procedure Equipment + Number of Procedure Attempts + Procedure Successful + Procedure Complication + Response to Procedure + Procedure Crew Members ID + Role/Type of Person Performing the Procedure + Procedure Authorization + Procedure Authorizing Physician + Vascular Access Location + Protocols Used + Protocol Age Category + Patient Care Report Number + Software Creator + Software Name + Software Version + EMS Agency Number + EMS Agency Name + Incident Number + EMS Response Number + Type of Service Requested + Standby Purpose + Unit Transport and Equipment Capability + Type of Dispatch Delay + Type of Response Delay + Type of Scene Delay + Type of Transport Delay + Type of Turn-Around Delay + EMS Vehicle (Unit) Number + EMS Unit Call Sign + Vehicle Dispatch Location + Vehicle Dispatch GPS Location + Vehicle Dispatch Location US National Grid Coordinates + Beginning Odometer Reading of Responding Vehicle + On-Scene Odometer Reading of Responding Vehicle + Patient Destination Odometer Reading of Responding Vehicle + Ending Odometer Reading of Responding Vehicle + Response Mode to Scene + Additional Response Mode Descriptors + First EMS Unit on Scene + Other EMS or Public Safety Agencies at Scene + Other EMS or Public Safety Agency ID Number + Type of Other Service at Scene + Date/Time Initial Responder Arrived on Scene + Number of Patients at Scene + Mass Casualty Incident + Triage Classification for MCI Patient + Incident Location Type + Incident Facility Code + Scene GPS Location + Scene US National Grid Coordinates + Incident Facility or Location Name + Mile Post or Major Roadway + Incident Street Address + Incident Apartment, Suite, or Room + Incident City + Incident State + Incident ZIP Code + Scene Cross Street or Directions + Incident County + Incident Country + Incident Census Tract + First Other EMS or Public Safety Agency at Scene to Provide Patient Care + Date/Time of Symptom Onset + Possible Injury + Complaint Type + Complaint + Duration of Complaint + Time Units of Duration of Complaint + Chief Complaint Anatomic Location + Chief Complaint Organ System + Primary Symptom + Other Associated Symptoms + Provider's Primary Impression + Provider's Secondary Impressions + Initial Patient Acuity + Work-Related Illness/Injury + Patient's Occupational Industry + Patient's Occupation + Patient Activity + Date/Time Last Known Well + Justification for Transfer or Encounter + Reason for Interfacility Transfer/Medical Transport + PSAP Call Date/Time + Dispatch Notified Date/Time + Unit Notified by Dispatch Date/Time + Dispatch Acknowledged Date/Time + Unit En Route Date/Time + Unit Arrived on Scene Date/Time + Arrived at Patient Date/Time + Transfer of EMS Patient Care Date/Time + Unit Left Scene Date/Time + Arrival at Destination Landing Area Date/Time + Patient Arrived at Destination Date/Time + Destination Patient Transfer of Care Date/Time + Unit Back in Service Date/Time + Unit Canceled Date/Time + Unit Back at Home Location Date/Time + EMS Call Completed Date/Time + Unit Arrived at Staging Area Date/Time + Date/Time Vital Signs Taken + Obtained Prior to this Unit's EMS Care + Cardiac Rhythm / Electrocardiography (ECG) + ECG Type + Method of ECG Interpretation + SBP (Systolic Blood Pressure) + DBP (Diastolic Blood Pressure) + Method of Blood Pressure Measurement + Mean Arterial Pressure + Heart Rate + Method of Heart Rate Measurement + Pulse Oximetry + Pulse Rhythm + Respiratory Rate + Respiratory Effort + End Tidal Carbon Dioxide (ETCO2) + Carbon Monoxide (CO) + Blood Glucose Level + Glasgow Coma Score-Eye + Glasgow Coma Score-Verbal + Glasgow Coma Score-Motor + Glasgow Coma Score-Qualifier + Total Glasgow Coma Score + Temperature + Temperature Method + Level of Responsiveness (AVPU) + Pain Scale Score + Pain Scale Type + Stroke Scale Score + Stroke Scale Type + Reperfusion Checklist + APGAR + Revised Trauma Score + EMS Agency Unique State ID + EMS Agency Number + EMS Agency Name + State Certification/Licensure Levels + EMS Certification Levels Permitted to Perform Each Procedure + Procedures Permitted by the State + EMS Certification Levels Permitted to Administer Each Medication + Medications Permitted by the State + Protocols Permitted by the State + State Collected Element + Type of Facility + Facility Name + Facility Location Code + Hospital Designations + Facility National Provider Identifier + Facility Room, Suite, or Apartment + Facility Street Address + Facility City + Facility State + Facility ZIP Code + Facility County + Facility Country + Facility GPS Location + Facility US National Grid Coordinates + Facility Phone Number + Software Creator + Software Name + Software Version + State + Agency Demographic Custom Data Element Title + Agency Demographic Custom Definition + Agency Demographic Custom Data Type + Agency Demographic Custom Data Element Recurrence + Agency Demographic Custom Data Element Usage + Agency Demographic Custom Data Element Potential Values + Agency Demographic Custom Data Element Potential NOT Values (NV) + Agency Demographic Custom Data Element Potential Pertinent Negative Values (PN) + Agency Demographic Custom Data Element Grouping ID + Patient Care Report Custom Data Element Title + Patient Care Report Custom Definition + Patient Care Report Custom Data Type + Patient Care Report Custom Data Element Recurrence + Patient Care Report Custom Data Element Usage + Patient Care Report Custom Data Element Potential Values + Patient Care Report Custom Data Element Potential NOT Values (NV) + Patient Care Report Custom Data Element Potential Pertinent Negative Values (PN) + Patient Care Report Custom Data Element Grouping ID + + + + +EMSDataSet / Nil/Not Value/Pertinent Negative Attributes + + + + + + + [WARNING] + + + + + This rule enforces no constraints on the combination of xsi:nil, Not Value, and Pertinent Negative attributes on eCustomResults.01. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [WARNING] + + + + + This rule enforces no constraints on the Pertinent Negative attribute on elements in eExam.AssessmentGroup. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [WARNING] + + + + + This rule enforces no constraints on the Pertinent Negative attribute on eHistory.10. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e003 + [ERROR] + + + + + When + + has a Pertinent Negative of "Unable to Complete", it should be empty and it should not have a Not Value (Not Applicable, Not Recorded, or Not Reporting). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e004 + [ERROR] + + + + + When + + has a Pertinent Negative of "Approximate", it should have a value and it should not have a Not Value (Not Applicable, Not Recorded, or Not Reporting). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e005 + [ERROR] + + + + + When + + has a Pertinent Negative, it should have a value and it should not have a Not Value (Not Applicable, Not Recorded, or Not Reporting). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e006 + [ERROR] + + + + + When + + has a Pertinent Negative, it should have a value and it should not have a Not Value (Not Applicable, Not Recorded, or Not Reporting). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e007 + [ERROR] + + + + + When + + has a Pertinent Negative, it should have a value and it should not have a Not Value (Not Applicable, Not Recorded, or Not Reporting). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e008 + [ERROR] + + + + + When + + has a Pertinent Negative, it should be empty and it should not have a Not Value (Not Applicable, Not Recorded, or Not Reporting). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e001 + [ERROR] + + + + + When + + is empty, it should have a Not Value (Not Applicable, Not Recorded, or Not Reporting, if allowed for the element) or a Pertinent Negative (if allowed for the element), or it should be omitted (if the element is optional). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e002 + [ERROR] + + + + + When + + has a Not Value (Not Applicable, Not Recorded, or Not Reporting), it should be empty. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +EMSDataSet / Not Value/Pertinent Negative Uniqueness + + + + + + + [WARNING] + + + + + This rule enforces no constraints on the uniqueness of eCustomResults.01 with Not Value or Pertinent Negative attribute. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [WARNING] + + + + + This rule enforces no constraints on the uniqueness of elements in eExam.AssessmentGroup with a Pertinent Negative Attribute. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [WARNING] + + + + + This rule enforces no constraints on the uniqueness of elements in eExam.AssessmentGroup with a Pertinent Negative Attribute. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e009 + [WARNING] + + + + + When + + has a Not Value, no other value should be recorded. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e010 + [WARNING] + + + + + When + + has a Pertinent Negative, no other value should be recorded. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +EMSDataSet / Unit Agency Information + + + + + + + + + nemSch_e011 + [WARNING] + + + + + + + in the patient care report should match + + in the agency demographic information. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e012 + [WARNING] + + + + + When + + is "None/No Delay", no other value should be recorded. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e013 + [WARNING] + + + + + When + + is "None/No Delay", no other value should be recorded. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e014 + [WARNING] + + + + + When + + is "None/No Delay", no other value should be recorded. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e015 + [WARNING] + + + + + When + + is "None/No Delay", no other value should be recorded. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e016 + [WARNING] + + + + + When + + is "None/No Delay", no other value should be recorded. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +EMSDataSet / Call Event Times Information + + + + + + + + + nemSch_e017 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e018 + [WARNING] + + + + + + + should be recorded unless + + is "Cancelled Prior to Arrival at Scene". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e019 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e020 + [WARNING] + + + + + + + should be recorded unless + + is "Cancelled Prior to Arrival at Scene". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e021 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e022 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e023 + [WARNING] + + + + + + + should be recorded when + + is "Patient Contact Made". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e024 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e025 + [WARNING] + + + + + + + should be recorded unless + + is "Cancelled Prior to Arrival at Scene". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e026 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e027 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e028 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e029 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e030 + [WARNING] + + + + + + + should be recorded when + + is "Transport by This EMS Unit...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e031 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e032 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e033 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e034 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e035 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e036 + [WARNING] + + + + + + + should be recorded when + + is "Transport by This EMS Unit...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e037 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e038 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e039 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e040 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e041 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e042 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e043 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e044 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e045 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e046 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e047 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e048 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e049 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e050 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e051 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e052 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e053 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e054 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e055 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e056 + [WARNING] + + + + + + + should not be in the future (the current time according to this system is + + ). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +EMSDataSet / Patient Information + + + + + + + + + nemSch_e057 + [WARNING] + + + + + + + should be recorded when + + is "Patient Evaluated and Care Provided". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e058 + [WARNING] + + + + + + + should belong within the + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e059 + [WARNING] + + + + + + + should be recorded when + + is "Patient Evaluated and Care Provided". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e060 + [WARNING] + + + + + + + should be recorded when + + is "Patient Evaluated and Care Provided". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e062 + [WARNING] + + + + + + + should be recorded when + + is "Patient Evaluated and Care Provided". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e063 + [WARNING] + + + + + + + should be recorded when + + is "Patient Evaluated and Care Provided". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e064 + [WARNING] + + + + + + + should be recorded when + + is "Patient Evaluated and Care Provided". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e065 + [WARNING] + + + + + + + should be recorded when + + is recorded. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e193 + [WARNING] + + + + + + + should be recorded when + + is "Patient Evaluated and Care Provided". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +EMSDataSet / Insurance/Payment Information + + + + + + + + + nemSch_e066 + [WARNING] + + + + + + + should be recorded when + + is "Transport by This EMS Unit...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +EMSDataSet / Incident Scene Information + + + + + + + + + nemSch_e067 + [WARNING] + + + + + + + should be "Multiple" or "Single" when + + is "Patient Contact Made". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e068 + [WARNING] + + + + + + + should be "Multiple" when + + is "Yes". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e069 + [WARNING] + + + + + + + should be recorded when + + is "Yes". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e070 + [WARNING] + + + + + + + should be recorded unless + + is "Cancelled Prior to Arrival at Scene". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e071 + [WARNING] + + + + + + + should be recorded unless + + is "Cancelled Prior to Arrival at Scene". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e072 + [WARNING] + + + + + + + should be recorded unless + + is "Cancelled Prior to Arrival at Scene". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e073 + [WARNING] + + + + + + + should be recorded unless + + is "Cancelled Prior to Arrival at Scene". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e074 + [WARNING] + + + + + + + should belong within the + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +EMSDataSet / Situation Information + + + + + + + + + nemSch_e075 + [WARNING] + + + + + + + should be recorded when + + is "Emergency Response (Primary Response Area)" and + + is "Patient Evaluated and Care Provided". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e076 + [WARNING] + + + + + + + should be recorded when + + is "Emergency Response (Primary Response Area)" and + + is "Patient Evaluated and Care Provided". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e077 + [WARNING] + + + + + + + should be "Yes" when a symptom or impression is injury-related. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e078 + [WARNING] + + + + + + + should be recorded when + + is "Emergency Response (Primary Response Area)" and + + is "Patient Evaluated and Care Provided". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e079 + [WARNING] + + + + + + + should be recorded when + + is "Emergency Response (Primary Response Area)" and + + is "Patient Evaluated and Care Provided". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e080 + [WARNING] + + + + + + + should be recorded when + + is "Emergency Response (Primary Response Area)" and + + is "Patient Evaluated and Care Provided". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e081 + [WARNING] + + + + + + + should only be recorded when + + is recorded. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e082 + [WARNING] + + + + + + + should be recorded when + + is "Emergency Response (Primary Response Area)" and + + is "Patient Evaluated and Care Provided". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e083 + [WARNING] + + + + + + + should only be recorded when + + is recorded. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e084 + [WARNING] + + + + + + + should be recorded when + + is "Emergency Response (Primary Response Area)" and + + is "Patient Evaluated and Care Provided". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e085 + [WARNING] + + + + + + + should be recorded when + + is "Patient Evaluated and Care Provided" and + + is "Yes...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e086 + [WARNING] + + + + + + + should be recorded when + + is "Patient Evaluated and Care Provided" and + + is "Positive". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e087 + [WARNING] + + + + + + + should be recorded when + + is "Patient Evaluated and Care Provided" and + + is "STEMI...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e088 + [WARNING] + + + + + + + should only be recorded when + + is "... Transfer" or "Other Routine Medical Transport". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +EMSDataSet / Injury Information + + + + + + + + + nemSch_e089 + [WARNING] + + + + + + + should be recorded when + + is "Patient Evaluated and Care Provided" and + + is "Yes". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e090 + [WARNING] + + + + + + + should only be recorded when + + is "Yes". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e091 + [WARNING] + + + + + + + should only be recorded when + + is "Yes". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e092 + [WARNING] + + + + + + + should only be recorded when + + is "Yes". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +EMSDataSet / Cardiac Arrest Information + + + + + + + + + nemSch_e093 + [WARNING] + + + + + + + should be recorded when + + is "Patient Evaluated and Care Provided" and + + is "Yes...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e094 + [WARNING] + + + + + + + should only be recorded when + + is "Yes...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e095 + [WARNING] + + + + + + + should be recorded when + + is "Patient Evaluated and Care Provided" and + + is "Yes...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e096 + [WARNING] + + + + + + + should only be recorded when + + is "Yes...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e097 + [WARNING] + + + + + + + should not contain both "Attempted/Initiated..." and "Not Attempted...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e098 + [WARNING] + + + + + + + should contain "Initiated Chest Compressions" when + + contains "Compressions...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e099 + [WARNING] + + + + + + + should contain "Attempted Ventilation" when + + contains "Ventilation..." or "Compressions-Intermittent with Ventilation". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e100 + [WARNING] + + + + + + + should be recorded when + + is "Patient Evaluated and Care Provided" and + + is "Yes...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e101 + [WARNING] + + + + + + + should only be recorded when + + is "Yes...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e102 + [WARNING] + + + + + When + + is "Not Witnessed", no other value should be recorded. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e103 + [WARNING] + + + + + + + should be recorded when + + is "Patient Evaluated and Care Provided" and + + is "Yes...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e104 + [WARNING] + + + + + + + should only be recorded when + + is "Yes...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e105 + [WARNING] + + + + + + + should only be recorded when + + is "Yes...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e106 + [WARNING] + + + + + + + should contain "Compressions..." when + + contains "Initiated Chest Compressions". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e107 + [WARNING] + + + + + + + should contain "Ventilation..." or "Compressions-Intermittent with Ventilation" when + + contains "Attempted Ventilation". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e108 + [WARNING] + + + + + + + should be recorded when + + is "Patient Evaluated and Care Provided" and + + is "Yes...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e109 + [WARNING] + + + + + + + should only be recorded when + + is "Yes...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e110 + [WARNING] + + + + + When + + is "No", no other value should be recorded. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e111 + [WARNING] + + + + + + + should only be recorded when + + is "Yes...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e112 + [WARNING] + + + + + + + should only be recorded when + + is "Yes...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e113 + [WARNING] + + + + + + + should be recorded when + + is "Transport by This EMS Unit..." and + + is "Yes...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e114 + [WARNING] + + + + + + + should only be recorded when + + is "Yes...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e115 + [WARNING] + + + + + + + should be recorded when + + is "Patient Evaluated and Care Provided" and + + is "Yes...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e116 + [WARNING] + + + + + + + should only be recorded when + + is "Yes...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e117 + [WARNING] + + + + + + + should be recorded when + + is "Attempted..." or "Initiated...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e118 + [WARNING] + + + + + + + should only be recorded when + + is "Yes...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e119 + [WARNING] + + + + + + + should be recorded when + + is "Yes...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e120 + [WARNING] + + + + + + + should only be recorded when + + is "Yes...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e122 + [WARNING] + + + + + + + should be recorded when + + is "Yes, With Defibrillation". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e123 + [WARNING] + + + + + + + should only be recorded when + + is "Yes...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +EMSDataSet / Patient History Information + + + + + + + + + nemSch_e124 + [WARNING] + + + + + When + + is "None Noted", no other value should be recorded. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +EMSDataSet / Patient Vital Sign Information + + + + + + + + + nemSch_e125 + [WARNING] + + + + + + + should be recorded, unless + + is "Yes". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e126 + [WARNING] + + + + + + + should not be earlier than + + , unless + + is "Yes". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e127 + [WARNING] + + + + + + + should not be earlier than + + , unless + + is "Yes". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e128 + [WARNING] + + + + + + + should not be later than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e129 + [WARNING] + + + + + + + should not be later than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e130 + [WARNING] + + + + + + + should not be later than + + when + + is "Yes". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e131 + [WARNING] + + + + + + + should be no more than 100 when ETCO2 Type is "Percentage". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e132 + [WARNING] + + + + + + + should be no more than 100 when ETCO2 Type is "kPa". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e133 + [WARNING] + + + + + + + should be an integer when ETCO2 Type is "mmHg". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e134 + [WARNING] + + + + + ETCO2 Type should be recorded when + + is recorded. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e135 + [WARNING] + + + + + When + + is "Initial GCS has legitimate values without interventions such as intubation and sedation", no other value should be recorded. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +EMSDataSet / Intervention Medications Information + + + + + + + + + nemSch_e136 + [WARNING] + + + + + + + should be recorded, unless + + is "Yes". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e137 + [WARNING] + + + + + + + should not be earlier than + + , unless + + is "Yes". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e138 + [WARNING] + + + + + + + should not be earlier than + + , unless + + is "Yes". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e139 + [WARNING] + + + + + + + should not be later than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e140 + [WARNING] + + + + + + + should not be later than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e141 + [WARNING] + + + + + + + should not be later than + + when + + is "Yes". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e142 + [WARNING] + + + + + + + should be recorded when a medication is administered. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e143 + [ERROR] + + + + + + + should be a code of between 2 and 7 digits when Code Type is "RxNorm". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e144 + [ERROR] + + + + + + + should be a SNOMED code specifically allowed in the data dictionary when Code Type is "SNOMED". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e145 + [ERROR] + + + + + + + should be an RxNorm code of between 2 and 7 digits or a SNOMED code specifically allowed in the data dictionary. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e146 + [WARNING] + + + + + + + should be recorded, unless + + is "Yes". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e147 + [WARNING] + + + + + + + should be recorded, unless + + is "Yes". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e148 + [WARNING] + + + + + + + should be recorded, unless + + is "Yes". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e149 + [WARNING] + + + + + When + + is "None", no other value should be recorded. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e150 + [WARNING] + + + + + + + should be recorded, unless + + is "Yes". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +EMSDataSet / Intervention Procedures Information + + + + + + + + + nemSch_e151 + [WARNING] + + + + + + + should be recorded, unless + + is "Yes". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e152 + [WARNING] + + + + + + + should not be earlier than + + , unless + + is "Yes". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e153 + [WARNING] + + + + + + + should not be earlier than + + , unless + + is "Yes". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e154 + [WARNING] + + + + + + + should not be later than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e155 + [WARNING] + + + + + + + should not be later than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e156 + [WARNING] + + + + + + + should not be later than + + when + + is "Yes". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e157 + [WARNING] + + + + + + + should be recorded when a procedure is performed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e158 + [WARNING] + + + + + When + + is "None", no other value should be recorded. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e159 + [WARNING] + + + + + + + should be recorded, unless + + is "Yes". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +EMSDataSet / Patient Disposition Information + + + + + + + + + nemSch_e160 + [WARNING] + + + + + + + should be recorded when + + is "Transport by This EMS Unit...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e161 + [WARNING] + + + + + + + should be recorded when + + is "Transport by This EMS Unit...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e162 + [WARNING] + + + + + + + should belong within the + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e163 + [WARNING] + + + + + + + should be recorded when + + is "Transport by This EMS Unit...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e164 + [WARNING] + + + + + + + should be recorded when + + is "Transport by This EMS Unit...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e165 + [WARNING] + + + + + + + should not be recorded when + + is "Patient Refused Transport" or "No Transport". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e166 + [WARNING] + + + + + + + should be recorded when + + is "Transport by This EMS Unit...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e167 + [WARNING] + + + + + + + should not be recorded when + + is "Patient Refused Transport" or "No Transport". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e168 + [WARNING] + + + + + + + should be recorded when + + is "Patient Evaluated and Care Provided". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e169 + [WARNING] + + + + + + + should be recorded when + + is "Transport by This EMS Unit...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e170 + [WARNING] + + + + + + + should be recorded when + + is "Transport by This EMS Unit...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e171 + [WARNING] + + + + + + + should be recorded when + + is "Hospital..." or "Freestanding Emergency Department" and + + is "Yes...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e172 + [WARNING] + + + + + + + should be recorded when + + is "Hospital..." or "Freestanding Emergency Department" and + + is "Positive". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e173 + [WARNING] + + + + + + + should be recorded when + + is "Hospital..." or "Freestanding Emergency Department" and + + is "STEMI...". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e174 + [WARNING] + + + + + When + + is "No", no other value should be recorded. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e175 + [WARNING] + + + + + + + should be recorded when + + is recorded. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e176 + [WARNING] + + + + + + + should be recorded when + + is recorded with a value other than "None". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e177 + [WARNING] + + + + + + + should not be earlier than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e178 + [WARNING] + + + + + + + should not be later than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e179 + [WARNING] + + + + + + + should not be later than + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e180 + [WARNING] + + + + + + + should be "Patient Contact Made" when + + is "Patient Evaluated..." or "Patient Refused Evaluation/Care". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e181 + [WARNING] + + + + + + + should be "Patient Contact Made" when + + contains "... Primary Care..." or "Provided Care Supporting Primary EMS Crew". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e182 + [WARNING] + + + + + + + should be "Patient Contact Made" when + + is a value other than "Non-Patient Transport (Not Otherwise Listed)" or "No Transport". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e183 + [WARNING] + + + + + + + should be recorded when + + is "Patient Contact Made". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e184 + [WARNING] + + + + + + + should be "Patient Evaluated and Care Provided" when + + contains "... Primary Care..." or "Provided Care Supporting Primary EMS Crew". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e185 + [WARNING] + + + + + + + should be recorded when + + is "Patient Contact Made". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e186 + [WARNING] + + + + + + + should be recorded when + + is "Patient Contact Made". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nemSch_e187 + [WARNING] + + + + + + + should be recorded (with a value other than "No Care Provided") when + + is "Patient Evaluated and Care Provided". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/angular/projects/admin/src/app/interfaces/elements/edit-interface-element.component.html b/angular/projects/admin/src/app/interfaces/elements/edit-interface-element.component.html index 2fd81293..d12930dc 100644 --- a/angular/projects/admin/src/app/interfaces/elements/edit-interface-element.component.html +++ b/angular/projects/admin/src/app/interfaces/elements/edit-interface-element.component.html @@ -1,7 +1,7 @@
-

Edit Section

+

Edit Element

+
+ +
+
+ +
diff --git a/models/sectionElement.js b/models/sectionElement.js index f0167bd6..0a051774 100644 --- a/models/sectionElement.js +++ b/models/sectionElement.js @@ -16,6 +16,10 @@ module.exports = (sequelize, DataTypes) => { column: DataTypes.INTEGER, customId: DataTypes.STRING, name: DataTypes.STRING, + shortName: DataTypes.STRING, + unit: DataTypes.STRING, + visibleIf: DataTypes.JSONB, + onChange: DataTypes.JSONB, }, { sequelize, diff --git a/routes/api/sectionElements.js b/routes/api/sectionElements.js index 3ab67a8a..7d6f9b6a 100644 --- a/routes/api/sectionElements.js +++ b/routes/api/sectionElements.js @@ -47,7 +47,7 @@ router.post( interceptors.requireAdmin, helpers.async(async (req, res) => { const record = models.SectionElement.build( - _.pick(req.body, ['sectionId', 'nemsisElementId', 'screenId', 'position', 'column', 'customId']), + _.pick(req.body, ['sectionId', 'nemsisElementId', 'screenId', 'position', 'column', 'customId', 'name', 'shortName', 'unit']), ); record.createdById = req.user.id; record.updatedById = req.user.id; @@ -64,7 +64,7 @@ router.patch( await models.sequelize.transaction(async (transaction) => { record = await models.SectionElement.findByPk(req.params.id, { transaction }); if (record) { - record.set(_.pick(req.body, ['nemsisElementId', 'screenId', 'position', 'column', 'customId'])); + record.set(_.pick(req.body, ['nemsisElementId', 'screenId', 'position', 'column', 'customId', 'name', 'shortName', 'unit'])); record.updatedById = req.user.id; await record.save({ transaction }); } From ee5a21b2814d705992c94240308f8bc531ca92ba Mon Sep 17 00:00:00 2001 From: Francis Li Date: Thu, 27 Aug 2026 15:53:41 -0700 Subject: [PATCH 11/12] Add placeholder visibleIf/onChange editing fields --- .../edit-interface-element.component.html | 2 ++ .../edit-interface-element.component.ts | 14 +++++++++ .../interface-element-form.component.html | 6 ++++ .../new-interface-element.component.ts | 12 ++++---- routes/api/sectionElements.js | 29 +++++++++++++++++-- 5 files changed, 56 insertions(+), 7 deletions(-) diff --git a/angular/projects/admin/src/app/interfaces/elements/edit-interface-element.component.html b/angular/projects/admin/src/app/interfaces/elements/edit-interface-element.component.html index d12930dc..67d7c1ab 100644 --- a/angular/projects/admin/src/app/interfaces/elements/edit-interface-element.component.html +++ b/angular/projects/admin/src/app/interfaces/elements/edit-interface-element.component.html @@ -11,6 +11,8 @@

Edit Element

(cancel)="onCancel()" (update)="onUpdate()" (delete)="onDelete()" + [preTransformRecord]="preTransformRecord" + [transformRecord]="transformRecord" class="d-block col-xl-6"> diff --git a/angular/projects/admin/src/app/interfaces/elements/edit-interface-element.component.ts b/angular/projects/admin/src/app/interfaces/elements/edit-interface-element.component.ts index 1d60c2d6..cec7ae46 100644 --- a/angular/projects/admin/src/app/interfaces/elements/edit-interface-element.component.ts +++ b/angular/projects/admin/src/app/interfaces/elements/edit-interface-element.component.ts @@ -37,4 +37,18 @@ export class EditInterfaceElementComponent implements OnInit { onDelete() { this.onCancel(); } + + preTransformRecord(record: any) { + let newRecord = { ...record }; + newRecord.visibleIf = record.visibleIf ? JSON.stringify(record.visibleIf) : null; + newRecord.onChange = record.onChange ? JSON.stringify(record.onChange) : null; + return newRecord; + } + + transformRecord(record: any) { + let newRecord = { ...record }; + newRecord.visibleIf = record.visibleIf ? JSON.parse(record.visibleIf) : null; + newRecord.onChange = record.onChange ? JSON.parse(record.onChange) : null; + return newRecord; + } } diff --git a/angular/projects/admin/src/app/interfaces/elements/interface-element-form.component.html b/angular/projects/admin/src/app/interfaces/elements/interface-element-form.component.html index 76646dd2..5dffd6b5 100644 --- a/angular/projects/admin/src/app/interfaces/elements/interface-element-form.component.html +++ b/angular/projects/admin/src/app/interfaces/elements/interface-element-form.component.html @@ -39,3 +39,9 @@
+
+ +
+
+ +
diff --git a/angular/projects/admin/src/app/interfaces/elements/new-interface-element.component.ts b/angular/projects/admin/src/app/interfaces/elements/new-interface-element.component.ts index 0c2ca163..d595e76c 100644 --- a/angular/projects/admin/src/app/interfaces/elements/new-interface-element.component.ts +++ b/angular/projects/admin/src/app/interfaces/elements/new-interface-element.component.ts @@ -1,6 +1,5 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { pick } from 'lodash-es'; import { NavigationService } from 'shared'; @@ -24,10 +23,13 @@ export class NewInterfaceElementComponent implements OnInit { this.interfaceId = this.route.snapshot.parent?.parent?.parent?.params['id']; } - transformRecord = (record: any) => ({ - ...pick(record, ['nemsisElementId', 'screenId', 'position', 'column', 'customId']), - sectionId: this.sectionId, - }); + transformRecord = (record: any) => { + let newRecord = { ...record }; + newRecord.visibleIf = record.visibleIf ? JSON.parse(record.visibleIf) : null; + newRecord.onChange = record.onChange ? JSON.parse(record.onChange) : null; + newRecord.sectionId = this.sectionId; + return newRecord; + }; onCreate(record: any) { this.navigation.backTo(`/interfaces/${this.interfaceId}/screens/${this.screenId}/sections/${this.sectionId}`); diff --git a/routes/api/sectionElements.js b/routes/api/sectionElements.js index 7d6f9b6a..ec313484 100644 --- a/routes/api/sectionElements.js +++ b/routes/api/sectionElements.js @@ -47,7 +47,19 @@ router.post( interceptors.requireAdmin, helpers.async(async (req, res) => { const record = models.SectionElement.build( - _.pick(req.body, ['sectionId', 'nemsisElementId', 'screenId', 'position', 'column', 'customId', 'name', 'shortName', 'unit']), + _.pick(req.body, [ + 'sectionId', + 'nemsisElementId', + 'screenId', + 'position', + 'column', + 'customId', + 'name', + 'shortName', + 'unit', + 'visibleIf', + 'onChange', + ]), ); record.createdById = req.user.id; record.updatedById = req.user.id; @@ -64,7 +76,20 @@ router.patch( await models.sequelize.transaction(async (transaction) => { record = await models.SectionElement.findByPk(req.params.id, { transaction }); if (record) { - record.set(_.pick(req.body, ['nemsisElementId', 'screenId', 'position', 'column', 'customId', 'name', 'shortName', 'unit'])); + record.set( + _.pick(req.body, [ + 'nemsisElementId', + 'screenId', + 'position', + 'column', + 'customId', + 'name', + 'shortName', + 'unit', + 'visibleIf', + 'onChange', + ]), + ); record.updatedById = req.user.id; await record.save({ transaction }); } From f090a5b394997622ed2114e09153ecad322a9dc5 Mon Sep 17 00:00:00 2001 From: Francis Li Date: Fri, 28 Aug 2026 15:40:05 -0700 Subject: [PATCH 12/12] Add association between Screen and NemsisElement --- .../edit-interface-screen.component.html | 9 +++++-- .../interface-screen-form.component.html | 12 +++++++++ .../interface-screen-form.component.ts | 25 +++++++++++++++++-- ...828213129-add-nemsis-element-to-screens.js | 19 ++++++++++++++ models/screen.js | 1 + routes/api/interfaces.js | 1 + routes/api/screens.js | 6 ++--- 7 files changed, 66 insertions(+), 7 deletions(-) create mode 100644 migrations/20260828213129-add-nemsis-element-to-screens.js diff --git a/angular/projects/admin/src/app/interfaces/screens/edit-interface-screen.component.html b/angular/projects/admin/src/app/interfaces/screens/edit-interface-screen.component.html index d58db360..8c01179b 100644 --- a/angular/projects/admin/src/app/interfaces/screens/edit-interface-screen.component.html +++ b/angular/projects/admin/src/app/interfaces/screens/edit-interface-screen.component.html @@ -4,13 +4,14 @@

Edit Screen

@@ -22,10 +23,14 @@

Edit Screen

{{ record.name }}

-
+

{{ record.position }}

+
+ +

{{ record.nemsisElement.name }}

+
diff --git a/angular/projects/admin/src/app/interfaces/screens/interface-screen-form.component.html b/angular/projects/admin/src/app/interfaces/screens/interface-screen-form.component.html index 014f1d0d..12d8f1d1 100644 --- a/angular/projects/admin/src/app/interfaces/screens/interface-screen-form.component.html +++ b/angular/projects/admin/src/app/interfaces/screens/interface-screen-form.component.html @@ -4,3 +4,15 @@
+
+ +
diff --git a/angular/projects/admin/src/app/interfaces/screens/interface-screen-form.component.ts b/angular/projects/admin/src/app/interfaces/screens/interface-screen-form.component.ts index 8d8b40c6..6f569747 100644 --- a/angular/projects/admin/src/app/interfaces/screens/interface-screen-form.component.ts +++ b/angular/projects/admin/src/app/interfaces/screens/interface-screen-form.component.ts @@ -1,11 +1,32 @@ -import { Component, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; +import { HttpParams, HttpResponse } from '@angular/common/http'; +import { ActivatedRoute } from '@angular/router'; + +import { ApiService } from 'shared'; @Component({ selector: 'admin-interfaces-screen-form', templateUrl: './interface-screen-form.component.html', standalone: false, }) -export class InterfaceScreenFormComponent { +export class InterfaceScreenFormComponent implements OnInit { @Input() record: any = null; @Input() error: any = null; + + interfaceId?: string; + nemsisElementSearchParams = new HttpParams(); + nemsisElementFormatter = (result: any) => `${result.displayName} (${result.name})`; + + constructor( + private api: ApiService, + private route: ActivatedRoute, + ) {} + + ngOnInit() { + this.interfaceId = this.route.snapshot.parent?.params['id']; + this.api.interfaces.get(this.interfaceId ?? '').subscribe((res: HttpResponse) => { + const { nemsisVersion } = res.body; + this.nemsisElementSearchParams = this.nemsisElementSearchParams.set('nemsisVersion', nemsisVersion); + }); + } } diff --git a/migrations/20260828213129-add-nemsis-element-to-screens.js b/migrations/20260828213129-add-nemsis-element-to-screens.js new file mode 100644 index 00000000..33d3bcf8 --- /dev/null +++ b/migrations/20260828213129-add-nemsis-element-to-screens.js @@ -0,0 +1,19 @@ +/** @type {import('sequelize-cli').Migration} */ +module.exports = { + async up(queryInterface, Sequelize) { + await queryInterface.addColumn('screens', 'nemsis_element_id', { + type: Sequelize.UUID, + allowNull: true, + references: { + model: { + tableName: 'nemsis_elements', + }, + key: 'id', + }, + }); + }, + + async down(queryInterface, Sequelize) { + await queryInterface.removeColumn('screens', 'nemsis_element_id'); + }, +}; diff --git a/models/screen.js b/models/screen.js index 8a0792db..e3b6d70c 100644 --- a/models/screen.js +++ b/models/screen.js @@ -6,6 +6,7 @@ module.exports = (sequelize, DataTypes) => { Screen.belongsTo(models.Interface, { as: 'interface' }); Screen.belongsTo(models.User, { as: 'createdBy' }); Screen.belongsTo(models.User, { as: 'updatedBy' }); + Screen.belongsTo(models.NemsisElement, { as: 'nemsisElement' }); Screen.hasMany(models.Section, { as: 'sections', foreignKey: 'screenId' }); } } diff --git a/routes/api/interfaces.js b/routes/api/interfaces.js index 1af4edd5..e4b12a35 100644 --- a/routes/api/interfaces.js +++ b/routes/api/interfaces.js @@ -47,6 +47,7 @@ router.get( as: 'screens', order: [['position', 'ASC']], include: [ + 'nemsisElement', { model: models.Section, as: 'sections', diff --git a/routes/api/screens.js b/routes/api/screens.js index dfa19933..f937c956 100644 --- a/routes/api/screens.js +++ b/routes/api/screens.js @@ -32,7 +32,7 @@ router.get( interceptors.requireAdmin, helpers.async(async (req, res) => { const { id } = req.params; - const record = await models.Screen.findByPk(id); + const record = await models.Screen.findByPk(id, { include: ['nemsisElement'] }); if (record) { res.json(record.toJSON()); } else { @@ -45,7 +45,7 @@ router.post( '/', interceptors.requireAdmin, helpers.async(async (req, res) => { - const record = models.Screen.build(_.pick(req.body, ['interfaceId', 'name', 'position'])); + const record = models.Screen.build(_.pick(req.body, ['interfaceId', 'name', 'position', 'nemsisElementId'])); record.createdById = req.user.id; record.updatedById = req.user.id; await record.save(); @@ -61,7 +61,7 @@ router.patch( await models.sequelize.transaction(async (transaction) => { record = await models.Screen.findByPk(req.params.id, { transaction }); if (record) { - record.set(_.pick(req.body, ['name', 'position'])); + record.set(_.pick(req.body, ['name', 'position', 'nemsisElementId'])); record.updatedById = req.user.id; await record.save({ transaction }); }