(35S) HP35s  Medical applications

04082020, 07:53 AM
(This post was last modified: 05032020 07:37 PM by Gene.)
Post: #1




(35S) HP35s  Medical applications
I never saw any medical application or equation listed for HP35s. I have developed some programs and equations for my job. The first is an Acid/Based disorder analyzer based on Arterial Blood Gas analysis. It is based on 2 different algorithms, a decision tree and an equation based algorithm and it can give from one to three answers. You can find it at https://github.com/drmchris21/ABGCalculatorHP35s. There is also a HP Prime version.


04082020, 02:02 PM
Post: #2




RE: HP35s  Medical applications
Nice to have different applications for this great HP calculator. Could you please bring some support literature and some numeric examples to show how it works (input and outputs). Thank you in advance. Pedro


04082020, 08:30 PM
Post: #3




RE: HP35s  Medical applications
The algorithm first follows a decision tree. Each node is a Yes/No question based on a single parameter. Finally it reaches the first answer out of 22 predefined. Then, according to the first answer it calculates some scores to find if there is a compensation. This is the second answer and in most cases is the same or similar with the first. Then if there is an aniongap it runs a final calculation to find a third answer with the type of aniongap disorder.
I tried to reduce the program to one label only, so it's spaghetti code. Is more helpful to study the similar algorithms of for the HP Prime here https://github.com/drmchris21/ABGCalculatorPerl, and for Perl here https://github.com/drmchris21/ABGCalculatorPerl to find out how it works. 

04082020, 08:47 PM
(This post was last modified: 05012020 09:47 AM by mchris.)
Post: #4




RE: HP35s  Medical applications
The second medical stuff I post is a CKDEPI equation. The CKDEPI equation is for calculating the estimated GFR of a patient with chronic kidney failure. It is a complicated equation with 4 piecewise functions and 2 min/max functions.
The HP35s lacks both. It is easy to write a program to emulate them but I wanted to write the whole thing as an equation. Here comes linear algebra for the rescue. The equation has a term k. k is a function itself with a term 0.9 if it is a man or 0.7 if it is a woman. I wanted to write 1 for a man, 2 for a woman, 1 for nonblack, 2 for black. There must be a system of equations 1x+y=0.9 and 2x+y=0.7 to solve to replace the piecewise function k. The same goes for term α and for the last two terms (1.018 if male, 1.159 if black). And finally I replaced min(a,b) and max(a,b) functions with a+babs(ab) and a+b+abs(ab) (thanks to this forum). The final equation is: 141*((1+C/(S*0,2+1,1)abs(1C/(S*0,2+1,1)))/2)^(S*0,0820,493)*((1+C/(S*0,2+1,1)+abs(1C/(S*0,2+1,1)))/2)^1,209*0,993^A*(S*0,018+0,982)*(R*0,159+0,841) 

04262020, 08:23 PM
Post: #5




RE: HP35s  Medical applications
I continue on the CKDEPI formula. In order to make the formula shorter (and a bit faster) I reuse the A (Age) register after consume its computation.
A: Age C: Serum Creatinine (mg/dL) S: Sex (1=male, 2=female) R: Race (1=non African American, 2=African American) 141*0,993^A*((1+(C/(S*0,2+1,1)►A)abs(1A))/2)^(S*0,0820,493)*((1+(C/(S*0,2+1,1)►A)+abs(1A))/2)^1,209*(S*0,018+0,982)*(R*0,159+0,841) 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)