Prognocis scrape info from account page v3

save the patient name from billing activity page for later use

Instalar este script¿?
Script recomendado por el autor

Puede que también te guste Prognocis Printable Ledger v3.

Instalar este script
// ==UserScript==
// @name         Prognocis scrape info from account page v3
// @namespace    http://www.hands-onortho.com
// @version      2024.11.01
// @description  save the patient name from billing activity page for later use
// @author       mrkrag
// @match        https://handsonortho.prognocis.com/prognocis/scrBillPatientAccount.jsp*
// @icon         https://images.squarespace-cdn.com/content/v1/64c7c183cb7ad4611b05dd20/5532a409-6956-49f0-892c-83db654276d8/favicon.ico
// @grant        none
// @license      MIT
// ==/UserScript==
// first we clear any values saved from prior uses
localStorage.removeItem('patientName');
localStorage.removeItem('patientAcct');
// now set a variable that is assigned to an identifiable element
// in this case we will select the first element with an id of 'top'
var row1 = document.querySelector("#top");
// this sets a variable for the patient name
// using queryselector we will select counting from the known id of 'top' to the first row and then the second cell
var ptname = document.querySelector("#top ~ tr td:nth-child(2)").textContent;
// now we save the textcontent of that cell to localstorage, assigning it a key of 'patientName' with a value of the variable 'ptname'
localStorage.setItem('patientName', ptname);
// do the same to get the next value, in this case the 2nd row and third cell after 'top'
var ptacct = document.querySelector("#top ~ tr:nth-child(2) td:nth-child(3)").textContent.substring(16, 24);
localStorage.setItem('patientAcct', ptacct);