forked from robeastwood-agency/fhir-mapping-experiments
-
Notifications
You must be signed in to change notification settings - Fork 0
/
coveragev14toR4.map
65 lines (42 loc) · 2.39 KB
/
coveragev14toR4.map
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
map "http://example/fhir/StructureMap/Coveragev14to4" = "v1.4 to R4 Conversions for Coverage"
uses "http://example.org/fhir/StructureDefinition/Coveragev14" alias Coveragev14 as source
uses "http://example.org/fhir/StructureDefinition/CoverageR4" alias CoverageR4 as target
group Coverage(source src : Coveragev14, target tgt : CoverageR4) {
// Coverage.issuerIdentifier
// Coverage.issuerReference -> Coverage.payor (4 attempts)
src.issuerReference as issuerreference -> tgt.payor = issuerreference "issuerreference1";
src.issuer as issuer2 -> tgt.payor = issuer2 "issuerreference2";
src.issuer as issuer3 where $this.ofType(FHIR.Reference) -> tgt.payor = issuer3 "issuerreference3";
src.issuer as issuer4 where $this.ofType('Reference') -> tgt.payor = issuer4 "issuerreference4";
// Coverage.bin
// Coverage.period -> Coverage.period
src.period as srcperiod -> tgt.period = srcperiod "period";
// Coverage.type (Coding) -> Coverage.type (CodeableConcept)
// Coverage.planholderIdentifier
// Coverage.planholderReference
// Coverage.beneficiaryIdentifier
// Coverage.beneficiaryReference -> Coverage.beneficiary
src.beneficiaryReference as srcbeneficiary -> tgt.beneficiary = srcbeneficiary "beneficiary";
// Coverage.relationship (Coding) -> Coverage.relationship (CodeableConcept)
src.relationship as srcrelationship -> tgt.relationship = create('CodeableConcept') as tgtrelationship then {
srcrelationship -> tgtrelationship.coding = create('Coding') as coding then {
srcrelationship.system as srcsystem -> coding.system = srcsystem "system";
srcrelationship.code as srccode -> coding.code = srccode "code";
srcrelationship.display as srcdisplay -> coding.display = srcdisplay "display";
}"coding";
} "srcrelationship";
// Coverage.identifier -> Coverage.identifier
src.identifier as srcidentifier -> tgt.identifier = srcidentifier "identifier";
// Coverage.group
// Coverage.plan
// Coverage.subPlan
// Coverage.dependent -> Coverage.dependent
src.dependent as srcdependent -> tgt.dependent = srcdependent "dependent";
// Coverage.sequence
// Coverage.exception
// Coverage.school
// Coverage.network -> Coverage.network
src.network as srcnetwork -> tgt.network = srcnetwork "network" ;
// Coverage.contract -> Coverage.contract
src.contract as srccontract -> tgt.contract = srccontract "contract";
}