Saturday, January 25, 2020

SDTM in a nutshell

Beautifully explained the practical methods for creating CDISC SDTM tables:

https://support.sas.com/resources/papers/proceedings/pdfs/sgf2008/207-2008.pdf

Golden words: Analyses are "one proc away" from ADaM data. 

Other important SAS related references:

SAS clinical questions and answers: https://tekslate.com/sas-clinical-interview-questions-and-answers

There is a listing of sample graphs and example code: https://support.sas.com/en/knowledge-base/graph-samples-gallery.html

Details of Oncology studies and a relation between SDTM, ADaM and Controlled Terminology: https://www.pharmasug.org/proceedings/2018/DS/PharmaSUG-2018-DS06.pdf

Powerpoint slides details on ADaM tables and RECIST 1.1: https://www.cytel.com/hubfs/0-library-0/pdfs/CDISCJourneyonSolidTumorusingRECIST1.1.pdf

Again, it is a listing of sample graphs: http://support.sas.com/sassamples/graphgallery/PROC_SGPLOT.html

https://www.cdisc.org/system/files/all/event/restricted/2018_US/6B-CDISC-ADaM_Overview_-_Minjoe.pdf

https://www.cdisc.org/system/files/all/event/restricted/2017_International/INTX17%20Session%203%20Track%20A_Soloff.pdf

https://www.lexjansen.com/pharmasug/2018/DS/PharmaSUG-2018-DS24.pdf

https://www.lexjansen.com/pharmasug/2010/HW/HW06.pdf

https://www.quantics.co.uk/blog/an-introduction-to-integrated-summary-of-safety-and-integrated-summary-of-effectiveness-iss-and-ise/

https://blogs.sas.com/content/iml/2011/09/19/count-the-number-of-missing-values-for-each-variable.html

https://blogs.sas.com/content/iml/2012/04/02/count-missing-values-in-observations.html

https://journals.lww.com/anesthesia-analgesia/Fulltext/2018/09000/Survival_Analysis_and_Interpretation_of.32.aspx

https://www.lexjansen.com/pharmasug-cn/2014/CD/PharmaSUG-China-2014-CD03.pdf

https://www.lexjansen.com/phuse/2018/ds/DS03_ppt.pdf

Graphs from Robert Allison: https://robslink.com/SAS/Home.htm

About ADaM flags: https://www.pharmasug.org/proceedings/2013/PO/PharmaSUG-2013-PO11.pdf

http://www.stattutorials.com/SAS/

Oncology Survival Plot: https://support.sas.com/rnd/datavisualization/papers/Annotate_Your_SGPLOT_Graphs.pdfhttps://support.sas.com/rnd/datavisualization/papers/Annotate_Your_SGPLOT_Graphs.pdf

Survival analysis (Time-to-event analysis) is the process of measuring the length of time to the event. The event could be progress-free survival or overall survival or objective response rate. It may not be possible to measure the length of time for some patients because the patient disappeared or a bus hit him, or the study called off, etc. The missing data related to that patient is called the censored data.

Proc lifetest is useful to get the survival plot in a clinical trial. Also it provides multiple survival plots between two treatments. In the TIME statement, the survival time variable, Days, is crossed with the censoring variable, Status, with the value 0 indicating censoring.


The ADSL data structure has one record for one subject and contains subject-level population flags indicating whether subjects are in efficacy, safety, pharmacokinetic, pharmacodynamic, food effect, or dose proportionality analyses. In the Basic Data Structure (BDS) data sets, common record-level analysis flags include: recheck flags, flags for exclusion, baseline flags, early termination identifiers, and treatment-emergent flags.



Thursday, January 16, 2020

Free, free, free ReactJS templates

Isn't it beautiful if you can find some free templates that makes your job simpler to build a ReactJs app?

Here you go: https://colorlib.com/wp/free-react-templates/

Another life saver with the templates: https://bootstrapious.com/p/bootstrap-sidebar (all you got to do is go to demo pages, view source, and customize it to your requirement) %3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22WS%22%20style%3D%22rounded%3D0%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22849%22%20y%3D%22295%22%20width%3D%2235%22%20height%3D%2230%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E


Saturday, January 11, 2020

What to prepare when applying for a JavaScript position?


What to prepare:

  1. Core JavaScript concepts: 10 things to learn during a weekend
  2. Building NPM packages, publishing, and importing
  3. Building an application with an express server
  4. Two ways of creating a react app: from scratch and from create-react-app
  5. Build react app with a fake server for API testing
  6. Git repos and commands
  7. Responsive web design, (can this make the process simpler: react-responsive-navbar)
  8. CSS approaches: SCSS files, bootstrap, css modules, media-queries
  9. ReactJs routing, hooks, using context & HIC, child as a function
  10. Some examples of Jest unit testing
  11. Some examples of Ajax call testing
  12. Feature testing: Selenium, Cypress
  13. Responsive web design
  14. A11y
  15. ESLinting
  16. Build and deploy process
  17. CodeSandBox and CodePen
  18. Workshop

Core JavaScript concepts:

Function objects:

  • Functions are function objects. In JavaScript, anything that is not a primitive type ( undefined, null, boolean, number, or string) is an object. Objects in JavaScript are extremely versatile. Because of this, we can even pass a function as a parameter into another function.

Callback functions:

  • callback is a function that is to be executed after another function has finished executing — hence the name 'call back'.
  • Example: setTimeout(function() {console.log('I am the response from callback function')}, 300)

Promises: 
Use Promise API to use asynchronous code. Create promise object using Promise API, access the asynchronous code response using promise.then.
Example: 
let promise = new Promise(a callback function); 
// By the way, this callback takes two parameters resolve and reject that are functions too, so…
let resolve = function(){}
let reject = function(){}
let promise = new Promise(function(resolve, reject) {
// do your async code here…
// If successful, call resolve function
// If failure, call reject function
});
promise.then to handle the data returned by either resolve or reject

Nobody can explain promises better than this guy: https://www.sitepoint.com/overview-javascript-promises/

Closures:
A Closure is nothing but a function that has access to the variables defined in outer (and enclosing) function. 
As far as scope is concerned, the closure has access to global variables, its own variables, and variables of outer (and enclosing) function.
Example:
const myFunctionTwo = () => {  
   const message = 'My New Message';  
   const printMessage = () => {  
     console.log(message);  
   }  
   return printMessage;  
 }  
 const myPrintMessage = myFunctionTwo();  
 myPrintMessage();
// prints My New Message

Currying:
The curried effect is achieved by binding some of the arguments to the first function invoke, so that those values are fixed for the next invocation. It’s something like keeping masala ready and cook either chicken, goat, beef with ease.
Example:
var all_you_have_to_do_is_specify_masala = function(masala) {
return cook_with_masala = function(b){
console.log('i cooked ' + b + ' with ' + masala)
}
}
let use_ramesh_recipe = all_you_have_to_do_is_specify_masala ('masala made with garlic, ginger, spices')
use_ramesh_recipe('chicken')
use_ramesh_recipe('goat')

JavaScript making HTTP requests
The XMLHttpRequest object can be used to request data from a web server.
Example:
const puzzleAPIhit = () => {  
   const request = new XMLHttpRequest()  
   request.addEventListener('readystatechange', (e) => {  
     if (e.target.readyState === 4 && e.target.status === 200) {  
       const data = JSON.parse(e.target.responseText);  
       console.log(data.puzzle)  
     } else if (e.target.readyState === 4) {  
       console.log('An error has taken place')  
     }  
   })  
   request.open('GET', 'https://puzzle.mead.io/puzzle?wordCount=3')  
   request.send()  
 }  
 puzzleAPIhit(); 

Fetch API:
The Fetch API introduced in relatively newer versions of JavaScript and has built-in support for Promises. Technically, it is just another method of hitting HTTP Requests while harnessing the powers and perks of Promises and Promise Chaining.
fetch('http://puzzle.mead.io/puzzle', {}).then((response) => {  
   if (response.ok) {  
     return response.json();  
     /*  
       Actually, the .json() method takes the response and returns a Promise Object and hence  
       We need to add another then() as we have done in Promise Chaining   
     */  
   } else {  
     throw new Error('Unable to fetch the puzzle');  
   }  
 }).then((data) => {  
   console.log(data.puzzle);  
 }).catch((error) => {  
   console.log(error);  
 }); 

Object Oriented Programming (OOP) in JavaScript:

OOP describes a way to write programs. This way focuses on data: stored as object properties, and actions: stored as object methods.










Building an application with an express server: 



Creating a React app from scratch:



Creating a web site using MEAN stack:



Build react app with a fake server for API testing

Spring Boot + React application

Could this process be easier than this?

https://dzone.com/articles/spring-boot-and-react-happily-ever-after