-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add migration for localexceptioncips table data
- Add SQL script to insert records into the localexceptioncips table for Passaic County. - Add corresponding down script to remove the inserted records. - Includes SOC, occupation, CIP codes, and descriptions for medical-related field: 29-2072 Medical Records Specialists 29-9021 Health Information Technologists and Medical Registrars
- Loading branch information
Showing
3 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
backend/migrations/20250121231229-njwe-2618-etpl-add-local-indemand-passaic-county.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
'use strict'; | ||
|
||
var dbm; | ||
var type; | ||
var seed; | ||
var fs = require('fs'); | ||
var path = require('path'); | ||
var Promise; | ||
|
||
/** | ||
* We receive the dbmigrate dependency from dbmigrate initially. | ||
* This enables us to not have to rely on NODE_PATH. | ||
*/ | ||
exports.setup = function(options, seedLink) { | ||
dbm = options.dbmigrate; | ||
type = dbm.dataType; | ||
seed = seedLink; | ||
Promise = options.Promise; | ||
}; | ||
|
||
exports.up = function(db) { | ||
var filePath = path.join(__dirname, 'sqls', '20250121231229-njwe-2618-etpl-add-local-indemand-passaic-county-up.sql'); | ||
return new Promise( function( resolve, reject ) { | ||
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){ | ||
if (err) return reject(err); | ||
console.log('received data: ' + data); | ||
|
||
resolve(data); | ||
}); | ||
}) | ||
.then(function(data) { | ||
return db.runSql(data); | ||
}); | ||
}; | ||
|
||
exports.down = function(db) { | ||
var filePath = path.join(__dirname, 'sqls', '20250121231229-njwe-2618-etpl-add-local-indemand-passaic-county-down.sql'); | ||
return new Promise( function( resolve, reject ) { | ||
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){ | ||
if (err) return reject(err); | ||
console.log('received data: ' + data); | ||
|
||
resolve(data); | ||
}); | ||
}) | ||
.then(function(data) { | ||
return db.runSql(data); | ||
}); | ||
}; | ||
|
||
exports._meta = { | ||
"version": 1 | ||
}; |
11 changes: 11 additions & 0 deletions
11
.../migrations/sqls/20250121231229-njwe-2618-etpl-add-local-indemand-passaic-county-down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
delete from localexceptioncips where | ||
(soc = '29-2072' and occupation = 'Medical Records Specialists' and county = 'PASSAIC' and cip = '51.0706' and cipdescription = 'Health Information/Medical Records Administration/Administrator.' and cipcode = '510706') or | ||
(soc = '29-2072' and occupation = 'Medical Records Specialists' and county = 'PASSAIC' and cip = '51.0707' and cipdescription = 'Health Information/Medical Records Technology/Technician.' and cipcode = '510707') or | ||
(soc = '29-2072' and occupation = 'Medical Records Specialists' and county = 'PASSAIC' and cip = '51.0713' and cipdescription = 'Medical Insurance Coding Specialist/Coder.' and cipcode = '510713') or | ||
(soc = '29-2072' and occupation = 'Medical Records Specialists' and county = 'PASSAIC' and cip = '51.0721' and cipdescription = 'Disease Registry Data Management.' and cipcode = '510721') or | ||
(soc = '29-9021' and occupation = 'Health Information Technologists and Medical Registrars' and county = 'PASSAIC' and cip = '51.0706' and cipdescription = 'Health Information/Medical Records Administration/Administrator.' and cipcode = '510706') or | ||
(soc = '29-9021' and occupation = 'Health Information Technologists and Medical Registrars' and county = 'PASSAIC' and cip = '51.0707' and cipdescription = 'Health Information/Medical Records Technology/Technician.' and cipcode = '510707') or | ||
(soc = '29-9021' and occupation = 'Health Information Technologists and Medical Registrars' and county = 'PASSAIC' and cip = '51.0713' and cipdescription = 'Medical Insurance Coding Specialist/Coder.' and cipcode = '510713') or | ||
(soc = '29-9021' and occupation = 'Health Information Technologists and Medical Registrars' and county = 'PASSAIC' and cip = '51.0721' and cipdescription = 'Disease Registry Data Management.' and cipcode = '510721') or | ||
(soc = '29-9021' and occupation = 'Health Information Technologists and Medical Registrars' and county = 'PASSAIC' and cip = '51.0723' and cipdescription = 'Healthcare Information Privacy Assurance and Security.' and cipcode = '510723') or | ||
(soc = '29-9021' and occupation = 'Health Information Technologists and Medical Registrars' and county = 'PASSAIC' and cip = '51.2706' and cipdescription = 'Medical Informatics.' and cipcode = '512706'); |
10 changes: 10 additions & 0 deletions
10
...nd/migrations/sqls/20250121231229-njwe-2618-etpl-add-local-indemand-passaic-county-up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
insert into localexceptioncips (soc, occupation, county, cip, cipdescription, cipcode) values ('29-2072', 'Medical Records Specialists', 'PASSAIC', '51.0706', 'Health Information/Medical Records Administration/Administrator.', '510706'); | ||
insert into localexceptioncips (soc, occupation, county, cip, cipdescription, cipcode) values ('29-2072', 'Medical Records Specialists', 'PASSAIC', '51.0707', 'Health Information/Medical Records Technology/Technician.', '510707'); | ||
insert into localexceptioncips (soc, occupation, county, cip, cipdescription, cipcode) values ('29-2072', 'Medical Records Specialists', 'PASSAIC', '51.0713', 'Medical Insurance Coding Specialist/Coder.', '510713'); | ||
insert into localexceptioncips (soc, occupation, county, cip, cipdescription, cipcode) values ('29-2072', 'Medical Records Specialists', 'PASSAIC', '51.0721', 'Disease Registry Data Management.', '510721'); | ||
insert into localexceptioncips (soc, occupation, county, cip, cipdescription, cipcode) values ('29-9021', 'Health Information Technologists and Medical Registrars', 'PASSAIC', '51.0706', 'Health Information/Medical Records Administration/Administrator.', '510706'); | ||
insert into localexceptioncips (soc, occupation, county, cip, cipdescription, cipcode) values ('29-9021', 'Health Information Technologists and Medical Registrars', 'PASSAIC', '51.0707', 'Health Information/Medical Records Technology/Technician.', '510707'); | ||
insert into localexceptioncips (soc, occupation, county, cip, cipdescription, cipcode) values ('29-9021', 'Health Information Technologists and Medical Registrars', 'PASSAIC', '51.0713', 'Medical Insurance Coding Specialist/Coder.', '510713'); | ||
insert into localexceptioncips (soc, occupation, county, cip, cipdescription, cipcode) values ('29-9021', 'Health Information Technologists and Medical Registrars', 'PASSAIC', '51.0721', 'Disease Registry Data Management.', '510721'); | ||
insert into localexceptioncips (soc, occupation, county, cip, cipdescription, cipcode) values ('29-9021', 'Health Information Technologists and Medical Registrars', 'PASSAIC', '51.0723', 'Healthcare Information Privacy Assurance and Security.', '510723'); | ||
insert into localexceptioncips (soc, occupation, county, cip, cipdescription, cipcode) values ('29-9021', 'Health Information Technologists and Medical Registrars', 'PASSAIC', '51.2706', 'Medical Informatics.', '512706'); |