Skip to content

Commit

Permalink
test complete opt with participations
Browse files Browse the repository at this point in the history
  • Loading branch information
ppazos committed Nov 27, 2024
1 parent 513537f commit 2e1bc11
Show file tree
Hide file tree
Showing 8 changed files with 3,999 additions and 14 deletions.
2,881 changes: 2,881 additions & 0 deletions a_opt_complete.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = 2.0.3
version = 2.0.4
group = com.cabolabs
Original file line number Diff line number Diff line change
Expand Up @@ -669,8 +669,8 @@ class RmInstanceGenerator {
}

// TEST
println "Generates for "+ obj.dataPath
if (obj.archetypeId) println obj.ownerArchetypeRoot.getText('at0000')
//println "Generates for "+ obj.dataPath
//if (obj.archetypeId) println obj.ownerArchetypeRoot.getText('at0000')

// NOTE: this is always one object
//println "instance: "+ instances.size()
Expand Down
25 changes: 18 additions & 7 deletions src/main/groovy/com/cabolabs/openehr/rm_1_0_2/Model.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ class Model {
'context': 'EVENT_CONTEXT' // if no other_context is specified the event context is not on the OPT, we need to check if it is or not to avoid double indexing.
],
'EVENT_CONTEXT': [
'setting': 'DV_CODED_TEXT',
'location': 'String',
'start_time': 'DV_DATE_TIME',
'end_time': 'DV_DATE_TIME'
'setting': 'DV_CODED_TEXT',
'location': 'String',
'start_time': 'DV_DATE_TIME',
'end_time': 'DV_DATE_TIME',
'participations': 'PARTICIPATION'
],
'ACTION': [
'time': 'DV_DATE_TIME',
Expand Down Expand Up @@ -108,6 +109,9 @@ class Model {
COMPOSITION: [
'content'
],
EVENT_CONTEXT: [
'participations'
],
SECTION: [
'items'
],
Expand Down Expand Up @@ -539,14 +543,21 @@ class Model {
value: 'String'
],

PARTICIPATION: [
function: 'DV_TEXT',
mode: 'DV_CODED_TEXT',
time: 'DV_INTERVAL<DV_DATE_TIME>',
performer: ['PARTY_IDENTIFIED', 'PARTY_RELATED', 'PARTY_SELF']
],

DV_BOOLEAN: [
value: 'Boolean'
],
DV_IDENTIFIER: [
issuer: 'String',
issuer: 'String',
assigner: 'String',
id: 'String',
type: 'String'
id: 'String',
type: 'String'
],

DV_TEXT: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import com.cabolabs.openehr.rm_1_0_2.support.identification.HierObjectId

class OriginalVersion extends Version {

List<Attestation> attestations = []
List<Attestation> attestations
Set<ObjectVersionId> other_input_version_uids


HierObjectId owner_id()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ abstract class Version {
ObjectRef contribution
String signature

//abstract List<ObjectVersionId> other_input_version_uids() // ???

abstract HierObjectId owner_id()
abstract Boolean is_branch()
abstract String canonical_form()
Expand Down
1,094 changes: 1,094 additions & 0 deletions src/main/resources/canonical_json/contribution_lab_results_w_attestation.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class OPTParserTest extends GroovyTestCase {
opt.complete()
toJson.serialize(opt)
def complete = toJson.get(true)
//new File('complete.json') << toJson.get(true)
new File('a_opt_complete.json') << toJson.get(true)

assert incomplete.size() < complete.size()
}
Expand Down

0 comments on commit 2e1bc11

Please sign in to comment.