Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev -> Stage Sync (June 2024) #716

Merged
merged 35 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
0aa4246
add bswh references, comments, ship locations will need cids
Gbarra9 Apr 23, 2024
112045c
add to field concepts
Gbarra9 Apr 23, 2024
4b69f75
Add new collection and site location NTX biorepository, add info to b…
Gbarra9 May 1, 2024
46cca9d
add ntx to fieldmapping
Gbarra9 May 1, 2024
d64de98
update site name to BCC- HWC, BC and add reference numbers
Gbarra9 May 6, 2024
d16373b
remove bswh comments
Gbarra9 May 10, 2024
ab979eb
Merge branch 'dev' into issue#885-bswh-site
Gbarra9 May 14, 2024
cda554b
change reference to baylorSWH and styling
Gbarra9 May 14, 2024
40dbe10
change to BSWH
Gbarra9 May 14, 2024
53a5c1b
Merge pull request #706 from episphere/issue#885-bswh-site
Gbarra9 May 23, 2024
65ef738
sort collection and shipping location dropdown and rename locations
Gbarra9 May 31, 2024
9c4a6bf
remove log statement
Gbarra9 May 31, 2024
bc254bd
Merge pull request #710 from episphere/bswh-rename-locations-and-alph…
Gbarra9 May 31, 2024
41d120f
Move email templates out
we-ai May 31, 2024
693b4e3
Fix merge conflicts
we-ai May 31, 2024
9d987c0
Replace raw concept IDs
we-ai Jun 3, 2024
1b839a5
Merge pull request #711 from episphere/move-email-templates-out
we-ai Jun 4, 2024
2742ef1
Add and check login details
we-ai Jun 6, 2024
17505c9
Package Receipt page now validates all required fields, not just pack…
amber-emmes Jun 6, 2024
22578e6
Merge pull request #712 from episphere/add-login-details
we-ai Jun 7, 2024
4af785a
add to SSOConfig obj
Gbarra9 Jun 7, 2024
dfa592d
remove unused function params, refactor ssoconfig function, rename in…
Gbarra9 Jun 10, 2024
ade3822
arrange obj order
Gbarra9 Jun 10, 2024
7a938ea
Merge pull request #714 from episphere/biospecimen-add-to-SSO-Config-…
Gbarra9 Jun 10, 2024
fe15976
Assign Kits and Kit Assembly pages now automatically trim FedEx barco…
amber-emmes Jun 12, 2024
9692f5f
Merge pull request #715 from episphere/1033-fix
amber-emmes Jun 12, 2024
bddeb9d
Added new line before validatePackageInformation definition
amber-emmes Jun 12, 2024
3bb1212
Variable name change in kitsReceipt
amber-emmes Jun 12, 2024
d6e6c81
Merge branch '1022-fix' of github.com:episphere/biospecimen into 1022…
amber-emmes Jun 12, 2024
0a98b54
Merge pull request #713 from episphere/1022-fix
amber-emmes Jun 13, 2024
73b53bc
Resolved an issue where the new validation for kits receipt would sti…
amber-emmes Jun 14, 2024
df6ea1d
Merge pull request #717 from episphere/1022-followup
amber-emmes Jun 14, 2024
8624581
vialMapping in kit CSV now has home collection values for all sites, …
amber-emmes Jun 14, 2024
7287f16
Addressed PR comments
amber-emmes Jun 14, 2024
e0faca5
Merge pull request #718 from episphere/989-fix
amber-emmes Jun 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 19 additions & 39 deletions src/dev/identityProvider.js
Original file line number Diff line number Diff line change
@@ -1,40 +1,20 @@
export const devSSOConfig = (tenantID, provider, inputValue) => {
if (/nih.gov/i.test(inputValue)) {
tenantID = 'NIH-SSO-qfszp';
provider = 'saml.nih-sso';
}
if (/healthpartners.com/i.test(inputValue)) {
tenantID = 'HP-SSO-wb1zb';
provider = 'saml.healthpartner';
}
if (/hfhs.org/i.test(inputValue)) {
tenantID = 'HFHS-SSO-ay0iz';
provider = 'saml.connect-hfhs';
}
if (/sanfordhealth.org/i.test(inputValue)) {
tenantID = 'SFH-SSO-cgzpj';
provider = 'saml.connect-sanford';
}
if (/uchicago.edu/i.test(inputValue)) {
tenantID = 'UCM-SSO-tovai';
provider = 'saml.connect-uchicago';
}
if (/norc.org/i.test(inputValue)) {
tenantID = 'NORC-SSO-dilvf';
provider = 'saml.connect-norc';
}
if (/kp.org/i.test(inputValue)) {
tenantID = 'KP-SSO-wulix';
provider = 'saml.connect-kp';
}
if (/marshfieldresearch.org/i.test(inputValue) || /marshfieldclinic.org/i.test(inputValue)) {
tenantID = 'MFC-SSO-fljvd';
provider = 'saml.connect-mfc'
}
if (/bswhealth.org/i.test(inputValue)) {
tenantID = 'BSWH-SSO-y2jj3';
provider = 'saml.connect-bswh';
}

return { tenantID, provider }
export const devSSOConfig = (email) => {
const ssoConfigs = [
{ tenantID: 'NIH-SSO-qfszp', provider: 'saml.nih-sso', regex: /nih.gov/i },
{ tenantID: 'HP-SSO-wb1zb', provider: 'saml.healthpartner', regex: /healthpartners.com/i },
{ tenantID: 'HFHS-SSO-ay0iz', provider: 'saml.connect-hfhs', regex: /hfhs.org/i },
{ tenantID: 'SFH-SSO-cgzpj', provider: 'saml.connect-sanford', regex: /sanfordhealth.org/i },
{ tenantID: 'UCM-SSO-tovai', provider: 'saml.connect-uchicago', regex: /uchicago.edu/i },
{ tenantID: 'NORC-SSO-dilvf', provider: 'saml.connect-norc', regex: /norc.org/i },
{ tenantID: 'KP-SSO-wulix', provider: 'saml.connect-kp', regex: /kp.org/i },
{ tenantID: 'MFC-SSO-fljvd', provider: 'saml.connect-mfc', regex: /(marshfieldresearch.org|marshfieldclinic.org)/i },
{ tenantID: 'BSWH-SSO-y2jj3', provider: 'saml.connect-bswh', regex: /bswhealth.org/i }
];

for (const ssoConfig of ssoConfigs) {
if (ssoConfig.regex.test(email)) {
return { tenantID: ssoConfig.tenantID, provider: ssoConfig.provider };
}
}
return { tenantID: '', provider: '' };
}
136 changes: 0 additions & 136 deletions src/emailTemplates.js

This file was deleted.

77 changes: 48 additions & 29 deletions src/fieldToConceptIdMapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ export const conceptIds = {
refusedAllFutureActivities: 458508122,
deceased: 618686157
},
authenticationEmail: 421823980,
authenticationPhone: 348474836,
signInMechanism: 995036844,
preferredEmail: 869588347,
preferredLanguage: 255077064,
english: 163149180,
spanish: 773342525,

// Individual yes/no properties on the data
withdrewConsent: 747006172,
Expand Down Expand Up @@ -132,6 +139,7 @@ export const conceptIds = {
},
checkOutDateTime: 343048998,
checkInDateTime: 840048338,
checkInComplete: 135591601,

// not shipped specimen deviation id
brokenSpecimenDeviation: 472864016,
Expand Down Expand Up @@ -262,36 +270,42 @@ export const conceptIds = {
},

collectionLocationMapping: {
777644826 : 'UC-DCAM',
692275326 : 'Marshfield',
813701399 : 'Weston',
698283667 : 'Lake Hallie',
834825425 : 'HP Research Clinic',
574368418 : "HP Park Nicollet",
736183094 : 'HFH K-13 Research Clinic',
886364332 : 'HFH Cancer Pavilion Research Clinic',
706927479 : 'HFH Livonia Research Clinic',
322059622 : "HFH Pop-Up",
589224449 : 'Sioux Falls Imagenetics',
127626388 : "Bismarck Medical Center",
777644826: 'UC-DCAM',
692275326: 'Marshfield',
813701399: 'Weston',
698283667: 'Lake Hallie',
834825425: 'HP Research Clinic',
574368418: "HP Park Nicollet",
736183094: 'HFH K-13 Research Clinic',
886364332: 'HFH Cancer Pavilion Research Clinic',
706927479: 'HFH Livonia Research Clinic',
322059622: "HFH Pop-Up",
589224449: 'Sioux Falls Imagenetics',
127626388: "Bismarck Medical Center",
246137578: 'Sioux Falls Sanford Center',
145191545 : 'Ingalls Harvey',
489380324 : 'River East',
319518299 : 'UCM Pop-Up',
940329442 : 'Orland Park',
567969985 : 'MF Pop-Up',
120264574 : 'South Loop',
691714762 : 'Rice Lake',
487512085 : 'Wisconsin Rapids',
983848564 : 'Colby Abbotsford',
261931804 : 'Minocqua',
665277300 : 'Merrill',
467088902 : 'Fargo South University',
111111111 : 'NIH/NCI',
807835037 : 'Other'
145191545: 'Ingalls Harvey',
489380324: 'River East',
319518299: 'UCM Pop-Up',
940329442: 'Orland Park',
567969985: 'MF Pop-Up',
120264574: 'South Loop',
691714762: 'Rice Lake',
487512085: 'Wisconsin Rapids',
983848564: 'Colby Abbotsford',
261931804: 'Minocqua',
665277300: 'Merrill',
467088902: 'Fargo South University',
111111111: 'NIH/NCI',
807835037: 'Other',
723351427: 'BCC- HWC',
807443231: 'FW All Saints',
475614532: 'BCC- Plano',
809370237: 'BCC- Worth St',
856158129: 'BCC- Irving',
436956777: 'NTX Biorepository'
},

nameToKeyObj : {
nameToKeyObj: {
'ucDcam': 777644826,
'marshfield': 692275326,
'weston': 813701399,
Expand Down Expand Up @@ -319,8 +333,13 @@ export const conceptIds = {
"ucmPopUp": 319518299,
"orPark": 940329442,
"mfPopUp": 567969985,
'bccHwc': 723351427,
'bccAllSaints': 807443231,
'bccPlano': 475614532,
'bccWorthSt': 809370237,
'bccIrving': 856158129,
'ntxBiorepo': 436956777,
'all': 1000

},
boxedStatus: 771580890,
notBoxed: 657483796,
Expand Down Expand Up @@ -395,4 +414,4 @@ export const packageConditionConversion = {
"541085383": "Incorrect Material Type Returned",
"427719697": "Collection Cup Not Returned",
"100618603": "Other"
}
};
9 changes: 8 additions & 1 deletion src/pages/homeCollection/assignKits.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,14 @@ const assignKitsTemplate = async (name) => {
scannedBarcode2.onpaste = e => e.preventDefault();
scannedBarcode2.addEventListener("input", (e) => {
const scannedBarcodeValue = document.getElementById('scannedBarcode').value.trim();
const scannedBarcode2Value = e.target.value.trim();
let scannedBarcode2Value = e.target.value.trim();

// Trim FedEx tracking numbers (1033)
// Already done for the scannedBarcode input in checkTrackingNumberSource
if (scannedBarcode2Value.length === 34) {
scannedBarcode2Value = scannedBarcode2Value.slice(-12);
e.target.value = scannedBarcode2Value;
}

if(scannedBarcodeValue && scannedBarcode2Value && scannedBarcodeValue !== scannedBarcode2Value) {
const msg = 'Supply Kit Tracking Number doesn\'t match';
Expand Down
19 changes: 15 additions & 4 deletions src/pages/homeCollection/kitAssembly.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ const kitAssemblyTemplate = async (name) => {
<div class="col-md-8">
<div class="form-group row">
<input type="text" class="form-control" id="scannedBarcode" placeholder="Scan Barcode" required />
<span id="showMsg" style="font-size: 14px;"></span>
</div>
<label for="scannedBarcode2" class="sr-only">Confirm Return Kit Tracking Number</label>
<div class="form-group row">
<input autocomplete="off" type="text" class="form-control" id="scannedBarcode2" placeholder="Re-Enter (scan/type) Barcode" required />
<span id="showMsg" style="font-size: 14px;"></span>
<span id="showErrorMsg" style="font-size: 14px;"></span>
</div>
</div>
</div>
Expand Down Expand Up @@ -100,14 +101,23 @@ const kitAssemblyTemplate = async (name) => {
// Set up automatic tabbing between inputs upon scanning (assuming the scanner automatically inputs the enter key at the end)
autoTabAcrossArray(['scannedBarcode', 'scannedBarcode2', 'supplyKitId', 'returnKitId', 'cupId', 'cardId']);

document.getElementById('scannedBarcode2').onpaste = e => e.preventDefault();
const scannedBarcode2 = document.getElementById('scannedBarcode2');
scannedBarcode2.onpaste = e => e.preventDefault();
numericInputValidator(['scannedBarcode', 'scannedBarcode2']);
activeHomeCollectionNavbar();
processAssembledKit();
enableEnterKeystroke();
dropdownTrigger('Select Kit Type');
checkTrackingNumberSource();
performQCcheck('scannedBarcode2', 'scannedBarcode', 'showMsg', `Return Kit Tracking Number doesn't match`);
// Trim FedEx tracking numbers (1033)
// Already done for the scannedBarcode input in checkTrackingNumberSource
scannedBarcode2.addEventListener("input", (e) => {
const input = e.target.value.trim();
if (input.length === 34) {
e.target.value = input.slice(-12);
}
});
performQCcheck('scannedBarcode2', 'scannedBarcode', 'showErrorMsg', `Return Kit Tracking Number doesn't match`);
performQCcheck('returnKitId', 'supplyKitId', 'showReturnKitErrorMsg', `Supply Kit & Return Kit need to be same`);
performQCcheck('cardId', 'cupId', 'showCardIdErrorMsg', `Cup ID & Card ID need to be same`);
};
Expand Down Expand Up @@ -167,6 +177,7 @@ const processAssembledKit = () => {
document.getElementById('cupId').value = ``;
document.getElementById('cardId').value = ``;
document.getElementById("showMsg").innerHTML = ``;
document.getElementById("showErrorMsg").innerHTML = ``;
}
} catch (error) {
console.error(error);
Expand Down Expand Up @@ -310,7 +321,7 @@ const storeAssembledKit = async (kitData) => {
const alertTemplate = (message, status = "warn", duration = 3000) => {
if (status === "success") {
performQCcheck('returnKitId', 'supplyKitId', 'showReturnKitErrorMsg', ``);
performQCcheck('scannedBarcode2', 'scannedBarcode', 'showMsg', ``);
performQCcheck('scannedBarcode2', 'scannedBarcode', 'showErrorMsg', ``);
performQCcheck('cardId', 'cupId', 'showCardIdErrorMsg', ``);
alert = `
<div id="alert-success" class="alert alert-success alert-dismissible fade show" role="alert">
Expand Down
Loading