<?xml version="1.0" encoding="utf-8" ?>
<!--<sqlMap namespace="CLIP.e-Form.Consent.Dfh" xmlns="http://ibatis.apache.org/mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >-->
<sqlMap namespace="CLIP.e-Form.Consent.Knuh" xmlns="http://ibatis.apache.org/mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
  <statements>
    <insert id="setUserFormSet" parameterClass="System.Collections.Hashtable">
      <![CDATA[ 
        INSERT INTO emr.mrfmsetindx(
                instcd,
                itemindxseq,
                supitemindxseq,
                indxflag,
                indxnm,
                indxcnts,
                deptcd,
                userid,
                linkflag,
                linkcd,
                comnseq,
                fstrgstrid,
                fstrgstdt,
                lastupdtrid,
                lastupdtdt,
                jobkind,
                slipno
                )
        VALUES(
                #instCd#,
                EMR.SQ_MRFMSETINDX_01.NEXTVAL,
                472,
                'O',
                '',
                '',
                '',
                #userId#,
                'Y',
                #formCd#,
                '',
                #userId#,
                systimestamp,
                #userId#,
                systimestamp,
                '',
                '')
        ]]>
      <selectKey type="post" resultClass="System.Int32" property="itemindxseq">
        <![CDATA[SELECT EMR.SQ_MRFMSETINDX_01.CURRVAL AS itemindxseq FROM DUAL]]>
      </selectKey>
    </insert>
    
    <statement id="delUserFormSet" parameterClass="System.Collections.Hashtable">
      <![CDATA[ 
            update emr.mrfmsetindx
            set instcd = '999'
            where userid = #userid#
            and instcd = #instcd#
            and linkcd = #formcd#
            ]]>
    </statement>
  </statements>
</sqlMap>
