Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions src/main/java/org/ohdsi/webapi/person/CohortPerson.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright 2015 fdefalco.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.ohdsi.webapi.person;

import java.sql.Timestamp;

/**
*
* @author fdefalco
*/
public class CohortPerson {
public Long personId;
public Long cohortDefinitionId;
public Timestamp startDate;
public Timestamp endDate;
}
27 changes: 27 additions & 0 deletions src/main/java/org/ohdsi/webapi/person/Era.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright 2015 fdefalco.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.ohdsi.webapi.person;

import java.sql.Timestamp;

/**
*
* @author fdefalco
*/
public class Era {
public Timestamp startDate;
public Timestamp endDate;
}
33 changes: 33 additions & 0 deletions src/main/java/org/ohdsi/webapi/person/EraSet.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright 2015 fdefalco.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.ohdsi.webapi.person;

import java.util.ArrayList;

/**
*
* @author fdefalco
*/
public class EraSet {
public ArrayList<Era> eras;
public Long conceptId;
public String conceptName;
public String eraType;

public EraSet() {
eras = new ArrayList<>();
}
}
35 changes: 35 additions & 0 deletions src/main/java/org/ohdsi/webapi/person/ObservationPeriod.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright 2016 fdefalco.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.ohdsi.webapi.person;

import java.sql.Timestamp;

/**
*
* @author fdefalco
*/
public class ObservationPeriod {
public ObservationPeriod() {

}

public long id;
public Timestamp startDate;
public Timestamp endDate;
public String type;
public int x1;
public int x2;
}
22 changes: 22 additions & 0 deletions src/main/java/org/ohdsi/webapi/person/PersonConfigurationInfo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package org.ohdsi.webapi.person;

import org.ohdsi.info.ConfigurationInfo;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class PersonConfigurationInfo extends ConfigurationInfo {

private static final String KEY = "person";

public PersonConfigurationInfo(@Value("${person.viewDates}") Boolean viewDatesPermitted) {

properties.put("viewDatesPermitted", viewDatesPermitted);
}

@Override
public String getKey() {

return KEY;
}
}
46 changes: 46 additions & 0 deletions src/main/java/org/ohdsi/webapi/person/PersonProfile.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Copyright 2015 fdefalco.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.ohdsi.webapi.person;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.ArrayList;

/**
*
* @author fdefalco
*/
public class PersonProfile {

public ArrayList<PersonRecord> records;
public ArrayList<CohortPerson> cohorts;
public ArrayList<ObservationPeriod> observationPeriods;

public String gender;
public int yearOfBirth;
public int ageAtIndex;

public PersonProfile() {
records = new ArrayList<>();
cohorts = new ArrayList<>();
observationPeriods = new ArrayList<>();
}

@JsonProperty("recordCount")
public Integer getRecordCount() {
return this.records.size();
}

}
32 changes: 32 additions & 0 deletions src/main/java/org/ohdsi/webapi/person/PersonRecord.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright 2015 fdefalco.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.ohdsi.webapi.person;

import java.sql.Timestamp;

/**
*
* @author fdefalco
*/
public class PersonRecord {
public String domain;
public Long conceptId;
public String conceptName;
public Timestamp startDate;
public Timestamp endDate;
public int startDay;
public int endDay;
}
Loading
Loading