Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
romainbou committed Sep 14, 2022
1 parent 7efd06d commit 947afde
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions pkg/datasource/database/statistics_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@ func convertIntListToString(intList []int64) string {
}

/*
* This query will return the numerical values from all observations where
* the patient_num is contained within the list passed as argument (the list is in principle a list of patient from a specific cohort).
* This query will return the numerical values from all observations where
* the patient_num is contained within the list passed as argument (the list is in principle a list of patient from a specific cohort).
TODO In the same way I gathered the schema and table in which the ontology is contained, gather the schema in which observations are contained.
For the moment I hardcode the table and schema.
TODO In the same way I gathered the schema and table in which the ontology is contained, gather the schema in which observations are contained.
For the moment I hardcode the table and schema.
We only keep rows where nval_num is exactly equal to a specific values hence the required value of TVAL_CHAR.
We could keep values which are GE or LE or L or G the problem is that we would need open brackets for intervals.
VALTYPE_CD = 'N' because we only care about numerical values.
We only keep rows where nval_num is exactly equal to a specific values hence the required value of TVAL_CHAR.
We could keep values which are GE or LE or L or G the problem is that we would need open brackets for intervals.
VALTYPE_CD = 'N' because we only care about numerical values.
*/
const sqlStart string = `
SELECT nval_num, patient_num, units_cd FROM i2b2demodata.observation_fact
Expand Down
2 changes: 1 addition & 1 deletion pkg/datasource/models/survival_query_time_points.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (tps TimePoints) Less(i, j int) bool {
return tps[i].Time < tps[j].Time
}

//Swap implements Swap method for sort.Interface interface.
// Swap implements Swap method for sort.Interface interface.
func (tps TimePoints) Swap(i, j int) {
tps[i], tps[j] = tps[j], tps[i]
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/datasource/statistics_query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func TestProcessObservations(t *testing.T) {

}

//to generate sample with specific sample std and sample mean: https://stackoverflow.com/questions/51515423/generate-sample-data-with-an-exact-mean-and-standard-deviation
// to generate sample with specific sample std and sample mean: https://stackoverflow.com/questions/51515423/generate-sample-data-with-an-exact-mean-and-standard-deviation
func TestOutlierRemoval(t *testing.T) {

t.Run("outlier_removal_normal_0_mean_1_std", func(t *testing.T) {
Expand Down Expand Up @@ -154,7 +154,7 @@ func newStatsObservations(observations []float64) (queryResults []dbmodels.Stats
return
}

//to generate sample with specific sample std and sample mean: https://stackoverflow.com/questions/51515423/generate-sample-data-with-an-exact-mean-and-standard-deviation
// to generate sample with specific sample std and sample mean: https://stackoverflow.com/questions/51515423/generate-sample-data-with-an-exact-mean-and-standard-deviation
func TestOutlierRemovalNormal0Mean1Std(t *testing.T) {
observations := []float64{
-4.504332807814968, -3.588438949993705, -1.4253477722082, 4.481350113178383, -0.05858067548906476, 8.695616991288777, 0.8911308392424653, 9.391114371637403, 8.094555884981943, -4.290838531517852, 10.79099641135041, 1.3150492298392589, 10.902284491587732, -0.8873436991601062, 2.228352198498256, 3.60927053212485, -1.1011040410767086, 10.284889522654836, 2.635879581548595, 2.535496309327691,
Expand Down

0 comments on commit 947afde

Please sign in to comment.