mapkon / oc-conversion-tools

openxdata openclinica form conversion tools
code.openxdata.org
Other
8 stars 4 forks source link

Construct the question label in the web service #56

Closed mapkon closed 12 years ago

mapkon commented 12 years ago

For questions that belong to groups with headers and sub headers, the web service should construct a question label that includes the header and sub header. This label is inserted in the Translated field of the Question element. This refs gh-21

tomhickerson commented 12 years ago

Hi Mark,

I've made the change - but keep in mind that you'll see many ItemDefs with some repeating phrases:

<ItemDef OID="I_MEAM_MEA_MI_MEDPREC" Name="MEA_MI_MEDPREC" DataType="text" Length="200" SASFieldName="MEA_M01v" Comment="Specification of medication" OpenClinica:FormOIDs="F_MEAM_2,F_MEAM1">
<Question>
<TranslatedText>
Q17a
If Yes, If yes, which drug
</TranslatedText>
</Question>
<OpenClinica:ItemDetails ItemOID="I_MEAM_MEA_MI_MEDPREC">
<OpenClinica:ItemPresentInForm FormOID="F_MEAM_2" PHI="No" ShowItem="Yes">
<OpenClinica:LeftItemText>If yes, which drug</OpenClinica:LeftItemText>
<OpenClinica:SectionLabel>MEA</OpenClinica:SectionLabel>
<OpenClinica:ItemResponse ResponseType="calculation"/>
</OpenClinica:ItemPresentInForm>
<OpenClinica:ItemPresentInForm FormOID="F_MEAM_1" PHI="No" ShowItem="Yes">
<OpenClinica:LeftItemText>If yes, which drug</OpenClinica:LeftItemText>
<OpenClinica:SectionLabel>MEA</OpenClinica:SectionLabel>
<OpenClinica:ItemResponse ResponseType="calculation"/>
</OpenClinica:ItemPresentInForm>
</OpenClinica:ItemDetails>
</ItemDef>

mapkon commented 12 years ago

Tom, is this the sample output? If yes, then it is not what I envisioned. I was more thinking that the conversion occurs on the oc side of things and we end up with something like MEA - Q17a - If yes, which drug. You can safely omit then ItemDetails tags - they will not be needed if we can have that text in the translated tag!

tomhickerson commented 12 years ago

Hi Mark, in your example above, what is 'MEA' supposed to represent? Currently we have Header + subheader + Item Text in the Translated Text field.

Am I to assume you actually want it to be Section Label + Header + Item Text. and then remove all information in the OpenClinica:ItemDetails tag?

mapkon commented 12 years ago

The best example to use is the Laboratory - HIV Serology - Collection Date questions. Those are more explicit and raised the flag for this! Can I have a look at the output for those?

tomhickerson commented 12 years ago

That would be something like this:

<ItemDef OID="I_MLLM_MLL_HIVS_COIDV" Name="MLL_HIVS_COIDv" DataType="date" SASFieldName="MLL_HIVS" Comment="Collection date_HIV_sero" OpenClinica:FormOIDs="F_MLLM5">
                <Question OpenClinica:QuestionNumber="Q3a
">
                    <TranslatedText>
                      Laboratory  - Collection date?
                    </TranslatedText>
                </Question>
                <OpenClinica:ItemDetails ItemOID="I_MLLM_MLL_HIVS_COIDV">
                    <OpenClinica:ItemPresentInForm FormOID="F_MLLM_5" ColumnNumber="1" PHI="No" ShowItem="Yes">
                        <OpenClinica:LeftItemText>Collection date?</OpenClinica:LeftItemText>
                        <OpenClinica:ItemHeader>Laboratory</OpenClinica:ItemHeader>
                        <OpenClinica:ItemSubHeader>HIV-serology</OpenClinica:ItemSubHeader>
                        <OpenClinica:SectionLabel>MLL</OpenClinica:SectionLabel>
                        <OpenClinica:ItemResponse ResponseType="text"/>
                    </OpenClinica:ItemPresentInForm>
                </OpenClinica:ItemDetails>
            </ItemDef>

mapkon commented 12 years ago

Note that the ItemSubHeader (HIV-serology) is missing in <TranslatedText> Laboratory - HIV serology - MLL - Collection date?</TranslatedText> And I would also add the SectionLabel just before the Collection data?

tomhickerson commented 12 years ago

Hi Mark,

Per our discussion, we won't be adding the section label. The current iteration of the item def now looks like this:

<ItemDef OID="I_MLLM_MLL_HIVS_COIDV" Name="MLL_HIVS_COIDv" DataType="date" SASFieldName="MLL_HIVS" Comment="Collection date_HIV_sero" OpenClinica:FormOIDs="F_MLLM5">
<Question OpenClinica:QuestionNumber="Q3a
">
<TranslatedText>
Laboratory - HIV-serology - Collection date?
</TranslatedText>
</Question>
<OpenClinica:ItemDetails ItemOID="I_MLLM_MLL_HIVS_COIDV">
<OpenClinica:ItemPresentInForm FormOID="F_MLLM_5" ColumnNumber="1" PHI="No" ShowItem="Yes">
<OpenClinica:LeftItemText>Collection date?</OpenClinica:LeftItemText>
<OpenClinica:ItemHeader>Laboratory</OpenClinica:ItemHeader>
<OpenClinica:ItemSubHeader>HIV-serology</OpenClinica:ItemSubHeader>
<OpenClinica:SectionLabel>MLL</OpenClinica:SectionLabel>
<OpenClinica:ItemResponse ResponseType="text"/>
</OpenClinica:ItemPresentInForm>
</OpenClinica:ItemDetails>
</ItemDef>

mapkon commented 12 years ago

Thanks Tom,

The TT is now fine but can we do away with the ItemDetails tag, it is now not needed?

Mark

On Feb 29, 2012, at 6:05 PM, Tom Hickerson wrote:

Hi Mark,

Per our discussion, we won't be adding the section label. The current iteration of the item def now looks like this:

<ItemDef OID="I_MLLM_MLL_HIVS_COIDV" Name="MLL_HIVS_COIDv" DataType="date" SASFieldName="MLL_HIVS" Comment="Collection date_HIV_sero" OpenClinica:FormOIDs="F_MLLM5">
<Question OpenClinica:QuestionNumber="Q3a
">
<TranslatedText>
Laboratory - HIV-serology - Collection date?
</TranslatedText>
</Question>
<OpenClinica:ItemDetails ItemOID="I_MLLM_MLL_HIVS_COIDV">
<OpenClinica:ItemPresentInForm FormOID="F_MLLM_5" ColumnNumber="1" PHI="No" ShowItem="Yes">
<OpenClinica:LeftItemText>Collection date?</OpenClinica:LeftItemText>
<OpenClinica:ItemHeader>Laboratory</OpenClinica:ItemHeader>
<OpenClinica:ItemSubHeader>HIV-serology</OpenClinica:ItemSubHeader>
<OpenClinica:SectionLabel>MLL</OpenClinica:SectionLabel>
<OpenClinica:ItemResponse ResponseType="text"/>
</OpenClinica:ItemPresentInForm>
</OpenClinica:ItemDetails>
</ItemDef>


Reply to this email directly or view it on GitHub: https://github.com/mapkon/oc-conversion-tools/issues/56#issuecomment-4239007

tomhickerson commented 12 years ago

Hi Mark, my changes have been checked into SVN Experimental, please go ahead and test when you are ready.

tomhickerson commented 12 years ago

Just added another commit to remove the ItemDetails tag, let me know if that works with your changes. Best, Tom