We hope you'll join us for our 4/23 webinar on using data tables to apply reference ranges and AE codes in OC4. For more information and to register, visit https://register.gotowebinar.com/register/2882170018956684555

SAS export (thx Linas) to be included in 3.10! Looking for community feedback



  • lindsay.stevenslindsay.stevens Posts: 404 ✭✭✭
    via Email

    If you're referring to the DATA/SET/FORMAT/RUN blocks, these are applying
    the code list formats to the items. E.g. that 1 means Yes, 0 means No.
  • jamesbonicajamesbonica Posts: 7
    Hi @lindsay.stevens

    I think I now understand what that script is doing. What I was confused about was that response values were being mapped to response text for only single-select/radio but not multi-select/checkboxes. @Cal Collins clarified that as currently implemented such mapping is only impractical for those items. Do you have plans to revise the implementation to allow for this? Just curious. Thanks for your help and patience!

    Jim B.
  • lindsay.stevenslindsay.stevens Posts: 404 ✭✭✭
    via Email

    Both community datamart (CD) and enterprise datamart (ED) have a solution
    for multi-value items: each choice is split to a new variable.

    In ED, only choices with a value have a variable created, and each variable
    is named using a generated (random?) ID.

    In CD, all choices always have a variable created, and each variable is
    named using the item name and choice code (although this doesn't cope with
    codes like "-1" so I'm moving to use choice position instead).

    CD includes a SAS script that helps a user connect and save out all
    datasets. The missing piece is variable and value labelling, which I've
    only done for the Stata script.

    So my point is that polishing this SAS XSLT much further might not be a
    good use of time if the desired features have already been implemented

    Also waiting on input from Thasbiha and Alicia from earlier in this thread.
  • jmacminn1jmacminn1 Posts: 18

    Just checking in - have you decided to add CRF version name and/or version oid? If so, do you know when this might be available?

    Thanks again,
  • lindsay.stevenslindsay.stevens Posts: 404 ✭✭✭
    via Email
    Yes, but:

    > Also waiting on input from Thasbiha and Alicia from earlier in this

    Maybe you can nudge them?
  • tkhajatkhaja Posts: 62 ✭✭
    edited April 2016
    Hi Lindsay,

    Apologize for the delay. Our engineering team has completely taken over the sas integration work which is expected to be out in 3.11. Please see my responses below:

    I have made a proof of concept of the XLST code change in a new repository at [2]. In short, changing from FileOutputStream to File objects for the transform output makes the multiple result-documents work.

    I am yet to get an integration test working with the Spring app context loaded - if you have any guidance on running integration tests in that way it would be greatly appreciated. I tried to adapt the Clinovo techniques for this but the amount of mocks blew my mind. But maybe that is just how it is done?

    [2] https://github.com/lindsay-stevens-kirby/oc_xslt

    Thank you Lindsay. I believe we are all set with this one.

    @tkhaja part 2
    About the error PDF you posted:
    - It seems that both you and @jamesbonica are using SAS Studio.
    - I installed it and if you did the same as me in the instructions, then you'll have a mapped folder in SAS studio at "/folders/myfolders".
    - In which case you'd need to change the paths in load.sas as follows; normally the current path would be available with "%sysget('sas_execfilepath')" but this doesn't work in SAS Studio and I'm not sure what the alternative is.

    FILENAME R0112345 "/folders/myfolders/data.xml";
    FILENAME map "/folders/myfolders/map.xml";

    - I think asking users to update the file path at the top of the SAS script file is a pretty small ask but if you think a workaround is in order then let me know your idea.
    Yes, I used sas studio as well. I was able to run the script after updating my file path

    - Later in the PDF log, at log line 73-8 there is the following syntax error:

    73 VALUE CL_809_
    74 (select response)="(select response)"
    ERROR 22-322: Syntax error, expecting one of the following: ), DEFAULT, FUZZ, MAX, MIN, MULTILABEL, NOTSORTED, ROUND.
    ERROR 76-322: Syntax error, statement will be ignored.
    75 1="childbearing potential without contraceptive protection"
    76 2="childbearing potential with contraceptive protection"
    77 3="surigcally sterilised"
    78 4="post-menopausal";
    NOTE: The previous statement has

    - The XSLT will output code lists in the format 1="Yes", unless the associated item data type is text, in which case it wraps the coded value in quotes, like "1"="Yes".
    - In this case there seems to be an integer code list where the first value is a string, "(select response)". I would have thought this was not valid in OpenClinica? What data type is the item that uses CL_809?
    - It's not possible to have mixed types in SAS, so the solutions are to remove the invalid code item, or change the code list to a string value list and cast the data to string as well (overriding the metadata, basically).
    - Again it would be useful to have access to your test input data.

    Sorry, I no longer have these files. I will let you know if I run into these problems again.

  • lindsay.stevenslindsay.stevens Posts: 404 ✭✭✭
    via Email

    > I believe we are all set with this one.

    Thanks but I don't understand what this means.
  • tkhajatkhaja Posts: 62 ✭✭
    I meant we were able to merge Linas and your contribution for the sas xslts and make it work as an OpenClinica format which will be out in 3.11.

    Let me know if you need further clarification. Thanks.

Sign In or Register to comment.