<commit_before><?xml version="1.0"?>
    
<!DOCTYPE hibernate-mapping PUBLIC 
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    
<hibernate-mapping>

<!-- authorization-based filters
note that these filters just ensure that a user has a role in a given projectUnit. additional filtering
may be needed using the authorizationService to ensure that the user has permissions in a given projectUnit -->
<filter-def name="projectAuth">
    <filter-param name="projectList" type="string"/>
     ProjName in (Select pr_pu.ProjUnitDesc from ProjectUnit pr_pu where pr_pu.ProjUnitDesc=ProjName and (pr_pu.ProjUnitDesc in (:projectList))
</filter-def>
<filter-def name="patientAuth">
    <filter-param name="projectList" type="string"/>
    PIDN in (select pa_es.PIDN from EnrollmentStatus pa_es inner join ProjectUnit pa_pu on pa_es.ProjName=pa_pu.ProjUnitDesc where pa_es.PIDN=PIDN and pa_pu.ProjUnitDesc in (:projectList))
</filter-def>

<!-- option here would be to verify that PIDN is in Patient table...but this would obscure orphin records and involve an extra join.. -->
<filter-def name="validPatient">
    PIDN > 0
</filter-def>

<!-- user-defined context filters -->
<filter-def name="projectContext">
    <filter-param name="projectContext" type="string"/>
</filter-def>
<filter-def name="patient">
    <filter-param name="patientId" type="long"/>
</filter-def>

</hibernate-mapping><commit_msg>table names need to be lowercase<commit_after><?xml version="1.0"?>
    
<!DOCTYPE hibernate-mapping PUBLIC 
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    
<hibernate-mapping>

<!-- authorization-based filters
note that these filters just ensure that a user has a role in a given projectUnit. additional filtering
may be needed using the authorizationService to ensure that the user has permissions in a given projectUnit -->
<filter-def name="projectAuth">
    <filter-param name="projectList" type="string"/>
     ProjName in (Select pr_pu.ProjUnitDesc from projectunit pr_pu where pr_pu.ProjUnitDesc=ProjName and (pr_pu.ProjUnitDesc in (:projectList))
</filter-def>
<filter-def name="patientAuth">
    <filter-param name="projectList" type="string"/>
    PIDN in (select pa_es.PIDN from enrollmentstatus pa_es inner join projectunit pa_pu on pa_es.ProjName=pa_pu.ProjUnitDesc where pa_es.PIDN=PIDN and pa_pu.ProjUnitDesc in (:projectList))
</filter-def>

<!-- option here would be to verify that PIDN is in Patient table...but this would obscure orphin records and involve an extra join.. -->
<filter-def name="validPatient">
    PIDN > 0
</filter-def>

<!-- user-defined context filters -->
<filter-def name="projectContext">
    <filter-param name="projectContext" type="string"/>
</filter-def>
<filter-def name="patient">
    <filter-param name="patientId" type="long"/>
</filter-def>

</hibernate-mapping>
{'fraction_non_alphanumeric': 0.1253812267028126, 'fraction_numerical': 0.004744154523890207, 'mean_word_length': 4.507462686567164, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 2, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4667783', 'n_tokens_mistral': 946, 'n_tokens_neox': 877, 'n_words': 274}