Friday, July 31, 2009
One challenge I find is that most users that work with clinical data are either data managers or SAS analysts who are responsible on generating the DEFINE.XML, do not understand XML. Syntactically, XML is a mark up language and the schema it uses is not rocket science. However, its requires a very different skill set since most users are familiar with SAS or SQL and does not really normally work with XML or the XSL that accompanies it for display. SAS’s attempt at implementing PROC CDISC in my opinion has come up short in closing this gap. Many users are therefore faced with the challenge of looking through the XSD files to understand the structure of the XML file. This is like trying to pick up Japanese when you have been using English for many years.
XML is useful for both storing data and describing data. Its accompanying tools such as XSL can also make use out of the data stored to have very useful functionality. For example, a XML file coupled with the right XSL can result in an HTML or even an Excel XLS looking result. I tried using some of these techniques in resolving the problem I see between SAS analysts and the need for generating DEFINE.XML. You can log in and sign up for free to try out Definedoc and how it can capture the metadata from SAS dataset to then generate a DEFINE.XML. This can be done without having to understand the XSD and XSL that accompanies it. I prefer to jump into a car and use it to get me from point A to B rather than learning all the details of the internal combustion engine. I hope this solution can help to close the gap and allow users to easily work with XML to gain the value it gives you as a powerful file format.
Thursday, July 30, 2009
Wednesday, July 29, 2009
Tuesday, July 28, 2009
Monday, July 27, 2009
Saturday, July 25, 2009
I have been experimenting with a method where a Facebook account can be synchronized with Syview so that users do not have to use separate accounts. In this case, the user can use their Facebook account and also log into Syview to view SAS datasets.
I have an identify crisis sometimes with my personal use of social network and my professional online persona. Wouldn’t it be nice if I can reconcile this identity crisis. At the very least, with the user ID.
Thursday, July 23, 2009
Monday, July 20, 2009
DEFINE.XML - A Practical Hands on Real World Experiences on Data Definition
Date Wednesday, September 2, 2009
Where Fairmont San Jose in San Jose, California
As CDISC guidelines nears becoming a regulation, it becomes apparent for the need of an effective method for documenting and communicating metadata to facilitate the review of clinical data during a submission. DEFINE.XML has proven in initial implementations and FDA pilot project to be an essential part in helping reviewers navigate data and related reports while also pointing out the needed improvements and challenges from implementing this in XML. This panel discussion will highlight real world examples of various approaches and shares lesson learned and innovative unique approaches. This includes technical techniques using SAS and processes and methodologies that spans any specific technologies.
Sunday, July 19, 2009
Software in every industry is no longer going to be only made available through the 500 pound guerilla within their own sectors as delivered in a box. There is a shift was more interesting, innovative and more niche applications are coming out and are finding their own audience. Similar to how Amazon pave the way for less known books or iTunes pave the way for music, the AppStore will streamline software delivery to bring about a whole new set of niche applications that will augment and displace the older model of software as we know it.
Tuesday, July 14, 2009
Each application server communicates to its corresponding iPhone application through its own assigned TCP Socket port. This ensures that there is no collision between multiple applications for optimal performance. If needed, it is optional to increase the number of ports to handle many requests. In this case, a separate SAS session is started on the server running simultaneously to enable greater bandwidth.
There are two distinct roles that users play to enable the delivery of SAS data and programs to the iPhone including an administrator and the iPhone user. The administrator is usually the SAS analyst or statistician that developed and manages the data and SAS program on the server. The iPhone user receives the reports and data onto their iPhone. Before a user can access SAS programs and data, the following steps are taken to ensure proper security.
Step 1 – Account Setup
An account is set up on the server with the proper credentials in order to identify and authorize the user. The key attributes needed to authenticate the user include a unique user ID and user defined password.
Step 2 – User Privileges
By default, the user only has access to a set of sample SAS macro programs and datasets that come with the system. In order to deliver real information, additional SAS macros and data need to be registered and have read and execute permissions granted.
Step 3 – Login and View
Once the administrator applies the correct permissions, the iPhone user can see the programs appear on their selection lists. They can then view the data in a viewer or execute the macro and view its results.
It is useful to have users access the data to which they have been granted access. The management of each program and data however adds administrative overhead. In this example, the effort is kept to a minimal so that both the administrator and iPhone user can get to the information that is needed efficiently.
User Interaction Name
Date Time of User Interaction
All the user permission is handled on the server and stored centrally within a SAS dataset. Each dataset and SAS macro metadata is managed centrally on the server within a dataset with each object assigned a unique identifier. The dataset structure that stores this is shown here.
In this case the privileges variable stores a simply value “read” or “write”. This dataset and set of functions to manage privileges have been intentionally simplified for this specific purpose to optimally manage the access control list for the iPhone application.
Sunday, July 12, 2009
Saturday, July 11, 2009
*** Generate Report of data by specific subset ***;
sortby = subjid startdt,
reptitle = Demographic data sorted by subject ID and start date);
Upon the selection of the %datataview macro, all the macro parameters will be presented with standard iPhone user interface elements. Each parameter will be listed as in the order in which it is defined.
- Input Data – The input data parameter uses a standard SAS two level dot notation which is LIBNAME.DATASET. In this example, it is “mylib.demog” which refers to a library “MYLIB” and the dataset DEMOG. The user can edit this as open text or in addition, there is the option of drilling down to a list for the selection of libraries and datasets in selection.
- Sort Variables – The sort variables is a standard multiple option selection list. There are several different type of selection list. In this case, a simplified multiple selection list is presented as an example.
- Report Title – The report title requires a standard text entry field which the user can type any text value with the aid of an onscreen keyboard.
There are many other types of controllers which parameters can be configured to make the user entry more intuitive. Keep in mind that the user is using their index finger or thumb on a multi-touch screen. This is very different than a pointer device such as a mouse on a large desktop monitor. These other example selection options illustrates how the iPhone interface can optimize to allow users to select their parameters effectively from a mobile device.
Some of the graphical user interface elements are similar to those found on desktop windows applications. The text entry and check list is similar to a text entry or list box on desktop applications. They only differ in their layout so it is easy for users to tap with their fingers. However, some user interface elements diverge from the desktop interface to fully take advantage of the mutli-touch smaller screen of an iPhone. This is particularly apparent in the spinning control which looks very different compared to any controller on a desktop application. The author of the macro would configure their macros and select which controller is best suited for each parameter. Default list of values will be displayed based on values of a dataset or the SAS system views such as SASHELP.VSLIB for list of available libraries. Once the macro authors configures this on the server, the user can benefit from having a user friendly method of selecting and executing the macros.
Wednesday, July 8, 2009
Step 1 – Selecting Library
SAS datasets are stored in libraries which points to physical folders on the server. This is also refereed to as SAS LIBNAMEs. The main datasets screen on the iPhone contains the latest list of datasets. The first item on this list is the library that is currently being viewed.
Step 2 – Select Data
The main dataset list displays all dataset names along with the associated label available within the selected library. This can be efficiently scrolled through by using the vertical swipe action which is standard for the iPhone interface. The user can then select the data to be viewed by taping on the right arrow or anywhere in the row of the dataset. The text size and layout of the dataset list is optimized for the user selection within the iPhone interface.
Step 3 – View Data
Upon the specific data selection, a data viewer is presented with all the rows of the data. Chunks of the data of delivered to the iPhone which can be configured. In this example, 20 rows at a time are displayed. The user can then jump to specific blocks of data using the next and previous buttons or the horizontal slider control to navigate to specific chunks of the data.
The interface has been modeled after other existing standard iPhone applications such as iPod player which has standard buttons and layout. Apple has devoted extensive research into developing a user interface that is user friendly for the mobile device optimizing object size and placement for optimal functionality. Many of the same user elements are implemented in this data viewer leveraging upon Apple’s standard to enhance user’s experience. Since users who own an iPhone are most likely familiar with the interface of an iPod to select music, they do not have to learn a new interface for selecting and viewing datasets. In the list view, the selection and viewing of datasets is analogous to playing and selecting options of each song being played on the iPod.
The code and algorithm logic that goes into developing the SAS application server and iPhone client application is extensive. This section will select one section in step 1 on libraries and describe how this is accomplished. The following steps are applied to present the list of library screen.
Step 1 – Capture Libraries
A SAS program is initiated on the server to capture all libraries available. It is then compared to the user permissions before the final list is sent to the client iPhone. The following example code is used to capture this is:
do while(fetchobs(dsid,cnt) = 0);
libname1 = upcase(getvarc(dsid,varnum(dsid,'libname')));
if libname1 not in ('WORK','SASUSER','SASHELP','SASMSG','MAPS',
'PGMLIB','_MXI','SERLIB','DATLIB','USERS') then do;
if searchc(liblst, libname1, 1, 1, 'Y') = 0 then do;
rc = insertc(liblst,libname1,-1);
path = lowcase(getvarc(dsid, varnum(dsid, 'libpath')));
idx = index(path, '\');
path = substr(path, idx);
path = tranwrd(path, '\', '/');
rc = insertc(pathlst, path, -1);
cnt = cnt + 1;
dsid = close(dsid);
Step 2 – Subset user Privileges
A SAS program is initiated on the server to capture all libraries available. It is compared to the user permissions access control list. BI Flash stores all the user permissions as described in the permission section above.
Step 3 – XML Library List
Once the final list of library is captured, an XML file is created capturing all the libraries as shown here.
This is information is then delivered to the iPhone via a web server used to for the user selection.
Tuesday, July 7, 2009
Monday, July 6, 2009
In this example, the iPhone application on the iPhone communicates through standard TCP/IP protocol to a web server. The web server then communicates to an application server which is actually a SAS session processing SAS programs and data. The output resulting from the SAS program is then delivered back to the iPhone in a similar way a web browser would access a web page the serer. The distinction however is that the iPhone application is not a web browser and the SAS session running on the server is more dynamic compare to a static page. The SAS data and macro program it executes may be simple and standard but facilitating the communication takes a little more effort. The request from the iPhone application and the delivery of information from the server is handled by BI Flash. This makes the experience more dynamic and delivers the full power of SAS on the server. The following steps are taken in order to facilitate the access of SAS data from an iPhone App.
- Host Name – This the name of the server or an IP address of the SAS server.
- User Name – A valid user name that has been defined on the server needed during authentication
- Password – A user defined password to secure access
There may be other configuration options which will set the default behavior of the application but the parameters above show the minimum requirement in order to connect to a SAS server.
Step 4 – Run Application
The final step taken by the user to access SAS data is to execute the SAS macros from the iPhone. This request is initiated from the iPhone app and sent directly to the server with user selected options. The results are then returned to the iPhone displaying the most updated information on the server.
The system architecture in this example is rather simple compared to other systems that require multiple layers of middleware. This is similar to the SAS/IntrNet where users are on a web browser accessing SAS data and programs on the server through the broker and SAS application server. The difference however is that the client is not a browser, but rather a dynamic iPhone application.
The current iPhone application BI Flash is being reviewed by Apple AppStore and should be made available soon upon approval. You can view a sample video of the application which run SAS macros directly on the iPhone below.