<commit_before><h4>
    <a href="" ui-sref="^.list" class="btn btn-default"><i class="fa fa-arrow-left"></i></a>
    <span ng-show="!protocol.id" translate>Add a new protocol</span>
    <span ng-show="protocol.id" translate>Edit protocol</span>
</h4>


<div class="row">
    <div class="col-md-8-offset-2">
        <div class="box box-primary">
            <div class="box-header">
                <h3 class="box-title"></h3>
            </div>
            <div class="box-body">
                <form ng-submit="onSubmit(form)" name="form" novalidate>
                    <tabset justified="true">
                        <tab ng-repeat="tab in tabs"
                           heading="{{tab.title}}"
                           active="tab.active"
                           disable="tab.disabled"
                           ng-hide="tab.hide"
                           select="tab.onselect()"
                           class="protocolform"> <br>
                    <div class="container">
                        
                    <div ng-if="tab.outcome">
                    <br>
                    <div class="row" >

                        <div class="col-sm-2">
                           <label for="outcome_type" class="control-label">Outcome type</label>
                            <select name="outcome_type" class="form-control" ng-model="outcome.selectedType" ng-init="outcome.selectedType=outcome.types[0]">
                                 <option ng-repeat="option in outcome.types" value="{{option}}">{{option | ucfirst}}</option>
                            </select>
                        </div>
                        <div class="col-sm-10">
                        <label for="outcome_uiselect" class="control-label">Select outcome to add</label>
                        <ui-select name="outcome_uiselect" search-enabled="true" ng-disabled="!outcome.selectedType"
                            on-select="addOutcome($item, $model)" 
                            ng-model="outcome.selected" theme="bootstrap">
                            <ui-select-match placeholder="Search for disease...">{{$select.selected.label}}</ui-select-match>
                            <ui-select-choices 
                                repeat="outcome in autocompleteResults track by $index" 
                                refresh="bioportalAutocomplete($select.search,{templateOptions:{bioportal:{}}})" 
                                refresh-delay="0">
                                <div ng-bind-html="outcome.label | highlight: $select.search"></div>
                            </ui-select-choices>
                        </ui-select>
                        </div>
                    </div>
                    <div class="row" ng-show="protocol.outcomes.length>0"><hr></div>
                    <div class="row">
                        
                       <ul>
                          <li ng-repeat="outcome in protocol.outcomes track by $index">
                              
<b>{{outcome.type|ucfirst}}</b> outcome :  
                            <a ng-href="http://bioportal.bioontology.org/ontologies/ICD10?p=classes&conceptid={{outcome.link}}" target="_blank" >
                               <b>{{outcome.label}}</b>
                            </a>
                                <span>
                                <a href="" class="btn btn-xs btn-default" ng-click="removeOutcome($index)">
                                <span class="ion-close-round"></span></a>
                                </span>
                          </li>
                        </ul>
                    </div>
                </div>
                          
                        
                    <div ng-if="tab.evidence">
                    <br>
                    <div class="row" >

                        <div class="col-sm-11">
                        <label for="evidence_uiselect" class="control-label">Select article to add as evidence</label>
                        <ui-select name="evidence_uiselect" search-enabled="true" reset-search-input="true"
                            on-select="addPubmedArticle($item, $model)" 
                            ng-model="evidence.selected" theme="bootstrap">
                            <ui-select-match allow-clear="true" placeholder="Search in pubmed...">{{$select.selected.title}}</ui-select-match>
                            <ui-select-choices 
                                repeat="article in pubmedResults track by $index" 
                                refresh="searchPubmed($select.search)" 
                                refresh-delay="800">
                                <div ng-bind-html="article.title | highlight: $select.search"></div>
                                <small ng-bind="article.authorString"></small> <cite><b ng-bind="article.pubYear"></b></cite>
                            </ui-select-choices>
                            </ui-select>
                            </label>
                            
                        </div>
                        <div class="col-sm-1">
                        <br>
                        <br>
                        <label class="control-label"><input type="checkbox" ng-model="evidence.exactPubMedSearch">Exact</label>
                        </div>
                    </div>
                    <div class="row" ng-show="protocol.evidences.length>0"><hr></div>
                    <div class="row">
                        
                       <ol>
                          <li ng-repeat="article in protocol.evidences track by $index">

                            <a ng-href="http://www.ncbi.nlm.nih.gov/pubmed/{{article.pmid}}" target="_blank" class="list-group-item-heading" ng-bind-html="article.title"></a>
                                
                                <span>
                                <a href="" class="btn btn-xs btn-default" ng-click="removePubmedArticle($index)">
                                <span class="ion-close-round"></span></a>
                                </span>
                                
                            <p>
                                <b>PMID</b> : {{article.pmid}} 
                                <br>
                                <b>Authors</b> : {{article.authorString}} &copy;{{article.pubYear}}
                            </p>
                          </li>
                        </ol>
                    </div>
                </div>
                          
                          
                        <formly-form model="tab.form.model" fields="tab.form.fields" form="form" options="tab.form.options">
                        </formly-form>
                        
                        
                        </div>
                      </tab>
                      
                            
                    </tabset>
                    <button type="submit" class="btn btn-primary submit-button" ng-disabled="form.$invalid">Submit</button>
                </form>
            </div>
        </div>
    </div>
    
    <div class="col-md-12" ng-show="isadmin">
        <div class="box box-primary">
            <div class="box-header">
                <h3 class="box-title">Protocol</h3>
            </div>
            <div class="box-body">
                <pre>{{protocol|json}}</pre>
                <pre>{{protocol.intention_disease|json}}</pre>
            </div>
        </div>
    </div>

</div>
<commit_msg>ui fix min-height for evidence articles<commit_after><h4>
    <a href="" ui-sref="^.list" class="btn btn-default"><i class="fa fa-arrow-left"></i></a>
    <span ng-show="!protocol.id" translate>Add a new protocol</span>
    <span ng-show="protocol.id" translate>Edit protocol</span>
</h4>


<div class="row">
    <div class="col-md-8-offset-2">
        <div class="box box-primary">
            <div class="box-header">
                <h3 class="box-title"></h3>
            </div>
            <div class="box-body">
                <form ng-submit="onSubmit(form)" name="form" novalidate>
                    <tabset justified="true">
                        <tab ng-repeat="tab in tabs"
                           heading="{{tab.title}}"
                           active="tab.active"
                           disable="tab.disabled"
                           ng-hide="tab.hide"
                           select="tab.onselect()"
                           class="protocolform"> <br>
                    <div class="container">
                        
                    <div ng-if="tab.outcome">
                    <br>
                    <div class="row" >

                        <div class="col-sm-2">
                           <label for="outcome_type" class="control-label">Outcome type</label>
                            <select name="outcome_type" class="form-control" ng-model="outcome.selectedType" ng-init="outcome.selectedType=outcome.types[0]">
                                 <option ng-repeat="option in outcome.types" value="{{option}}">{{option | ucfirst}}</option>
                            </select>
                        </div>
                        <div class="col-sm-10">
                        <label for="outcome_uiselect" class="control-label">Select outcome to add</label>
                        <ui-select name="outcome_uiselect" search-enabled="true" ng-disabled="!outcome.selectedType"
                            on-select="addOutcome($item, $model)" 
                            ng-model="outcome.selected" theme="bootstrap">
                            <ui-select-match placeholder="Search for disease...">{{$select.selected.label}}</ui-select-match>
                            <ui-select-choices 
                                repeat="outcome in autocompleteResults track by $index" 
                                refresh="bioportalAutocomplete($select.search,{templateOptions:{bioportal:{}}})" 
                                refresh-delay="0">
                                <div ng-bind-html="outcome.label | highlight: $select.search"></div>
                            </ui-select-choices>
                        </ui-select>
                        </div>
                    </div>
                    <div class="row" ng-show="protocol.outcomes.length>0"><hr></div>
                    <div class="row">
                        
                       <ul>
                          <li ng-repeat="outcome in protocol.outcomes track by $index">
                              
<b>{{outcome.type|ucfirst}}</b> outcome :  
                            <a ng-href="http://bioportal.bioontology.org/ontologies/ICD10?p=classes&conceptid={{outcome.link}}" target="_blank" >
                               <b>{{outcome.label}}</b>
                            </a>
                                <span>
                                <a href="" class="btn btn-xs btn-default" ng-click="removeOutcome($index)">
                                <span class="ion-close-round"></span></a>
                                </span>
                          </li>
                        </ul>
                    </div>
                </div>
                          
                        
                    <div ng-if="tab.evidence">
                    <br>
                    <div class="row" style="min-height:300px">

                        <div class="col-sm-11">
                        <label for="evidence_uiselect" class="control-label">Select article to add as evidence</label>
                        <ui-select name="evidence_uiselect" search-enabled="true" reset-search-input="true"
                            on-select="addPubmedArticle($item, $model)" 
                            ng-model="evidence.selected" theme="bootstrap">
                            <ui-select-match allow-clear="true" placeholder="Search in pubmed...">{{$select.selected.title}}</ui-select-match>
                            <ui-select-choices 
                                repeat="article in pubmedResults track by $index" 
                                refresh="searchPubmed($select.search)" 
                                refresh-delay="800">
                                <div ng-bind-html="article.title | highlight: $select.search"></div>
                                <small ng-bind="article.authorString"></small> <cite><b ng-bind="article.pubYear"></b></cite>
                            </ui-select-choices>
                            </ui-select>
                            </label>
                            
                        </div>
                        <div class="col-sm-1">
                        <br>
                        <br>
                        <label class="control-label"><input type="checkbox" ng-model="evidence.exactPubMedSearch">Exact</label>
                        </div>
                    </div>
                    <div class="row" ng-show="protocol.evidences.length>0"><hr></div>
                    <div class="row">
                        
                       <ol>
                          <li ng-repeat="article in protocol.evidences track by $index">

                            <a ng-href="http://www.ncbi.nlm.nih.gov/pubmed/{{article.pmid}}" target="_blank" class="list-group-item-heading" ng-bind-html="article.title"></a>
                                
                                <span>
                                <a href="" class="btn btn-xs btn-default" ng-click="removePubmedArticle($index)">
                                <span class="ion-close-round"></span></a>
                                </span>
                                
                            <p>
                                <b>PMID</b> : {{article.pmid}} 
                                <br>
                                <b>Authors</b> : {{article.authorString}} &copy;{{article.pubYear}}
                            </p>
                          </li>
                        </ol>
                    </div>
                </div>
                          
                          
                        <formly-form model="tab.form.model" fields="tab.form.fields" form="form" options="tab.form.options">
                        </formly-form>
                        
                        
                        </div>
                      </tab>
                      
                            
                    </tabset>
                    <button type="submit" class="btn btn-primary submit-button" ng-disabled="form.$invalid">Submit</button>
                </form>
            </div>
        </div>
    </div>
    
    <div class="col-md-12" ng-show="isadmin">
        <div class="box box-primary">
            <div class="box-header">
                <h3 class="box-title">Protocol</h3>
            </div>
            <div class="box-body">
                <pre>{{protocol|json}}</pre>
                <pre>{{protocol.intention_disease|json}}</pre>
            </div>
        </div>
    </div>

</div>

{'fraction_non_alphanumeric': 0.13279384452109314, 'fraction_numerical': 0.0035155213584505173, 'mean_word_length': 1.0118761676007473, 'pattern_counts': {'":': 0, '<': 303, '<?xml version=': 0, '>': 307, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5030244', 'n_tokens_mistral': 3826, 'n_tokens_neox': 3547, 'n_words': 574}