-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
336 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ toc::[] | |
|
||
=== Added | ||
|
||
* Consent (R4 & STU3). | ||
* Consent and ResearchSubject (R4 & STU3). | ||
|
||
=== Changed | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
96 changes: 96 additions & 0 deletions
96
fhir-java/src-gen/main/java/care/data4life/fhir/r4/model/ResearchSubject.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
/* | ||
* Copyright (c) 2020 D4L data4life gGmbH / All rights reserved. | ||
* | ||
* D4L owns all legal rights, title and interest in and to the Software Development Kit ("SDK"), | ||
* including any intellectual property rights that subsist in the SDK. | ||
* | ||
* The SDK and its documentation may be accessed and used for viewing/review purposes only. | ||
* Any usage of the SDK for other purposes, including usage for the development of | ||
* applications/third-party applications shall require the conclusion of a license agreement | ||
* between you and D4L. | ||
* | ||
* If you are interested in licensing the SDK for your own applications/third-party | ||
* applications and/or if you’d like to contribute to the development of the SDK, please | ||
* contact D4L by email to [email protected]. | ||
*/ | ||
|
||
package care.data4life.fhir.r4.model; | ||
|
||
import com.squareup.moshi.Json; | ||
|
||
import java.util.List; | ||
|
||
import javax.annotation.Nullable; | ||
|
||
/** | ||
* ResearchSubject.java | ||
* <p> | ||
* A physical entity which is the primary unit of operational and/or administrative interest in a | ||
* study. | ||
* | ||
* @see <a href="http://hl7.org/fhir/StructureDefinition/ResearchSubject">ResearchSubject</a> | ||
* <p> | ||
* Generated from FHIR 4.0.1-9346c8cc45 (http://hl7.org/fhir/StructureDefinition/ResearchSubject) | ||
*/ | ||
public class ResearchSubject extends DomainResource { | ||
|
||
public static final String resourceType = "ResearchSubject"; | ||
|
||
// Business Identifier for research subject in a study. | ||
@Json(name = "identifier") | ||
@Nullable | ||
public List<Identifier> identifier; | ||
|
||
// The current state of the subject. | ||
@Json(name = "status") | ||
public CodeSystemResearchSubjectStatus status; | ||
|
||
// Start and end of participation. | ||
@Json(name = "period") | ||
@Nullable | ||
public Period period; | ||
|
||
// Study subject is part of. | ||
@Json(name = "study") | ||
public Reference study; | ||
|
||
// Who is part of study. | ||
@Json(name = "individual") | ||
public Reference individual; | ||
|
||
// What path should be followed. | ||
@Json(name = "assignedArm") | ||
@Nullable | ||
public String assignedArm; | ||
|
||
// What path was followed. | ||
@Json(name = "actualArm") | ||
@Nullable | ||
public String actualArm; | ||
|
||
// Agreement to participate in study. | ||
@Json(name = "consent") | ||
@Nullable | ||
public Reference consent; | ||
|
||
|
||
/** | ||
* Constructor for all required properties. | ||
* | ||
* @param status CodeSystemResearchSubjectStatus | ||
* @param study Reference | ||
* @param individual Reference | ||
*/ | ||
public ResearchSubject(CodeSystemResearchSubjectStatus status, Reference study, Reference individual) { | ||
this.status = status; | ||
this.study = study; | ||
this.individual = individual; | ||
} | ||
|
||
@Override | ||
public String getResourceType() { | ||
return ResearchSubject.resourceType; | ||
} | ||
|
||
|
||
} |
97 changes: 97 additions & 0 deletions
97
fhir-java/src-gen/main/java/care/data4life/fhir/stu3/model/ResearchSubject.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
/* | ||
* Copyright (c) 2020 D4L data4life gGmbH / All rights reserved. | ||
* | ||
* D4L owns all legal rights, title and interest in and to the Software Development Kit ("SDK"), | ||
* including any intellectual property rights that subsist in the SDK. | ||
* | ||
* The SDK and its documentation may be accessed and used for viewing/review purposes only. | ||
* Any usage of the SDK for other purposes, including usage for the development of | ||
* applications/third-party applications shall require the conclusion of a license agreement | ||
* between you and D4L. | ||
* | ||
* If you are interested in licensing the SDK for your own applications/third-party | ||
* applications and/or if you’d like to contribute to the development of the SDK, please | ||
* contact D4L by email to [email protected]. | ||
*/ | ||
|
||
package care.data4life.fhir.stu3.model; | ||
|
||
import com.squareup.moshi.Json; | ||
|
||
import javax.annotation.Nullable; | ||
|
||
/** | ||
* ResearchSubject.java | ||
* <p> | ||
* A process where a researcher or organization plans and then executes a series of steps intended | ||
* to increase the field of healthcare-related knowledge. This includes studies of safety, | ||
* efficacy, comparative effectiveness and other information about medications, devices, therapies | ||
* and other interventional and investigative techniques. A ResearchStudy involves the gathering of | ||
* information about human or animal subjects. | ||
* | ||
* @see <a href="http://hl7.org/fhir/StructureDefinition/ResearchSubject">ResearchSubject</a> | ||
* <p> | ||
* Generated from FHIR 3.0.1.11917 (http://hl7.org/fhir/StructureDefinition/ResearchSubject) | ||
*/ | ||
public class ResearchSubject extends DomainResource { | ||
|
||
public static final String resourceType = "ResearchSubject"; | ||
|
||
// Business Identifier for research subject. | ||
@Json(name = "identifier") | ||
@Nullable | ||
public Identifier identifier; | ||
|
||
// The current state of the subject. | ||
@Json(name = "status") | ||
public CodeSystemResearchSubjectStatus status; | ||
|
||
// Start and end of participation. | ||
@Json(name = "period") | ||
@Nullable | ||
public Period period; | ||
|
||
// Study subject is part of. | ||
@Json(name = "study") | ||
public Reference study; | ||
|
||
// Who is part of study. | ||
@Json(name = "individual") | ||
public Reference individual; | ||
|
||
// What path should be followed. | ||
@Json(name = "assignedArm") | ||
@Nullable | ||
public String assignedArm; | ||
|
||
// What path was followed. | ||
@Json(name = "actualArm") | ||
@Nullable | ||
public String actualArm; | ||
|
||
// Agreement to participate in study. | ||
@Json(name = "consent") | ||
@Nullable | ||
public Reference consent; | ||
|
||
|
||
/** | ||
* Constructor for all required properties. | ||
* | ||
* @param status CodeSystemResearchSubjectStatus | ||
* @param study Reference | ||
* @param individual Reference | ||
*/ | ||
public ResearchSubject(CodeSystemResearchSubjectStatus status, Reference study, Reference individual) { | ||
this.status = status; | ||
this.study = study; | ||
this.individual = individual; | ||
} | ||
|
||
@Override | ||
public String getResourceType() { | ||
return ResearchSubject.resourceType; | ||
} | ||
|
||
|
||
} |
65 changes: 65 additions & 0 deletions
65
fhir-java/src-gen/test/java/care/data4life/fhir/r4/model/ResearchSubjectTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/* | ||
* Copyright (c) 2020 D4L data4life gGmbH / All rights reserved. | ||
* | ||
* D4L owns all legal rights, title and interest in and to the Software Development Kit ("SDK"), | ||
* including any intellectual property rights that subsist in the SDK. | ||
* | ||
* The SDK and its documentation may be accessed and used for viewing/review purposes only. | ||
* Any usage of the SDK for other purposes, including usage for the development of | ||
* applications/third-party applications shall require the conclusion of a license agreement | ||
* between you and D4L. | ||
* | ||
* If you are interested in licensing the SDK for your own applications/third-party | ||
* applications and/or if you’d like to contribute to the development of the SDK, please | ||
* contact D4L by email to [email protected]. | ||
*/ | ||
|
||
package care.data4life.fhir.r4.model; | ||
|
||
|
||
import org.junit.Test; | ||
import org.skyscreamer.jsonassert.JSONAssert; | ||
|
||
import care.data4life.fhir.r4.FhirR4Parser; | ||
import care.data4life.fhir.test.util.FileHelper; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
/** | ||
* ResearchSubjectTest.java | ||
* <p> | ||
* Physical entity which is the primary unit of interest in the study. | ||
* <p> | ||
* A physical entity which is the primary unit of operational and/or administrative interest in a | ||
* study. | ||
* <p> | ||
* <p> | ||
* "Generated from FHIR 4.0.1-9346c8cc45 | ||
*/ | ||
public class ResearchSubjectTest { | ||
|
||
FhirR4Parser parser = new FhirR4Parser(); | ||
|
||
@Test | ||
public void testResearchSubject1() throws Exception { | ||
String sourceJson = FileHelper.loadString("r4/researchsubject-example.json"); | ||
ResearchSubject data = parser.toFhir(ResearchSubject.class, sourceJson); | ||
|
||
assertEquals(data.id, "example"); | ||
assertEquals(data.identifier.get(0).system, "http://example.org/studysubjectids"); | ||
assertEquals(data.identifier.get(0).type.text, "Subject id"); | ||
assertEquals(data.identifier.get(0).value, "123"); | ||
assertEquals(data.individual.reference, "Patient/example"); | ||
assertEquals(data.meta.tag.get(0).code, "HTEST"); | ||
assertEquals(data.meta.tag.get(0).display, "test health data"); | ||
assertEquals(data.meta.tag.get(0).system, "http://terminology.hl7.org/CodeSystem/v3-ActReason"); | ||
assertEquals(data.status, CodeSystemResearchSubjectStatus.CANDIDATE); | ||
assertEquals(data.study.reference, "ResearchStudy/example"); | ||
assertEquals(data.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">[Put rendering here]</div>"); | ||
assertEquals(data.text.status, CodeSystemNarrativeStatus.GENERATED); | ||
|
||
String json = parser.fromFhir(data); | ||
|
||
JSONAssert.assertEquals(sourceJson, json, false); | ||
} | ||
} |
65 changes: 65 additions & 0 deletions
65
fhir-java/src-gen/test/java/care/data4life/fhir/stu3/model/ResearchSubjectTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/* | ||
* Copyright (c) 2020 D4L data4life gGmbH / All rights reserved. | ||
* | ||
* D4L owns all legal rights, title and interest in and to the Software Development Kit ("SDK"), | ||
* including any intellectual property rights that subsist in the SDK. | ||
* | ||
* The SDK and its documentation may be accessed and used for viewing/review purposes only. | ||
* Any usage of the SDK for other purposes, including usage for the development of | ||
* applications/third-party applications shall require the conclusion of a license agreement | ||
* between you and D4L. | ||
* | ||
* If you are interested in licensing the SDK for your own applications/third-party | ||
* applications and/or if you’d like to contribute to the development of the SDK, please | ||
* contact D4L by email to [email protected]. | ||
*/ | ||
|
||
package care.data4life.fhir.stu3.model; | ||
|
||
|
||
import org.junit.Test; | ||
import org.skyscreamer.jsonassert.JSONAssert; | ||
|
||
import care.data4life.fhir.stu3.FhirStu3Parser; | ||
import care.data4life.fhir.test.util.FileHelper; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
/** | ||
* ResearchSubjectTest.java | ||
* <p> | ||
* Investigation to increase healthcare-related patient-independent knowledge. | ||
* <p> | ||
* A process where a researcher or organization plans and then executes a series of steps intended | ||
* to increase the field of healthcare-related knowledge. This includes studies of safety, | ||
* efficacy, comparative effectiveness and other information about medications, devices, therapies | ||
* and other interventional and investigative techniques. A ResearchStudy involves the gathering of | ||
* information about human or animal subjects. | ||
* <p> | ||
* <p> | ||
* Generated from FHIR 3.0.1.11917 | ||
*/ | ||
public class ResearchSubjectTest { | ||
|
||
FhirStu3Parser parser = new FhirStu3Parser(); | ||
|
||
@Test | ||
public void testResearchSubject1() throws Exception { | ||
String sourceJson = FileHelper.loadString("stu3/researchsubject-example.json"); | ||
ResearchSubject data = parser.toFhir(ResearchSubject.class, sourceJson); | ||
|
||
assertEquals(data.id, "example"); | ||
assertEquals(data.identifier.system, "http://example.org/studysubjectids"); | ||
assertEquals(data.identifier.type.text, "Subject id"); | ||
assertEquals(data.identifier.value, "123"); | ||
assertEquals(data.individual.reference, "Patient/example"); | ||
assertEquals(data.status, CodeSystemResearchSubjectStatus.CANDIDATE); | ||
assertEquals(data.study.reference, "ResearchStudy/example"); | ||
assertEquals(data.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">[Put rendering here]</div>"); | ||
assertEquals(data.text.status, CodeSystemNarrativeStatus.GENERATED); | ||
|
||
String json = parser.fromFhir(data); | ||
|
||
JSONAssert.assertEquals(sourceJson, json, false); | ||
} | ||
} |