More generator progress

This commit is contained in:
jamesagnew 2014-02-21 18:30:08 -05:00
parent 0fff9075f1
commit c878922362
25 changed files with 2818 additions and 619 deletions

View File

@ -1,3 +1,5 @@
package ca.uhn.fhir.model.datatype;
import java.util.*;
@ -6,7 +8,7 @@ import ca.uhn.fhir.model.api.annotation.*;
import ca.uhn.fhir.model.datatype.*;
/**
* HAPI/FHIR <b>${resourceName}</b> Datatype
* HAPI/FHIR <b>Address</b> Datatype
* (A postal address)
*
* <p>
@ -16,7 +18,7 @@ import ca.uhn.fhir.model.datatype.*;
*
* <p>
* <b>Requirements:</b>
* A postal address
* Need to be able to record postal addresses, along with notes about their use
* </p>
*/
@DatatypeDef(name="Address")
@ -26,25 +28,25 @@ public class AddressDt extends BaseCompositeDatatype {
private CodeDt myUse;
@Child(name="text", order=1, min=0, max=1)
private String myText;
private StringDt myText;
@Child(name="line", order=2, min=0, max=Child.MAX_UNLIMITED)
private List<String> myLine;
private List<StringDt> myLine;
@Child(name="city", order=3, min=0, max=1)
private String myCity;
private StringDt myCity;
@Child(name="state", order=4, min=0, max=1)
private String myState;
private StringDt myState;
@Child(name="zip", order=5, min=0, max=1)
private String myZip;
private StringDt myZip;
@Child(name="country", order=6, min=0, max=1)
private String myCountry;
private StringDt myCountry;
@Child(name="period", order=7, min=0, max=1)
private Period myPeriod;
private PeriodDt myPeriod;
/**
* Gets the value(s) for use (home | work | temp | old - purpose of this address)
@ -78,7 +80,7 @@ public class AddressDt extends BaseCompositeDatatype {
* A full text representation of the address
* </p>
*/
public String getText() {
public StringDt getText() {
return myText;
}
@ -90,7 +92,7 @@ public class AddressDt extends BaseCompositeDatatype {
* A full text representation of the address
* </p>
*/
public void setText(String theValue) {
public void setText(StringDt theValue) {
myText = theValue;
}
@ -103,7 +105,7 @@ public class AddressDt extends BaseCompositeDatatype {
P.O. Box number, delivery hints, and similar address information
* </p>
*/
public List<String> getLine() {
public List<StringDt> getLine() {
return myLine;
}
@ -116,7 +118,7 @@ P.O. Box number, delivery hints, and similar address information
P.O. Box number, delivery hints, and similar address information
* </p>
*/
public void setLine(List<String> theValue) {
public void setLine(List<StringDt> theValue) {
myLine = theValue;
}
@ -128,7 +130,7 @@ P.O. Box number, delivery hints, and similar address information
* The name of the city, town, village or other community or delivery center.
* </p>
*/
public String getCity() {
public StringDt getCity() {
return myCity;
}
@ -140,7 +142,7 @@ P.O. Box number, delivery hints, and similar address information
* The name of the city, town, village or other community or delivery center.
* </p>
*/
public void setCity(String theValue) {
public void setCity(StringDt theValue) {
myCity = theValue;
}
@ -152,7 +154,7 @@ P.O. Box number, delivery hints, and similar address information
* Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).
* </p>
*/
public String getState() {
public StringDt getState() {
return myState;
}
@ -164,7 +166,7 @@ P.O. Box number, delivery hints, and similar address information
* Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).
* </p>
*/
public void setState(String theValue) {
public void setState(StringDt theValue) {
myState = theValue;
}
@ -176,7 +178,7 @@ P.O. Box number, delivery hints, and similar address information
* A postal code designating a region defined by the postal service.
* </p>
*/
public String getZip() {
public StringDt getZip() {
return myZip;
}
@ -188,7 +190,7 @@ P.O. Box number, delivery hints, and similar address information
* A postal code designating a region defined by the postal service.
* </p>
*/
public void setZip(String theValue) {
public void setZip(StringDt theValue) {
myZip = theValue;
}
@ -200,7 +202,7 @@ P.O. Box number, delivery hints, and similar address information
* Country - a nation as commonly understood or generally accepted
* </p>
*/
public String getCountry() {
public StringDt getCountry() {
return myCountry;
}
@ -212,7 +214,7 @@ P.O. Box number, delivery hints, and similar address information
* Country - a nation as commonly understood or generally accepted
* </p>
*/
public void setCountry(String theValue) {
public void setCountry(StringDt theValue) {
myCountry = theValue;
}
@ -224,7 +226,7 @@ P.O. Box number, delivery hints, and similar address information
* Time period when address was/is in use
* </p>
*/
public Period getPeriod() {
public PeriodDt getPeriod() {
return myPeriod;
}
@ -236,7 +238,7 @@ P.O. Box number, delivery hints, and similar address information
* Time period when address was/is in use
* </p>
*/
public void setPeriod(Period theValue) {
public void setPeriod(PeriodDt theValue) {
myPeriod = theValue;
}

View File

@ -9,10 +9,10 @@ import ca.uhn.fhir.model.api.annotation.Description;
public class AttachmentDt extends BaseCompositeDatatype {
@Child(name="contentType", order=0, min=1)
private CodeDt<?> myContentType;
private CodeDt myContentType;
@Child(name="language", order=1)
private CodeDt<?> myLanguage;
private CodeDt myLanguage;
@Child(name="data", order=2)
private Base64BinaryDt myData;
@ -31,19 +31,19 @@ public class AttachmentDt extends BaseCompositeDatatype {
@Description("Label to display in place of the data")
private StringDt myTitle;
public CodeDt<?> getContentType() {
public CodeDt getContentType() {
return myContentType;
}
public void setContentType(CodeDt<?> theContentType) {
public void setContentType(CodeDt theContentType) {
myContentType = theContentType;
}
public CodeDt<?> getLanguage() {
public CodeDt getLanguage() {
return myLanguage;
}
public void setLanguage(CodeDt<?> theLanguage) {
public void setLanguage(CodeDt theLanguage) {
myLanguage = theLanguage;
}

View File

@ -6,7 +6,7 @@ import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.parser.DataFormatException;
@DatatypeDef(name = "code")
public class CodeDt<T extends ICodeEnum> extends BasePrimitiveDatatype<String> implements ICodedDatatype {
public class CodeDt extends BasePrimitiveDatatype<String> implements ICodedDatatype {
private String myValue;

View File

@ -3,12 +3,11 @@ package ca.uhn.fhir.model.datatype;
import java.util.List;
import ca.uhn.fhir.model.api.BaseCompositeDatatype;
import ca.uhn.fhir.model.api.ICodeEnum;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
@DatatypeDef(name="CodeableConcept")
public class CodeableConceptDt<T extends ICodeEnum> extends BaseCompositeDatatype implements ICodedDatatype {
public class CodeableConceptDt extends BaseCompositeDatatype implements ICodedDatatype {
@Child(name="coding", order=0, min=0, max=Child.MAX_UNLIMITED)
private List<CodingDt> myCoding;

View File

@ -18,7 +18,7 @@ public class CodingDt extends BaseCompositeDatatype {
private StringDt myVersion;
@Child(name="code", order=2)
private CodeDt<?> myCode;
private CodeDt myCode;
@Child(name="display", order=3)
private StringDt myDisplay;
@ -46,11 +46,11 @@ public class CodingDt extends BaseCompositeDatatype {
myVersion = theVersion;
}
public CodeDt<?> getCode() {
public CodeDt getCode() {
return myCode;
}
public void setCode(CodeDt<?> theCode) {
public void setCode(CodeDt theCode) {
myCode = theCode;
}

View File

@ -1,3 +1,5 @@
package ca.uhn.fhir.model.datatype;
import java.util.*;
@ -6,7 +8,7 @@ import ca.uhn.fhir.model.api.annotation.*;
import ca.uhn.fhir.model.datatype.*;
/**
* HAPI/FHIR <b>${resourceName}</b> Datatype
* HAPI/FHIR <b>Contact</b> Datatype
* (Technology mediated contact details (phone, fax, email, etc))
*
* <p>
@ -16,7 +18,7 @@ import ca.uhn.fhir.model.datatype.*;
*
* <p>
* <b>Requirements:</b>
* Technology mediated contact details (phone, fax, email, etc)
* Need to track phone, fax, mobile, sms numbers, email addresses, twitter tags, etc.
* </p>
*/
@DatatypeDef(name="Contact")
@ -26,13 +28,13 @@ public class ContactDt extends BaseCompositeDatatype {
private CodeDt mySystem;
@Child(name="value", order=1, min=0, max=1)
private String myValue;
private StringDt myValue;
@Child(name="use", order=2, min=0, max=1)
private CodeDt myUse;
@Child(name="period", order=3, min=0, max=1)
private Period myPeriod;
private PeriodDt myPeriod;
/**
* Gets the value(s) for system (phone | fax | email | url)
@ -66,7 +68,7 @@ public class ContactDt extends BaseCompositeDatatype {
* The actual contact details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).
* </p>
*/
public String getValue() {
public StringDt getValue() {
return myValue;
}
@ -78,7 +80,7 @@ public class ContactDt extends BaseCompositeDatatype {
* The actual contact details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).
* </p>
*/
public void setValue(String theValue) {
public void setValue(StringDt theValue) {
myValue = theValue;
}
@ -114,7 +116,7 @@ public class ContactDt extends BaseCompositeDatatype {
* Time period when the contact was/is in use
* </p>
*/
public Period getPeriod() {
public PeriodDt getPeriod() {
return myPeriod;
}
@ -126,7 +128,7 @@ public class ContactDt extends BaseCompositeDatatype {
* Time period when the contact was/is in use
* </p>
*/
public void setPeriod(Period theValue) {
public void setPeriod(PeriodDt theValue) {
myPeriod = theValue;
}

View File

@ -1,3 +1,5 @@
package ca.uhn.fhir.model.datatype;
import java.util.*;
@ -6,7 +8,7 @@ import ca.uhn.fhir.model.api.annotation.*;
import ca.uhn.fhir.model.datatype.*;
/**
* HAPI/FHIR <b>${resourceName}</b> Datatype
* HAPI/FHIR <b>HumanName</b> Datatype
* (Name of a human - parts and usage)
*
* <p>
@ -16,7 +18,7 @@ import ca.uhn.fhir.model.datatype.*;
*
* <p>
* <b>Requirements:</b>
* Name of a human - parts and usage
* Need to be able to record names, along with notes about their use
* </p>
*/
@DatatypeDef(name="HumanName")
@ -26,22 +28,22 @@ public class HumanNameDt extends BaseCompositeDatatype {
private CodeDt myUse;
@Child(name="text", order=1, min=0, max=1)
private String myText;
private StringDt myText;
@Child(name="family", order=2, min=0, max=Child.MAX_UNLIMITED)
private List<String> myFamily;
private List<StringDt> myFamily;
@Child(name="given", order=3, min=0, max=Child.MAX_UNLIMITED)
private List<String> myGiven;
private List<StringDt> myGiven;
@Child(name="prefix", order=4, min=0, max=Child.MAX_UNLIMITED)
private List<String> myPrefix;
private List<StringDt> myPrefix;
@Child(name="suffix", order=5, min=0, max=Child.MAX_UNLIMITED)
private List<String> mySuffix;
private List<StringDt> mySuffix;
@Child(name="period", order=6, min=0, max=1)
private Period myPeriod;
private PeriodDt myPeriod;
/**
* Gets the value(s) for use (usual | official | temp | nickname | anonymous | old | maiden)
@ -75,7 +77,7 @@ public class HumanNameDt extends BaseCompositeDatatype {
* A full text representation of the name
* </p>
*/
public String getText() {
public StringDt getText() {
return myText;
}
@ -87,7 +89,7 @@ public class HumanNameDt extends BaseCompositeDatatype {
* A full text representation of the name
* </p>
*/
public void setText(String theValue) {
public void setText(StringDt theValue) {
myText = theValue;
}
@ -99,7 +101,7 @@ public class HumanNameDt extends BaseCompositeDatatype {
* The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.
* </p>
*/
public List<String> getFamily() {
public List<StringDt> getFamily() {
return myFamily;
}
@ -111,7 +113,7 @@ public class HumanNameDt extends BaseCompositeDatatype {
* The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.
* </p>
*/
public void setFamily(List<String> theValue) {
public void setFamily(List<StringDt> theValue) {
myFamily = theValue;
}
@ -123,7 +125,7 @@ public class HumanNameDt extends BaseCompositeDatatype {
* Given name
* </p>
*/
public List<String> getGiven() {
public List<StringDt> getGiven() {
return myGiven;
}
@ -135,7 +137,7 @@ public class HumanNameDt extends BaseCompositeDatatype {
* Given name
* </p>
*/
public void setGiven(List<String> theValue) {
public void setGiven(List<StringDt> theValue) {
myGiven = theValue;
}
@ -147,7 +149,7 @@ public class HumanNameDt extends BaseCompositeDatatype {
* Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name
* </p>
*/
public List<String> getPrefix() {
public List<StringDt> getPrefix() {
return myPrefix;
}
@ -159,7 +161,7 @@ public class HumanNameDt extends BaseCompositeDatatype {
* Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name
* </p>
*/
public void setPrefix(List<String> theValue) {
public void setPrefix(List<StringDt> theValue) {
myPrefix = theValue;
}
@ -171,7 +173,7 @@ public class HumanNameDt extends BaseCompositeDatatype {
* Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name
* </p>
*/
public List<String> getSuffix() {
public List<StringDt> getSuffix() {
return mySuffix;
}
@ -183,7 +185,7 @@ public class HumanNameDt extends BaseCompositeDatatype {
* Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name
* </p>
*/
public void setSuffix(List<String> theValue) {
public void setSuffix(List<StringDt> theValue) {
mySuffix = theValue;
}
@ -195,7 +197,7 @@ public class HumanNameDt extends BaseCompositeDatatype {
* Indicates the period of time when this name was valid for the named person.
* </p>
*/
public Period getPeriod() {
public PeriodDt getPeriod() {
return myPeriod;
}
@ -207,7 +209,7 @@ public class HumanNameDt extends BaseCompositeDatatype {
* Indicates the period of time when this name was valid for the named person.
* </p>
*/
public void setPeriod(Period theValue) {
public void setPeriod(PeriodDt theValue) {
myPeriod = theValue;
}

View File

@ -14,7 +14,7 @@ public class IdentifierDt extends BaseCompositeDatatype {
@Child(name="use", order=0)
@CodeableConceptElement(type=IdentifierUseEnum.class)
private CodeDt<IdentifierUseEnum> myUse;
private CodeDt myUse;
@Child(name="label", order=1)
private StringDt myLabel;
@ -32,11 +32,11 @@ public class IdentifierDt extends BaseCompositeDatatype {
@ChildResource(types= {Organization.class})
private ResourceReference myAssigner;
public CodeDt<IdentifierUseEnum> getUse() {
public CodeDt getUse() {
return myUse;
}
public void setUse(CodeDt<IdentifierUseEnum> theUse) {
public void setUse(CodeDt theUse) {
myUse = theUse;
}

View File

@ -1,37 +1,82 @@
package ca.uhn.fhir.model.datatype;
import ca.uhn.fhir.model.api.BaseCompositeDatatype;
import ca.uhn.fhir.model.api.CodeableConceptElement;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.enm.NarrativeStatusEnum;
import java.util.*;
import ca.uhn.fhir.model.api.*;
import ca.uhn.fhir.model.api.annotation.*;
import ca.uhn.fhir.model.datatype.*;
@DatatypeDef(name="Narrative")
/**
* HAPI/FHIR <b>Narrative</b> Datatype
* (A human-readable formatted text, including images)
*
* <p>
* <b>Definition:</b>
* A human-readable formatted text, including images
* </p>
*
* <p>
* <b>Requirements:</b>
*
* </p>
*/
@DatatypeDef(name="Narrative")
public class NarrativeDt extends BaseCompositeDatatype {
@Child(name="status", order=0, min=1)
@CodeableConceptElement(type=NarrativeStatusEnum.class)
private CodeDt<NarrativeStatusEnum> myStatus;
@Child(name="div", order=1)
private StringDt myDiv;
@Child(name="status", order=0, min=1, max=1)
private CodeDt myStatus;
public StringDt getDiv() {
return myDiv;
}
public CodeDt<NarrativeStatusEnum> getStatus() {
@Child(name="div", order=1, min=1, max=1)
private XhtmlDt myDiv;
/**
* Gets the value(s) for status (generated | extensions | additional)
*
* <p>
* <b>Definition:</b>
* The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data
* </p>
*/
public CodeDt getStatus() {
return myStatus;
}
public void setDiv(StringDt theDiv) {
myDiv = theDiv;
/**
* Sets the value(s) for status (generated | extensions | additional)
*
* <p>
* <b>Definition:</b>
* The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data
* </p>
*/
public void setStatus(CodeDt theValue) {
myStatus = theValue;
}
public void setStatus(CodeDt<NarrativeStatusEnum> theStatus) {
myStatus = theStatus;
}
}
/**
* Gets the value(s) for div (Limited xhtml content)
*
* <p>
* <b>Definition:</b>
* The actual narrative content, a stripped down version of XHTML
* </p>
*/
public XhtmlDt getDiv() {
return myDiv;
}
/**
* Sets the value(s) for div (Limited xhtml content)
*
* <p>
* <b>Definition:</b>
* The actual narrative content, a stripped down version of XHTML
* </p>
*/
public void setDiv(XhtmlDt theValue) {
myDiv = theValue;
}
}

View File

@ -1,69 +1,163 @@
package ca.uhn.fhir.model.datatype;
import ca.uhn.fhir.model.api.BaseCompositeDatatype;
import ca.uhn.fhir.model.api.annotation.Constraint;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.enm.QuantityComparatorEnum;
import java.util.*;
import ca.uhn.fhir.model.api.*;
import ca.uhn.fhir.model.api.annotation.*;
import ca.uhn.fhir.model.datatype.*;
@DatatypeDef(name="Quantity")
/**
* HAPI/FHIR <b>Quantity</b> Datatype
* (A measured or measurable amount)
*
* <p>
* <b>Definition:</b>
* A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies
* </p>
*
* <p>
* <b>Requirements:</b>
* Need to able to capture all sorts of measured values, even if the measured value are not precisely quantified. Values include exact measures such as 3.51g, customary units such as 3 tablets, and currencies such as $100.32USD
* </p>
*/
@DatatypeDef(name="Quantity")
public class QuantityDt extends BaseCompositeDatatype {
@Child(name="value",order=0, min=0, max=1)
@Child(name="value", order=0, min=0, max=1)
private DecimalDt myValue;
@Child(name="comparator",order=1, min=0, max=1)
private CodeDt<QuantityComparatorEnum> myComparator;
@Child(name="comparator", order=1, min=0, max=1)
private CodeDt myComparator;
@Child(name="units",order=2, min=0, max=1)
@Child(name="units", order=2, min=0, max=1)
private StringDt myUnits;
@Child(name="system",order=3, min=0, max=1)
@Constraint(coRequirements= {"code"})
@Child(name="system", order=3, min=0, max=1)
private UriDt mySystem;
@Child(name="code",order=4, min=0, max=1)
@Constraint(coRequirements= {"system"})
private CodeDt<?> myCode;
@Child(name="code", order=4, min=0, max=1)
private CodeDt myCode;
/**
* Gets the value(s) for value (Numerical value (with implicit precision))
*
* <p>
* <b>Definition:</b>
* The value of the measured amount. The value includes an implicit precision in the presentation of the value
* </p>
*/
public DecimalDt getValue() {
return myValue;
}
/**
* Sets the value(s) for value (Numerical value (with implicit precision))
*
* <p>
* <b>Definition:</b>
* The value of the measured amount. The value includes an implicit precision in the presentation of the value
* </p>
*/
public void setValue(DecimalDt theValue) {
myValue = theValue;
}
public CodeDt<QuantityComparatorEnum> getComparator() {
/**
* Gets the value(s) for comparator (< | <= | >= | > - how to understand the value)
*
* <p>
* <b>Definition:</b>
* How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is "<" , then the real value is < stated value
* </p>
*/
public CodeDt getComparator() {
return myComparator;
}
public void setComparator(CodeDt<QuantityComparatorEnum> theComparator) {
myComparator = theComparator;
/**
* Sets the value(s) for comparator (< | <= | >= | > - how to understand the value)
*
* <p>
* <b>Definition:</b>
* How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is "<" , then the real value is < stated value
* </p>
*/
public void setComparator(CodeDt theValue) {
myComparator = theValue;
}
/**
* Gets the value(s) for units (Unit representation)
*
* <p>
* <b>Definition:</b>
* A human-readable form of the units
* </p>
*/
public StringDt getUnits() {
return myUnits;
}
public void setUnits(StringDt theUnits) {
myUnits = theUnits;
/**
* Sets the value(s) for units (Unit representation)
*
* <p>
* <b>Definition:</b>
* A human-readable form of the units
* </p>
*/
public void setUnits(StringDt theValue) {
myUnits = theValue;
}
/**
* Gets the value(s) for system (System that defines coded unit form)
*
* <p>
* <b>Definition:</b>
* The identification of the system that provides the coded form of the unit
* </p>
*/
public UriDt getSystem() {
return mySystem;
}
public void setSystem(UriDt theSystem) {
mySystem = theSystem;
/**
* Sets the value(s) for system (System that defines coded unit form)
*
* <p>
* <b>Definition:</b>
* The identification of the system that provides the coded form of the unit
* </p>
*/
public void setSystem(UriDt theValue) {
mySystem = theValue;
}
public CodeDt<?> getCode() {
/**
* Gets the value(s) for code (Coded form of the unit)
*
* <p>
* <b>Definition:</b>
* A computer processable form of the units in some unit representation system
* </p>
*/
public CodeDt getCode() {
return myCode;
}
public void setCode(CodeDt<?> theCode) {
myCode = theCode;
/**
* Sets the value(s) for code (Coded form of the unit)
*
* <p>
* <b>Definition:</b>
* A computer processable form of the units in some unit representation system
* </p>
*/
public void setCode(CodeDt theValue) {
myCode = theValue;
}
}
}

View File

@ -0,0 +1,30 @@
package ca.uhn.fhir.model.datatype;
import ca.uhn.fhir.model.api.IPrimitiveDatatype;
import ca.uhn.fhir.parser.DataFormatException;
public class XhtmlDt implements IPrimitiveDatatype<String> {
private String myValue;
@Override
public void setValueAsString(String theValue) throws DataFormatException {
myValue=theValue;
}
@Override
public String getValueAsString() {
return myValue;
}
@Override
public String getValue() {
return myValue;
}
@Override
public void setValue(String theValue) throws DataFormatException {
myValue=theValue;
}
}

View File

@ -27,6 +27,7 @@ import ca.uhn.fhir.model.enm.ObservationCodesEnum;
import ca.uhn.fhir.model.enm.ObservationInterpretationEnum;
import ca.uhn.fhir.model.enm.ObservationMethodEnum;
import ca.uhn.fhir.model.enm.ObservationRelationshipTypeEnum;
import ca.uhn.fhir.model.enm.ObservationReliabilityEnum;
import ca.uhn.fhir.model.enm.ObservationStatusEnum;
import ca.uhn.fhir.model.enm.ReferenceRangeMeaningEnum;
@ -35,7 +36,7 @@ public class Observation extends BaseResourceWithIdentifier {
@Child(name="name", order=0, min=1, max=1)
@CodeableConceptElement(type=ObservationCodesEnum.class)
private CodeableConceptDt<ObservationCodesEnum> myName;
private CodeableConceptDt myName;
@Child(name="value", order=1, min=0, max=1, choice=@Choice(types= {
QuantityDt.class,
@ -50,7 +51,7 @@ public class Observation extends BaseResourceWithIdentifier {
@Child(name="interpretation", order=2)
@CodeableConceptElement(type=ObservationInterpretationEnum.class)
private CodeableConceptDt<ObservationInterpretationEnum> myInterpretation;
private CodeableConceptDt myInterpretation;
@Child(name="comments", order=3)
private StringDt myComments;
@ -66,19 +67,19 @@ public class Observation extends BaseResourceWithIdentifier {
@Child(name="status", order=6, min=1)
@CodeableConceptElement(type=ObservationStatusEnum.class)
private CodeableConceptDt<ObservationStatusEnum> myStatus;
private CodeableConceptDt myStatus;
@Child(name="reliability", order=7, min=1)
@CodeableConceptElement(type=ObservationStatusEnum.class)
private CodeableConceptDt<ObservationStatusEnum> myReliability;
@CodeableConceptElement(type=ObservationReliabilityEnum.class)
private CodeableConceptDt myReliability;
@Child(name="bodySite", order=8)
@CodeableConceptElement(type=BodySiteEnum.class)
private CodeableConceptDt<BodySiteEnum> myBodySite;
private CodeableConceptDt myBodySite;
@Child(name="method", order=9)
@CodeableConceptElement(type=ObservationMethodEnum.class)
private CodeableConceptDt<ObservationMethodEnum> myMethod;
private CodeableConceptDt myMethod;
@Child(name="subject", order=11)
@ChildResource(types= {
@ -109,7 +110,7 @@ public class Observation extends BaseResourceWithIdentifier {
{
@Child(name="type", order = 0)
@CodeableConceptElement(type=ObservationRelationshipTypeEnum.class)
private CodeDt<ObservationRelationshipTypeEnum> myType;
private CodeDt myType;
@Child(name="target", order = 1)
@ChildResource(types= {
@ -117,11 +118,11 @@ public class Observation extends BaseResourceWithIdentifier {
})
private ResourceReference myTarget;
public CodeDt<ObservationRelationshipTypeEnum> getType() {
public CodeDt getType() {
return myType;
}
public void setType(CodeDt<ObservationRelationshipTypeEnum> theType) {
public void setType(CodeDt theType) {
myType = theType;
}
@ -147,7 +148,7 @@ public class Observation extends BaseResourceWithIdentifier {
@Child(name="meaning", order=2)
@CodeableConceptElement(type=ReferenceRangeMeaningEnum.class)
private CodeableConceptDt<ReferenceRangeMeaningEnum> myMeaning;
private CodeableConceptDt myMeaning;
@Child(name="age", order=3)
private RangeDt myAge;
@ -168,11 +169,11 @@ public class Observation extends BaseResourceWithIdentifier {
myHigh = theHigh;
}
public CodeableConceptDt<ReferenceRangeMeaningEnum> getMeaning() {
public CodeableConceptDt getMeaning() {
return myMeaning;
}
public void setMeaning(CodeableConceptDt<ReferenceRangeMeaningEnum> theMeaning) {
public void setMeaning(CodeableConceptDt theMeaning) {
myMeaning = theMeaning;
}
@ -187,11 +188,11 @@ public class Observation extends BaseResourceWithIdentifier {
}
public CodeableConceptDt<ObservationCodesEnum> getName() {
public CodeableConceptDt getName() {
return myName;
}
public void setName(CodeableConceptDt<ObservationCodesEnum> theName) {
public void setName(CodeableConceptDt theName) {
myName = theName;
}
@ -203,11 +204,11 @@ public class Observation extends BaseResourceWithIdentifier {
myValue = theValue;
}
public CodeableConceptDt<ObservationInterpretationEnum> getInterpretation() {
public CodeableConceptDt getInterpretation() {
return myInterpretation;
}
public void setInterpretation(CodeableConceptDt<ObservationInterpretationEnum> theInterpretation) {
public void setInterpretation(CodeableConceptDt theInterpretation) {
myInterpretation = theInterpretation;
}
@ -235,35 +236,35 @@ public class Observation extends BaseResourceWithIdentifier {
myIssued = theIssued;
}
public CodeableConceptDt<ObservationStatusEnum> getStatus() {
public CodeableConceptDt getStatus() {
return myStatus;
}
public void setStatus(CodeableConceptDt<ObservationStatusEnum> theStatus) {
public void setStatus(CodeableConceptDt theStatus) {
myStatus = theStatus;
}
public CodeableConceptDt<ObservationStatusEnum> getReliability() {
public CodeableConceptDt getReliability() {
return myReliability;
}
public void setReliability(CodeableConceptDt<ObservationStatusEnum> theReliability) {
public void setReliability(CodeableConceptDt theReliability) {
myReliability = theReliability;
}
public CodeableConceptDt<BodySiteEnum> getBodySite() {
public CodeableConceptDt getBodySite() {
return myBodySite;
}
public void setBodySite(CodeableConceptDt<BodySiteEnum> theBodySite) {
public void setBodySite(CodeableConceptDt theBodySite) {
myBodySite = theBodySite;
}
public CodeableConceptDt<ObservationMethodEnum> getMethod() {
public CodeableConceptDt getMethod() {
return myMethod;
}
public void setMethod(CodeableConceptDt<ObservationMethodEnum> theMethod) {
public void setMethod(CodeableConceptDt theMethod) {
myMethod = theMethod;
}

View File

@ -1,12 +1,13 @@
package ca.uhn.fhir.starter;
import static org.apache.commons.lang.StringUtils.*;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
@ -18,8 +19,11 @@ import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import ch.qos.logback.core.db.dialect.MySQLDialect;
import ca.uhn.fhir.model.api.IDatatype;
import ca.uhn.fhir.model.api.ResourceReference;
import ca.uhn.fhir.model.datatype.CodeDt;
import ca.uhn.fhir.model.datatype.CodeableConceptDt;
import ca.uhn.fhir.starter.model.BaseElement;
import ca.uhn.fhir.starter.model.Child;
import ca.uhn.fhir.starter.model.Resource;
@ -30,6 +34,15 @@ public abstract class BaseParser {
private String myDirectory;
private String myOutputFile;
private int myColName;
private int myColCard;
private int myColType;
private int myColBinding;
private int myColShortName;
private int myColDefinition;
private int myColV2Mapping;
private int myColRequirements;
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(BaseParser.class);
public void parse() throws Exception {
File baseDir = new File(myDirectory);
@ -49,6 +62,9 @@ public abstract class BaseParser {
NodeList rows = table.getElementsByTagName("Row");
Element defRow = (Element) rows.item(0);
parseFirstRow(defRow);
Element resourceRow = (Element) rows.item(1);
Resource resource = new Resource();
parseBasicElements(resourceRow, resource);
@ -63,7 +79,7 @@ public abstract class BaseParser {
continue;
}
String type = cellValue(nextRow, 5);
String type = cellValue(nextRow, myColType);
Child elem;
if (StringUtils.isBlank(type) || type.startsWith("=")) {
@ -81,9 +97,19 @@ public abstract class BaseParser {
elemName = elemName.substring(0, 1).toUpperCase() + elemName.substring(1);
if (elem instanceof ResourceBlock) {
elem.setReferenceType(elemName);
}else {
} else {
elem.setReferenceType(elemName + "Dt");
}
// if
// (elem.getReferenceType().equals(CodeDt.class.getSimpleName())
// ||
// elem.getReferenceType().equals(CodeableConceptDt.class.getSimpleName()))
// {
// elem.setReferenceType(elemName + "Dt<" + elem.getBinding() +
// "Enum>");
// }
} else {
elem.setReferenceType(IDatatype.class.getSimpleName());
}
@ -92,6 +118,16 @@ public abstract class BaseParser {
elem.setReferenceType("List<" + elem.getReferenceType() + ">");
}
for (int childIdx = 0; childIdx < elem.getType().size(); childIdx++) {
String nextType = elem.getType().get(childIdx);
if (elem.isResourceRef()) {
nextType = nextType.substring(0, 1).toUpperCase() + nextType.substring(1);
} else {
nextType = nextType.substring(0, 1).toUpperCase() + nextType.substring(1) + "Dt";
}
elem.getType().set(childIdx, nextType);
}
elements.put(elem.getName(), elem);
BaseElement parent = elements.get(elem.getElementParentName());
if (parent == null) {
@ -105,8 +141,6 @@ public abstract class BaseParser {
}
protected abstract void parseBasicElements(Element theResourceRow, BaseElement theElem);
public void setDirectory(String theDirectory) {
myDirectory = theDirectory;
}
@ -142,20 +176,24 @@ public abstract class BaseParser {
return null;
}
private void write(Resource theResource) throws IOException {
File f = new File(myOutputFile);
FileWriter w = new FileWriter(f, false);
ourLog.info("Writing file: {}", f.getAbsolutePath());
VelocityContext ctx = new VelocityContext();
ctx.put("className", theResource.getName());
ctx.put("shortName", theResource.getShortName());
ctx.put("definition", theResource.getDefinition());
ctx.put("requirements", theResource.getRequirement());
ctx.put("shortName", defaultString(theResource.getShortName()));
ctx.put("definition", defaultString(theResource.getDefinition()));
ctx.put("requirements", defaultString(theResource.getRequirement()));
ctx.put("children", theResource.getChildren());
ctx.put("resourceBlockChildren", theResource.getResourceBlockChildren());
VelocityEngine v = new VelocityEngine();
v.setProperty("resource.loader", "cp");
v.setProperty("cp.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
InputStream templateIs = ResourceParser.class.getResourceAsStream(getTemplate());
InputStreamReader templateReader = new InputStreamReader(templateIs);
v.evaluate(ctx, w, "", templateReader);
@ -167,4 +205,62 @@ public abstract class BaseParser {
protected abstract String getTemplate();
private void parseFirstRow(Element theDefRow) {
for (int i = 0; i < 20; i++) {
String nextName = cellValue(theDefRow, i);
if (nextName == null) {
continue;
}
nextName = nextName.toLowerCase().trim().replace(".", "");
if ("element".equals(nextName)) {
myColName = i;
} else if ("card".equals(nextName)) {
myColCard = i;
} else if ("type".equals(nextName)) {
myColType = i;
} else if ("binding".equals(nextName)) {
myColBinding = i;
} else if ("short name".equals(nextName)) {
myColShortName = i;
} else if ("definition".equals(nextName)) {
myColDefinition = i;
} else if ("requirements".equals(nextName)) {
myColRequirements = i;
} else if ("v2 mapping".equals(nextName)) {
myColV2Mapping = i;
}
}
}
protected void parseBasicElements(Element theRowXml, BaseElement theTarget) {
String name = cellValue(theRowXml, myColName);
theTarget.setName(name);
int lastDot = name.lastIndexOf('.');
if (lastDot == -1) {
theTarget.setElementName(name);
} else {
String elementName = name.substring(lastDot + 1);
String elementParentName = name.substring(0, lastDot);
theTarget.setElementName(elementName);
theTarget.setElementParentName(elementParentName);
}
String cardValue = cellValue(theRowXml, myColCard);
if (cardValue != null && cardValue.contains("..")) {
String[] split = cardValue.split("\\.\\.");
theTarget.setCardMin(split[0]);
theTarget.setCardMax(split[1]);
}
String type = cellValue(theRowXml, myColType);
theTarget.setTypeFromString(type);
theTarget.setBinding(cellValue(theRowXml, myColBinding));
theTarget.setShortName(cellValue(theRowXml, myColShortName));
theTarget.setDefinition(cellValue(theRowXml, myColDefinition));
theTarget.setRequirement(cellValue(theRowXml, myColRequirements));
theTarget.setV2Mapping(cellValue(theRowXml, myColV2Mapping));
}
}

View File

@ -1,8 +1,5 @@
package ca.uhn.fhir.starter;
import java.util.Arrays;
import org.apache.commons.lang3.StringUtils;
import org.w3c.dom.Element;
import ca.uhn.fhir.starter.model.BaseElement;
@ -25,36 +22,38 @@ public class DatatypeParser extends BaseParser {
return myDatatypeName.toLowerCase() + ".xml";
}
@Override
protected void parseBasicElements(Element theRowXml, BaseElement theTarget) {
String name = cellValue(theRowXml, 0);
theTarget.setName(name);
int lastDot = name.lastIndexOf('.');
if (lastDot == -1) {
theTarget.setElementName(name);
} else {
String elementName = name.substring(lastDot + 1);
String elementParentName = name.substring(0, lastDot);
theTarget.setElementName(elementName);
theTarget.setElementParentName(elementParentName);
}
String cardValue = cellValue(theRowXml, 1);
if (cardValue != null && cardValue.contains("..")) {
String[] split = cardValue.split("\\.\\.");
theTarget.setCardMin(split[0]);
theTarget.setCardMax(split[1]);
}
String type = cellValue(theRowXml, 4);
theTarget.setTypeFromString(type);
theTarget.setShortName(cellValue(theRowXml, 6));
theTarget.setDefinition(cellValue(theRowXml, 7));
theTarget.setRequirement(cellValue(theRowXml, 6));
theTarget.setV2Mapping(cellValue(theRowXml, 13));
}
// @Override
// protected void parseBasicElements(Element theRowXml, BaseElement theTarget) {
// String name = cellValue(theRowXml, 0);
// theTarget.setName(name);
//
// int lastDot = name.lastIndexOf('.');
// if (lastDot == -1) {
// theTarget.setElementName(name);
// } else {
// String elementName = name.substring(lastDot + 1);
// String elementParentName = name.substring(0, lastDot);
// theTarget.setElementName(elementName);
// theTarget.setElementParentName(elementParentName);
// }
//
// String cardValue = cellValue(theRowXml, 1);
// if (cardValue != null && cardValue.contains("..")) {
// String[] split = cardValue.split("\\.\\.");
// theTarget.setCardMin(split[0]);
// theTarget.setCardMax(split[1]);
// }
//
//
// String type = cellValue(theRowXml, 4);
// theTarget.setTypeFromString(type);
//
// theTarget.setBinding(cellValue(theRowXml, 5));
// theTarget.setShortName(cellValue(theRowXml, 6));
// theTarget.setDefinition(cellValue(theRowXml, 7));
// theTarget.setRequirement(cellValue(theRowXml, 6));
// theTarget.setV2Mapping(cellValue(theRowXml, 13));
// }
}

View File

@ -1,8 +1,5 @@
package ca.uhn.fhir.starter;
import org.w3c.dom.Element;
import ca.uhn.fhir.starter.model.BaseElement;
public class ResourceParser extends BaseParser {
private String myResourceName;
@ -21,6 +18,38 @@ public class ResourceParser extends BaseParser {
return "/resource.vm";
}
// @Override
// protected void parseBasicElements(Element theRowXml, BaseElement theTarget) {
// String name = cellValue(theRowXml, 0);
// theTarget.setName(name);
//
// int lastDot = name.lastIndexOf('.');
// if (lastDot == -1) {
// theTarget.setElementName(name);
// } else {
// String elementName = name.substring(lastDot + 1);
// String elementParentName = name.substring(0, lastDot);
// theTarget.setElementName(elementName);
// theTarget.setElementParentName(elementParentName);
// }
//
// String cardValue = cellValue(theRowXml, 1);
// if (cardValue != null && cardValue.contains("..")) {
// String[] split = cardValue.split("\\.\\.");
// theTarget.setCardMin(split[0]);
// theTarget.setCardMax(split[1]);
// }
//
// String type = cellValue(theRowXml, 5);
// theTarget.setTypeFromString(type);
//
// theTarget.setBinding(cellValue(theRowXml, 6));
// theTarget.setShortName(cellValue(theRowXml, 7));
// theTarget.setDefinition(cellValue(theRowXml, 8));
// theTarget.setRequirement(cellValue(theRowXml, 9));
// theTarget.setV2Mapping(cellValue(theRowXml, 14));
// }
public static void main(String[] args) throws Exception {
ResourceParser p = new ResourceParser();
p.setDirectory("src/test/resources/res");
@ -30,48 +59,25 @@ public class ResourceParser extends BaseParser {
DatatypeParser d = new DatatypeParser();
d.setDirectory("src/test/resources/dt");
d.setDatatypeName ( "humanname");
d.setDatatypeName("humanname");
d.setOutputFile("../hapi-fhir-base/src/main/java/ca/uhn/fhir/model/datatype/HumanNameDt.java");
d.parse();
d.setDatatypeName ( "contact");
d.setDatatypeName("contact");
d.setOutputFile("../hapi-fhir-base/src/main/java/ca/uhn/fhir/model/datatype/ContactDt.java");
d.parse();
d.setDatatypeName ( "address");
d.setDatatypeName("address");
d.setOutputFile("../hapi-fhir-base/src/main/java/ca/uhn/fhir/model/datatype/AddressDt.java");
d.parse();
d.setDatatypeName("narrative");
d.setOutputFile("../hapi-fhir-base/src/main/java/ca/uhn/fhir/model/datatype/NarrativeDt.java");
d.parse();
d.setDatatypeName("quantity");
d.setOutputFile("../hapi-fhir-base/src/main/java/ca/uhn/fhir/model/datatype/QuantityDt.java");
d.parse();
}
@Override
protected void parseBasicElements(Element theRowXml, BaseElement theTarget) {
String name = cellValue(theRowXml, 0);
theTarget.setName(name);
int lastDot = name.lastIndexOf('.');
if (lastDot == -1) {
theTarget.setElementName(name);
} else {
String elementName = name.substring(lastDot + 1);
String elementParentName = name.substring(0, lastDot);
theTarget.setElementName(elementName);
theTarget.setElementParentName(elementParentName);
}
String cardValue = cellValue(theRowXml, 1);
if (cardValue != null && cardValue.contains("..")) {
String[] split = cardValue.split("\\.\\.");
theTarget.setCardMin(split[0]);
theTarget.setCardMax(split[1]);
}
String type = cellValue(theRowXml, 5);
theTarget.setTypeFromString(type);
theTarget.setShortName(cellValue(theRowXml, 7));
theTarget.setDefinition(cellValue(theRowXml, 8));
theTarget.setRequirement(cellValue(theRowXml, 9));
theTarget.setV2Mapping(cellValue(theRowXml, 14));
}
}

View File

@ -1,13 +1,13 @@
package ca.uhn.fhir.starter.model;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
public abstract class BaseElement {
private String myBinding;
private String myCardMax;
private String myCardMin;
private List<BaseElement> myChildren;
@ -17,20 +17,17 @@ public abstract class BaseElement {
private String myElementParentName;
private String myName;
private String myRequirement;
private boolean myResourceRef = false;
private String myShortName;
private List<String> myType;
private String myV2Mapping;
public List<ResourceBlock> getResourceBlockChildren() {
ArrayList<ResourceBlock> retVal = new ArrayList<ResourceBlock>();
for (BaseElement next : getChildren()) {
if (next instanceof ResourceBlock) {
retVal.add((ResourceBlock) next);
}
}
return retVal;
public String getBinding() {
return myBinding;
}
public String getCardMax() {
return myCardMax;
}
@ -70,13 +67,23 @@ public abstract class BaseElement {
return myRequirement;
}
public List<ResourceBlock> getResourceBlockChildren() {
ArrayList<ResourceBlock> retVal = new ArrayList<ResourceBlock>();
for (BaseElement next : getChildren()) {
if (next instanceof ResourceBlock) {
retVal.add((ResourceBlock) next);
}
}
return retVal;
}
public String getShortName() {
return myShortName;
}
public List<String> getType() {
if (myType==null) {
myType=new ArrayList<String>();
if (myType == null) {
myType = new ArrayList<String>();
}
return myType;
}
@ -85,6 +92,18 @@ public abstract class BaseElement {
return myV2Mapping;
}
public boolean isHasMultipleTypes() {
return myType.size() > 1;
}
public boolean isResourceRef() {
return myResourceRef;
}
public void setBinding(String theCellValue) {
myBinding = theCellValue;
}
public void setCardMax(String theCardMax) {
myCardMax = theCardMax;
}
@ -121,24 +140,14 @@ public abstract class BaseElement {
myShortName = theShortName;
}
public void setV2Mapping(String theV2Mapping) {
myV2Mapping = theV2Mapping;
}
private boolean myResourceRef = false;
public boolean isResourceRef() {
return myResourceRef;
}
public void setTypeFromString(String theType) {
if (theType==null) {
if (theType == null) {
return;
}
String typeString = theType;
if (typeString.startsWith("Resource(")) {
typeString = typeString.substring("Resource(".length(), typeString.length() - 1);
myResourceRef=true;
myResourceRef = true;
}
if (StringUtils.isNotBlank(typeString)) {
String[] types = typeString.replace("=", "").split("\\|");
@ -146,7 +155,11 @@ public abstract class BaseElement {
getType().add(string.trim());
}
}
}
public void setV2Mapping(String theV2Mapping) {
myV2Mapping = theV2Mapping;
}
}

View File

@ -31,11 +31,19 @@ public class Child extends BaseElement {
}
public String getMethodName() {
String elementName = getElementNameSimplified();
elementName = elementName.substring(0,1).toUpperCase() + elementName.substring(1);
return elementName;
}
/**
* Strips off "[x]"
*/
public String getElementNameSimplified() {
String elementName = getElementName();
if (elementName.endsWith("[x]")) {
elementName = elementName.substring(0, elementName.length() - 3);
}
elementName = elementName.substring(0,1).toUpperCase() + elementName.substring(1);
return elementName;
}

View File

@ -1,3 +1,5 @@
#parse ( "templates.vm" )
package ca.uhn.fhir.model.datatype;
import java.util.*;
@ -6,7 +8,7 @@ import ca.uhn.fhir.model.api.annotation.*;
import ca.uhn.fhir.model.datatype.*;
/**
* HAPI/FHIR <b>${resourceName}</b> Datatype
* HAPI/FHIR <b>${className}</b> Datatype
* (${shortName})
*
* <p>
@ -22,36 +24,7 @@ import ca.uhn.fhir.model.datatype.*;
@DatatypeDef(name="${className}")
public class ${className}Dt extends BaseCompositeDatatype {
#foreach ( $child in $children )
@Child(name="${child.elementName}", order=${foreach.index}, min=${child.cardMin}, max=${child.cardMaxForChildAnnotation})
private ${child.referenceType} ${child.variableName};
#end
#foreach ( $child in $children )
/**
* Gets the value(s) for ${child.elementName} (${child.shortName})
*
* <p>
* <b>Definition:</b>
* ${child.definition}
* </p>
*/
public ${child.referenceType} get${child.methodName}() {
return ${child.variableName};
}
/**
* Sets the value(s) for ${child.elementName} (${child.shortName})
*
* <p>
* <b>Definition:</b>
* ${child.definition}
* </p>
*/
public void set${child.methodName}(${child.referenceType} theValue) {
${child.variableName} = theValue;
}
#end
#childVars( $children )
#childAccessors( $children )
}

View File

@ -1,3 +1,5 @@
#parse ( "templates.vm" )
package ca.uhn.fhir.model.resource;
import java.util.*;
@ -19,41 +21,11 @@ import ca.uhn.fhir.model.datatype.*;
* ${requirements}
* </p>
*/
@ResourceDef(name="${resourceName}")
@ResourceDef(name="${className}")
public class ${className} extends BaseResource {
#foreach ( $child in $children )
@Child(name="${child.elementName}", order=${foreach.index}, min=${child.cardMin}, max=${child.cardMaxForChildAnnotation})
private ${child.referenceType} ${child.variableName};
#end
#foreach ( $child in $children )
/**
* Gets the value(s) for ${child.elementName} (${child.shortName})
*
* <p>
* <b>Definition:</b>
* ${child.definition}
* </p>
*/
public ${child.referenceType} get${child.methodName}() {
return ${child.variableName};
}
/**
* Sets the value(s) for ${child.elementName} (${child.shortName})
*
* <p>
* <b>Definition:</b>
* ${child.definition}
* </p>
*/
public void set${child.methodName}(${child.referenceType} theValue) {
${child.variableName} = theValue;
}
#end
#childVars( $children )
#childAccessors( $children )
#foreach ( $child in $resourceBlockChildren )
/**
@ -66,37 +38,8 @@ public class ${className} extends BaseResource {
*/
@Block(name="${child.name}")
public static class ${child.className} {
#foreach ( $subChild in $child.children )
@Child(name="${subChild.elementName}", order=${foreach.index}, min=${subChild.cardMin}, max=${subChild.cardMaxForChildAnnotation})
private ${subChild.referenceType} ${subChild.variableName};
#end
#foreach ( $subChild in $child.children )
/**
* Gets the value(s) for ${subChild.elementName} (${subChild.shortName})
*
* <p>
* <b>Definition:</b>
* ${subChild.definition}
* </p>
*/
public ${subChild.referenceType} get${subChild.methodName}() {
return ${subChild.variableName};
}
/**
* Sets the value(s) for ${subChild.elementName} (${subChild.shortName})
*
* <p>
* <b>Definition:</b>
* ${subChild.definition}
* </p>
*/
public void set${subChild.methodName}(${subChild.referenceType} theValue) {
${subChild.variableName} = theValue;
}
#end
#childVars( $child.children )
#childAccessors( $child.children )
}
#end

View File

@ -0,0 +1,51 @@
#macro ( childVars $childElements )
#foreach ( $child in $children )
#if ($child.resourceRef)
@Child(name="${child.elementNameSimplified}", order=${foreach.index}, min=${child.cardMin}, max=${child.cardMaxForChildAnnotation})
@ChildResource(types= {
#foreach ($nextType in ${child.type})
${nextType}.class,
#end
})
#elseif ($!child.hasMultipleTypes)
@Child(name="${child.elementNameSimplified}", order=${foreach.index}, min=${child.cardMin}, max=${child.cardMaxForChildAnnotation}, choice=@Choice(types= {
#foreach ($nextType in ${child.type})
${nextType}.class,
#end
}))
#else
@Child(name="${child.elementNameSimplified}", order=${foreach.index}, min=${child.cardMin}, max=${child.cardMaxForChildAnnotation})
#end
private ${child.referenceType} ${child.variableName};
#end
#end
#macro ( childAccessors $childElements )
#foreach ( $child in $children )
/**
* Gets the value(s) for ${child.elementName} (${child.shortName})
*
* <p>
* <b>Definition:</b>
* ${child.definition}
* </p>
*/
public ${child.referenceType} get${child.methodName}() {
return ${child.variableName};
}
/**
* Sets the value(s) for ${child.elementName} (${child.shortName})
*
* <p>
* <b>Definition:</b>
* ${child.definition}
* </p>
*/
public void set${child.methodName}(${child.referenceType} theValue) {
${child.variableName} = theValue;
}
#end
#end

View File

@ -0,0 +1,332 @@
<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
<Author>Grahame</Author>
<LastAuthor>Lloyd McKenzie</LastAuthor>
<Created>2012-03-19T11:21:04Z</Created>
<LastSaved>2012-07-14T16:02:18Z</LastSaved>
<Version>14.00</Version>
</DocumentProperties>
<OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">
<AllowPNG/>
</OfficeDocumentSettings>
<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
<WindowHeight>8055</WindowHeight>
<WindowWidth>24195</WindowWidth>
<WindowTopX>4080</WindowTopX>
<WindowTopY>4365</WindowTopY>
<ActiveSheet>1</ActiveSheet>
<ProtectStructure>False</ProtectStructure>
<ProtectWindows>False</ProtectWindows>
</ExcelWorkbook>
<Styles>
<Style ss:ID="Default" ss:Name="Normal">
<Alignment ss:Vertical="Bottom"/>
<Borders/>
<Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#000000"/>
<Interior/>
<NumberFormat/>
<Protection/>
</Style>
<Style ss:ID="s62" ss:Name="Normal 2">
<Alignment ss:Vertical="Bottom"/>
<Borders/>
<Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#000000"/>
<Interior/>
<NumberFormat/>
<Protection/>
</Style>
<Style ss:ID="s63">
<Alignment ss:Horizontal="Left" ss:Vertical="Top" ss:ShrinkToFit="1"
ss:WrapText="1"/>
</Style>
<Style ss:ID="s64">
<Alignment ss:Horizontal="Left" ss:Vertical="Top" ss:ShrinkToFit="1"
ss:WrapText="1"/>
<Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#000000"
ss:Bold="1"/>
</Style>
<Style ss:ID="s65">
<Alignment ss:Horizontal="Left" ss:Vertical="Top" ss:ShrinkToFit="1"
ss:WrapText="1"/>
<Borders>
<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
</Borders>
<Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#000000"
ss:Bold="1"/>
<Interior ss:Color="#EEECE1" ss:Pattern="Solid"/>
</Style>
<Style ss:ID="s66">
<Alignment ss:Horizontal="Left" ss:Vertical="Top" ss:ShrinkToFit="1"
ss:WrapText="1"/>
<Interior ss:Color="#D9D9D9" ss:Pattern="Solid"/>
</Style>
<Style ss:ID="s67">
<Alignment ss:Vertical="Bottom" ss:ShrinkToFit="1" ss:WrapText="1"/>
</Style>
<Style ss:ID="s68">
<Alignment ss:Vertical="Top"/>
</Style>
<Style ss:ID="s69">
<Alignment ss:Vertical="Top" ss:WrapText="1"/>
</Style>
<Style ss:ID="s71" ss:Parent="s62">
<Alignment ss:Vertical="Top"/>
<Borders/>
<Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#000000"/>
<Interior/>
<NumberFormat/>
<Protection/>
</Style>
<Style ss:ID="s72" ss:Parent="s62">
<Alignment ss:Vertical="Top" ss:WrapText="1"/>
<Borders/>
<Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#000000"/>
<Interior/>
<NumberFormat/>
<Protection/>
</Style>
</Styles>
<Worksheet ss:Name="Data Elements">
<Table ss:ExpandedColumnCount="14" ss:ExpandedRowCount="4" x:FullColumns="1"
x:FullRows="1" ss:StyleID="s63" ss:DefaultRowHeight="15">
<Column ss:StyleID="s64" ss:AutoFitWidth="0" ss:Width="150.75"/>
<Column ss:StyleID="s63" ss:AutoFitWidth="0" ss:Width="32.25"/>
<Column ss:StyleID="s63" ss:AutoFitWidth="0" ss:Width="33"/>
<Column ss:StyleID="s63" ss:AutoFitWidth="0" ss:Width="56.25"/>
<Column ss:StyleID="s63" ss:AutoFitWidth="0" ss:Width="82.5"/>
<Column ss:StyleID="s63" ss:AutoFitWidth="0" ss:Width="213.75" ss:Span="1"/>
<Column ss:Index="8" ss:StyleID="s63" ss:AutoFitWidth="0" ss:Width="161.25"
ss:Span="1"/>
<Column ss:Index="10" ss:StyleID="s63" ss:AutoFitWidth="0" ss:Width="114"/>
<Column ss:StyleID="s63" ss:AutoFitWidth="0" ss:Width="135" ss:Span="1"/>
<Row ss:AutoFitHeight="0" ss:Height="30" ss:StyleID="s65">
<Cell><Data ss:Type="String">Element</Data></Cell>
<Cell><Data ss:Type="String">Card.</Data></Cell>
<Cell><Data ss:Type="String">Inv.</Data></Cell>
<Cell><Data ss:Type="String">Type</Data></Cell>
<Cell><Data ss:Type="String">Binding</Data></Cell>
<Cell><Data ss:Type="String">Short Name</Data></Cell>
<Cell><Data ss:Type="String">Definition</Data></Cell>
<Cell><Data ss:Type="String">Requirements</Data></Cell>
<Cell><Data ss:Type="String">Comments</Data></Cell>
<Cell><Data ss:Type="String">Condition</Data></Cell>
<Cell><Data ss:Type="String">RIM Mapping</Data></Cell>
<Cell><Data ss:Type="String">v2 Mapping</Data></Cell>
<Cell><Data ss:Type="String">To Do</Data></Cell>
<Cell><Data ss:Type="String">Committee Notes</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="30">
<Cell><Data ss:Type="String">Narrative</Data></Cell>
<Cell ss:StyleID="s66"/>
<Cell ss:StyleID="s66"/>
<Cell><Data ss:Type="String">Type</Data></Cell>
<Cell ss:Index="6"><Data ss:Type="String">A human-readable formatted text, including images</Data></Cell>
<Cell><Data ss:Type="String">A human-readable formatted text, including images</Data></Cell>
<Cell ss:Index="11"><Data ss:Type="String">N/A</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="90">
<Cell><Data ss:Type="String">Narrative.status</Data></Cell>
<Cell><Data ss:Type="String">1..1</Data></Cell>
<Cell ss:Index="4"><Data ss:Type="String">code</Data></Cell>
<Cell><Data ss:Type="String">NarrativeStatus</Data></Cell>
<Cell><Data ss:Type="String">generated | extensions | additional</Data></Cell>
<Cell><Data ss:Type="String">The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data</Data></Cell>
<Cell ss:Index="11"><Data ss:Type="String">N/A</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="195">
<Cell><Data ss:Type="String">Narrative.div</Data></Cell>
<Cell><Data ss:Type="String">1..1</Data></Cell>
<Cell ss:Index="4"><Data ss:Type="String">xhtml</Data></Cell>
<Cell ss:Index="6"><Data ss:Type="String">Limited xhtml content</Data></Cell>
<Cell><Data ss:Type="String">The actual narrative content, a stripped down version of XHTML</Data></Cell>
<Cell ss:Index="9"><Data ss:Type="String">The contents of the html element are an XHTML fragment containing only the basic html formatting elements described in chapters 7-11 and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained stylesheets. The XHTML content may not contain a head, a body, external stylesheet references, scripts, forms, base/link/xlink, frames, iframes and objects. </Data></Cell>
<Cell ss:Index="11"><Data ss:Type="String">N/A</Data></Cell>
</Row>
</Table>
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<PageSetup>
<Header x:Margin="0.3"/>
<Footer x:Margin="0.3"/>
<PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
</PageSetup>
<Unsynced/>
<FreezePanes/>
<FrozenNoSplit/>
<SplitHorizontal>1</SplitHorizontal>
<TopRowBottomPane>1</TopRowBottomPane>
<SplitVertical>1</SplitVertical>
<LeftColumnRightPane>1</LeftColumnRightPane>
<ActivePane>0</ActivePane>
<Panes>
<Pane>
<Number>3</Number>
</Pane>
<Pane>
<Number>1</Number>
</Pane>
<Pane>
<Number>2</Number>
</Pane>
<Pane>
<Number>0</Number>
<ActiveRow>2</ActiveRow>
<ActiveCol>6</ActiveCol>
</Pane>
</Panes>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
<Worksheet ss:Name="Invariants">
<Table ss:ExpandedColumnCount="6" ss:ExpandedRowCount="4" x:FullColumns="1"
x:FullRows="1" ss:StyleID="s67" ss:DefaultRowHeight="15">
<Column ss:Index="2" ss:StyleID="s67" ss:AutoFitWidth="0" ss:Width="51"
ss:Span="1"/>
<Column ss:Index="4" ss:StyleID="s67" ss:AutoFitWidth="0" ss:Width="198"/>
<Column ss:StyleID="s67" ss:AutoFitWidth="0" ss:Width="219.75"/>
<Column ss:StyleID="s67" ss:AutoFitWidth="0" ss:Width="220.5"/>
<Row ss:AutoFitHeight="0" ss:StyleID="s65">
<Cell><Data ss:Type="String">Id</Data></Cell>
<Cell><Data ss:Type="String">Name</Data></Cell>
<Cell><Data ss:Type="String">Context</Data></Cell>
<Cell><Data ss:Type="String">English</Data></Cell>
<Cell><Data ss:Type="String">OCL</Data></Cell>
<Cell><Data ss:Type="String">XPath</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0">
<Cell><Data ss:Type="Number">1</Data></Cell>
<Cell ss:Index="3"><Data ss:Type="String">Narrative.div</Data></Cell>
<Cell><Data ss:Type="String">The narrative SHALL contain only the basic html formatting elements described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</Data></Cell>
<Cell ss:Index="6"><Data ss:Type="String">not(descendant-or-self::*[not(local-name(.)=('a', 'abbr', 'acronym', 'b', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', 'colgroup', 'dd', 'dfn', 'div', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'li', 'ol', 'p', 'pre', 'q', 'samp', 'small', 'span', 'strong', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'ul', 'var'))])</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0">
<Cell><Data ss:Type="Number">2</Data></Cell>
<Cell ss:Index="3"><Data ss:Type="String">Narrative.div</Data></Cell>
<Cell><Data ss:Type="String">The narrative SHALL have some non-whitespace content</Data></Cell>
<Cell ss:Index="6"><Data ss:Type="String">descendant::text()[normalize-space(.)!=''] or descendant::html:img[@src]</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0">
<Cell><Data ss:Type="Number">3</Data></Cell>
<Cell ss:Index="3"><Data ss:Type="String">Narrative.div</Data></Cell>
<Cell><Data ss:Type="String">The narrative SHALL contain only the basic html formatting attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</Data></Cell>
<Cell ss:Index="6"><Data ss:Type="String">not(descendant-or-self::*/@*[not(name(.)=('abbr', 'accesskey', 'align', 'alt', 'axis', 'bgcolor', 'border', 'cellhalign', 'cellpadding', 'cellspacing', 'cellvalign', 'char', 'charoff', 'charset', 'cite', 'class', 'colspan', 'compact', 'coords', 'dir', 'frame', 'headers', 'height', 'href', 'hreflang', 'hspace', 'id', 'lang', 'longdesc', 'name', 'nowrap', 'rel', 'rev', 'rowspan', 'rules', 'scope', 'shape', 'span', 'src', 'start', 'style', 'summary', 'tabindex', 'title', 'type', 'valign', 'value', 'vspace', 'width'))]) </Data></Cell>
</Row>
</Table>
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<PageSetup>
<Header x:Margin="0.3"/>
<Footer x:Margin="0.3"/>
<PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
</PageSetup>
<Unsynced/>
<Selected/>
<Panes>
<Pane>
<Number>3</Number>
<ActiveRow>9</ActiveRow>
<ActiveCol>7</ActiveCol>
</Pane>
</Panes>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
<Worksheet ss:Name="Bindings">
<Table ss:ExpandedColumnCount="5" ss:ExpandedRowCount="2" x:FullColumns="1"
x:FullRows="1" ss:StyleID="s68" ss:DefaultRowHeight="15">
<Column ss:StyleID="s68" ss:AutoFitWidth="0" ss:Width="106.5"/>
<Column ss:StyleID="s68" ss:AutoFitWidth="0" ss:Width="189.75"/>
<Column ss:StyleID="s68" ss:AutoFitWidth="0" ss:Width="54.75"/>
<Column ss:StyleID="s68" ss:AutoFitWidth="0" ss:Width="122.25"/>
<Column ss:StyleID="s68" ss:AutoFitWidth="0" ss:Width="325.5"/>
<Row ss:AutoFitHeight="0">
<Cell ss:StyleID="s65"><Data ss:Type="String">Binding Name</Data></Cell>
<Cell ss:StyleID="s65"><Data ss:Type="String">Definition</Data></Cell>
<Cell ss:StyleID="s65"><Data ss:Type="String">Binding</Data></Cell>
<Cell ss:StyleID="s65"><Data ss:Type="String">Reference</Data></Cell>
<Cell ss:StyleID="s65"><Data ss:Type="String">Description</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0">
<Cell ss:StyleID="s69"><Data ss:Type="String">NarrativeStatus</Data></Cell>
<Cell ss:StyleID="s69"><Data ss:Type="String">The status of a resource narrative</Data></Cell>
<Cell ss:StyleID="s69"><Data ss:Type="String">code list</Data></Cell>
<Cell ss:StyleID="s69"><Data ss:Type="String">#narrative-status</Data></Cell>
</Row>
</Table>
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<PageSetup>
<Header x:Margin="0.3"/>
<Footer x:Margin="0.3"/>
<PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
</PageSetup>
<Unsynced/>
<Panes>
<Pane>
<Number>3</Number>
<ActiveRow>3</ActiveRow>
<ActiveCol>3</ActiveCol>
</Pane>
</Panes>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
<Worksheet ss:Name="narrative-status">
<Table ss:ExpandedColumnCount="7" ss:ExpandedRowCount="5" x:FullColumns="1"
x:FullRows="1" ss:StyleID="s68" ss:DefaultRowHeight="15">
<Column ss:Index="2" ss:StyleID="s68" ss:Width="56.25"/>
<Column ss:StyleID="s69" ss:AutoFitWidth="0" ss:Width="454.5"/>
<Row ss:AutoFitHeight="0">
<Cell><Data ss:Type="String">Id</Data></Cell>
<Cell ss:StyleID="s65"><Data ss:Type="String">Code</Data></Cell>
<Cell ss:StyleID="s65"><Data ss:Type="String">Definition</Data></Cell>
<Cell ss:StyleID="s65"/>
<Cell ss:StyleID="s65"/>
<Cell ss:StyleID="s65"/>
<Cell ss:StyleID="s65"/>
</Row>
<Row ss:AutoFitHeight="0">
<Cell><Data ss:Type="Number">1</Data></Cell>
<Cell ss:StyleID="s71"><Data ss:Type="String">generated</Data></Cell>
<Cell ss:StyleID="s72"><Data ss:Type="String">The contents of the narrative are entirely generated from the structured data in the resource.</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="30">
<Cell><Data ss:Type="Number">2</Data></Cell>
<Cell ss:StyleID="s71"><Data ss:Type="String">extensions</Data></Cell>
<Cell ss:StyleID="s72"><Data ss:Type="String">The contents of the narrative are entirely generated from the structured data in the resource and some of the content is generated from extensions</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0">
<Cell><Data ss:Type="Number">3</Data></Cell>
<Cell ss:StyleID="s71"><Data ss:Type="String">additional</Data></Cell>
<Cell ss:StyleID="s72"><Data ss:Type="String">The contents of the narrative contain additional information not found in the structured data</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0">
<Cell><Data ss:Type="Number">4</Data></Cell>
<Cell><Data ss:Type="String">empty</Data></Cell>
<Cell><Data ss:Type="String">the contents of the narrative are some equivalent of &quot;No human-readable text provided for this resource&quot;</Data></Cell>
</Row>
</Table>
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<PageSetup>
<Header x:Margin="0.3"/>
<Footer x:Margin="0.3"/>
<PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
</PageSetup>
<Unsynced/>
<Panes>
<Pane>
<Number>3</Number>
<ActiveRow>3</ActiveRow>
</Pane>
</Panes>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
</Workbook>

View File

@ -0,0 +1,408 @@
<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
<Author>Grahame</Author>
<LastAuthor>Grahame</LastAuthor>
<Created>2012-03-19T11:20:53Z</Created>
<LastSaved>2013-01-21T03:40:20Z</LastSaved>
<Version>14.00</Version>
</DocumentProperties>
<OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">
<AllowPNG/>
</OfficeDocumentSettings>
<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
<WindowHeight>6510</WindowHeight>
<WindowWidth>23355</WindowWidth>
<WindowTopX>3405</WindowTopX>
<WindowTopY>2175</WindowTopY>
<ProtectStructure>False</ProtectStructure>
<ProtectWindows>False</ProtectWindows>
</ExcelWorkbook>
<Styles>
<Style ss:ID="Default" ss:Name="Normal">
<Alignment ss:Vertical="Bottom"/>
<Borders/>
<Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#000000"/>
<Interior/>
<NumberFormat/>
<Protection/>
</Style>
<Style ss:ID="s62" ss:Name="Normal 2">
<Alignment ss:Vertical="Bottom"/>
<Borders/>
<Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#000000"/>
<Interior/>
<NumberFormat/>
<Protection/>
</Style>
<Style ss:ID="s63">
<Alignment ss:Horizontal="Left" ss:Vertical="Top" ss:ShrinkToFit="1"
ss:WrapText="1"/>
</Style>
<Style ss:ID="s64">
<Alignment ss:Horizontal="Left" ss:Vertical="Top" ss:ShrinkToFit="1"
ss:WrapText="1"/>
<Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#000000"
ss:Bold="1"/>
</Style>
<Style ss:ID="s65">
<Alignment ss:Horizontal="Left" ss:Vertical="Top" ss:ShrinkToFit="1"
ss:WrapText="1"/>
<Borders>
<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
</Borders>
<Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#000000"
ss:Bold="1"/>
<Interior ss:Color="#EEECE1" ss:Pattern="Solid"/>
</Style>
<Style ss:ID="s66">
<Alignment ss:Horizontal="Left" ss:Vertical="Top" ss:ShrinkToFit="1"
ss:WrapText="1"/>
<Interior ss:Color="#D9D9D9" ss:Pattern="Solid"/>
</Style>
<Style ss:ID="s67">
<Alignment ss:Vertical="Top" ss:ShrinkToFit="1" ss:WrapText="1"/>
</Style>
<Style ss:ID="s68">
<Alignment ss:Vertical="Top" ss:WrapText="1"/>
</Style>
<Style ss:ID="s69">
<Alignment ss:Vertical="Top"/>
</Style>
</Styles>
<Worksheet ss:Name="Data Elements">
<Table ss:ExpandedColumnCount="14" ss:ExpandedRowCount="7" x:FullColumns="1"
x:FullRows="1" ss:StyleID="s63" ss:DefaultRowHeight="15">
<Column ss:StyleID="s64" ss:AutoFitWidth="0" ss:Width="150.75"/>
<Column ss:StyleID="s63" ss:AutoFitWidth="0" ss:Width="30.75"/>
<Column ss:StyleID="s63" ss:AutoFitWidth="0" ss:Width="24"/>
<Column ss:StyleID="s63" ss:AutoFitWidth="0" ss:Width="31.5"/>
<Column ss:StyleID="s63" ss:AutoFitWidth="0" ss:Width="56.25"/>
<Column ss:StyleID="s63" ss:AutoFitWidth="0" ss:Width="82.5"/>
<Column ss:StyleID="s63" ss:AutoFitWidth="0" ss:Width="213.75" ss:Span="1"/>
<Column ss:Index="9" ss:StyleID="s63" ss:AutoFitWidth="0" ss:Width="161.25"/>
<Column ss:StyleID="s63" ss:AutoFitWidth="0" ss:Width="114"/>
<Column ss:StyleID="s63" ss:AutoFitWidth="0" ss:Width="135" ss:Span="1"/>
<Row ss:AutoFitHeight="0" ss:Height="30" ss:StyleID="s65">
<Cell><Data ss:Type="String">Element</Data></Cell>
<Cell><Data ss:Type="String">Card.</Data></Cell>
<Cell><Data ss:Type="String">Inv.</Data></Cell>
<Cell><Data ss:Type="String">Is Modifier</Data></Cell>
<Cell><Data ss:Type="String">Type</Data></Cell>
<Cell><Data ss:Type="String">Binding</Data></Cell>
<Cell><Data ss:Type="String">Short Name</Data></Cell>
<Cell><Data ss:Type="String">Definition</Data></Cell>
<Cell><Data ss:Type="String">Requirements</Data></Cell>
<Cell><Data ss:Type="String">Comments</Data></Cell>
<Cell><Data ss:Type="String">RIM Mapping</Data></Cell>
<Cell><Data ss:Type="String">v2 Mapping</Data></Cell>
<Cell><Data ss:Type="String">To Do</Data></Cell>
<Cell><Data ss:Type="String">Committee Notes</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="120">
<Cell><Data ss:Type="String">Quantity</Data></Cell>
<Cell ss:StyleID="s66"/>
<Cell ss:StyleID="s66"/>
<Cell ss:StyleID="s66"/>
<Cell><Data ss:Type="String">Type</Data></Cell>
<Cell ss:Index="7"><Data ss:Type="String">A measured or measurable amount</Data></Cell>
<Cell><Data ss:Type="String">A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies</Data></Cell>
<Cell><Data ss:Type="String">Need to able to capture all sorts of measured values, even if the measured value are not precisely quantified. Values include exact measures such as 3.51g, customary units such as 3 tablets, and currencies such as $100.32USD</Data></Cell>
<Cell><Data ss:Type="String">The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator</Data></Cell>
<Cell><Data ss:Type="String">PQ, IVL&lt;PQ&gt;, MO, CO, depending on the values</Data></Cell>
<Cell><Data ss:Type="String">SN (see also Range) or CQ</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="81">
<Cell><Data ss:Type="String">Quantity.value</Data></Cell>
<Cell><Data ss:Type="String">0..1</Data></Cell>
<Cell ss:Index="5"><Data ss:Type="String">decimal</Data></Cell>
<Cell ss:Index="7"><Data ss:Type="String">Numerical value (with implicit precision)</Data></Cell>
<Cell><Data ss:Type="String">The value of the measured amount. The value includes an implicit precision in the presentation of the value</Data></Cell>
<Cell><Data ss:Type="String">Precision is handled implicitly in almost all cases of measurement</Data></Cell>
<Cell><Data ss:Type="String">The implicit precision in the value should always be honored. Monetary values have their own rules for handling precision (refer to standard accounting text books)</Data></Cell>
<Cell><Data ss:Type="String">PQ.value, CO.value, MO.value, IVL.high or IVL.low depending on the value</Data></Cell>
<Cell><Data ss:Type="String">SN.2 / CQ - N/A</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="75">
<Cell><Data ss:Type="String">Quantity.comparator</Data></Cell>
<Cell><Data ss:Type="String">0..1</Data></Cell>
<Cell ss:Index="4"><Data ss:Type="String">Y</Data></Cell>
<Cell><Data ss:Type="String">code</Data></Cell>
<Cell><Data ss:Type="String">QuantityCompararator</Data></Cell>
<Cell><Data ss:Type="String">&lt; | &lt;= | &gt;= | &gt; - how to understand the value</Data></Cell>
<Cell><Data ss:Type="String">How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is &quot;&lt;&quot; , then the real value is &lt; stated value</Data></Cell>
<Cell><Data ss:Type="String">Need a framework for handling measures where the value is &lt;5ug/L or &gt;400mg/L due to the limitations of measuring methodology. </Data></Cell>
<Cell><Data ss:Type="String">This is labeled as &quot;Is Modifier&quot; because the comparator modifies the interpretation of the value significantly. If there is no comparator, then there is no modification of the value</Data></Cell>
<Cell><Data ss:Type="String">IVL properties</Data></Cell>
<Cell><Data ss:Type="String">SN.1 / CQ.1</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="90">
<Cell><Data ss:Type="String">Quantity.units</Data></Cell>
<Cell><Data ss:Type="String">0..1</Data></Cell>
<Cell ss:Index="5"><Data ss:Type="String">string</Data></Cell>
<Cell ss:Index="7"><Data ss:Type="String">Unit representation</Data></Cell>
<Cell><Data ss:Type="String">A human-readable form of the units</Data></Cell>
<Cell><Data ss:Type="String">There are many representations for units and in many contexts, particular representations are fixed and required. I.e. mcg for micrograms</Data></Cell>
<Cell ss:Index="11"><Data ss:Type="String">PQ.unit</Data></Cell>
<Cell><Data ss:Type="String">(see OBX.6 etc) / CQ.2</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="45">
<Cell><Data ss:Type="String">Quantity.system</Data></Cell>
<Cell><Data ss:Type="String">0..1</Data></Cell>
<Cell><Data ss:Type="Number">3</Data></Cell>
<Cell ss:Index="5"><Data ss:Type="String">uri</Data></Cell>
<Cell ss:Index="7"><Data ss:Type="String">System that defines coded unit form</Data></Cell>
<Cell><Data ss:Type="String">The identification of the system that provides the coded form of the unit</Data></Cell>
<Cell><Data ss:Type="String">Need to know the system that defines the coded form of the unit</Data></Cell>
<Cell ss:Index="11"><Data ss:Type="String">CO.codeSystem, PQ.translation.codeSystem</Data></Cell>
<Cell><Data ss:Type="String">(see OBX.6 etc) / CQ.2</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="90">
<Cell><Data ss:Type="String">Quantity.code</Data></Cell>
<Cell><Data ss:Type="String">0..1</Data></Cell>
<Cell ss:Index="5"><Data ss:Type="String">code</Data></Cell>
<Cell ss:Index="7"><Data ss:Type="String">Coded form of the unit</Data></Cell>
<Cell><Data ss:Type="String">A computer processable form of the units in some unit representation system</Data></Cell>
<Cell><Data ss:Type="String">Need a computable form of the units that is fixed across all forms. UCUM provides this for quantities, but SNOMED CT provides many units of interest</Data></Cell>
<Cell><Data ss:Type="String">The preferred system is UCUM, but SNOMED CT can also be used (for customary units) or ISO 4217 for currency.&#10;&#10;The context of use may additionally require a code from a particular system (Unless the Quantity element has a dataAbsentReason flag)</Data></Cell>
<Cell><Data ss:Type="String">PQ.code, MO.currency, PQ.translation.code</Data></Cell>
<Cell><Data ss:Type="String">(see OBX.6 etc) / CQ.2</Data></Cell>
</Row>
</Table>
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<PageSetup>
<Header x:Margin="0.3"/>
<Footer x:Margin="0.3"/>
<PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
</PageSetup>
<Unsynced/>
<Selected/>
<Panes>
<Pane>
<Number>3</Number>
<ActiveRow>6</ActiveRow>
<ActiveCol>9</ActiveCol>
</Pane>
</Panes>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
<Worksheet ss:Name="Invariants">
<Table ss:ExpandedColumnCount="6" ss:ExpandedRowCount="2" x:FullColumns="1"
x:FullRows="1" ss:StyleID="s67" ss:DefaultRowHeight="15">
<Column ss:StyleID="s67" ss:AutoFitWidth="0" ss:Width="30.75"/>
<Column ss:StyleID="s67" ss:Width="97.5"/>
<Column ss:StyleID="s67" ss:Width="45.75"/>
<Column ss:StyleID="s67" ss:AutoFitWidth="0" ss:Width="350.25"/>
<Column ss:StyleID="s67" ss:AutoFitWidth="0" ss:Width="346.5"/>
<Column ss:StyleID="s67" ss:AutoFitWidth="0" ss:Width="383.25"/>
<Row ss:AutoFitHeight="0" ss:StyleID="s65">
<Cell><Data ss:Type="String">Id</Data></Cell>
<Cell><Data ss:Type="String">Name</Data></Cell>
<Cell><Data ss:Type="String">Context</Data></Cell>
<Cell><Data ss:Type="String">English</Data></Cell>
<Cell><Data ss:Type="String">OCL</Data></Cell>
<Cell><Data ss:Type="String">XPath</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0">
<Cell><Data ss:Type="Number">3</Data></Cell>
<Cell><Data ss:Type="String">SHALL have a system </Data></Cell>
<Cell><Data ss:Type="String">Quantity</Data></Cell>
<Cell><Data ss:Type="String">If a code for the units is present, the system SHALL also be present</Data></Cell>
<Cell><Data ss:Type="String">code.oclIsDefined implies system.oclIsDefined</Data></Cell>
<Cell><Data ss:Type="String">not(exists(f:code)) or exists(f:system)</Data></Cell>
</Row>
</Table>
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<PageSetup>
<Header x:Margin="0.3"/>
<Footer x:Margin="0.3"/>
<PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
</PageSetup>
<Unsynced/>
<Panes>
<Pane>
<Number>3</Number>
<ActiveRow>1</ActiveRow>
<RangeSelection>R2:R3</RangeSelection>
</Pane>
</Panes>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
<Worksheet ss:Name="Restrictions">
<Table ss:ExpandedColumnCount="4" ss:ExpandedRowCount="7" x:FullColumns="1"
x:FullRows="1" ss:StyleID="s68" ss:DefaultRowHeight="15">
<Column ss:StyleID="s68" ss:AutoFitWidth="0" ss:Width="91.5"/>
<Column ss:StyleID="s68" ss:AutoFitWidth="0" ss:Width="493.5"/>
<Column ss:StyleID="s68" ss:AutoFitWidth="0" ss:Width="528.75"/>
<Row ss:AutoFitHeight="0" ss:StyleID="s65">
<Cell><Data ss:Type="String">Name</Data></Cell>
<Cell><Data ss:Type="String">Rules</Data></Cell>
<Cell><Data ss:Type="String">XPath</Data></Cell>
<Cell><Data ss:Type="String">OCL</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="30">
<Cell><Data ss:Type="String">Duration</Data></Cell>
<Cell><Data ss:Type="String">There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM.</Data></Cell>
<Cell><Data ss:Type="String">(f:code or not(f:value)) and (not(exists(f:system)) or f:system/@value='http://unitsofmeasure.org')</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="30">
<Cell><Data ss:Type="String">Distance</Data></Cell>
<Cell><Data ss:Type="String">There SHALL be a code if there is a value and it SHALL be an expression of length. If system is present, it SHALL be UCUM.</Data></Cell>
<Cell><Data ss:Type="String">(f:code or not(f:value)) and (not(exists(f:system)) or f:system/@value='http://unitsofmeasure.org')</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="30">
<Cell><Data ss:Type="String">Count</Data></Cell>
<Cell><Data ss:Type="String">There SHALL be a code with a value of &quot;1&quot; if there is a value and it SHALL be an expression of length. If system is present, it SHALL be UCUM. If present, the value SHALL a whole number.</Data></Cell>
<Cell><Data ss:Type="String">(f:code or not(f:value)) and (not(exists(f:system)) or (f:system/@value='http://unitsofmeasure.org' and f:code/@value='1' )) and not(contains(f:value/@value, '.')) </Data></Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="30">
<Cell><Data ss:Type="String">Money</Data></Cell>
<Cell><Data ss:Type="String">There SHALL be a code if there is a value and it SHALL be an expression of currency. If system is present, it SHALL be ISO 4217 (system = &quot;urn:std:iso:4217&quot; - currency).</Data></Cell>
<Cell><Data ss:Type="String">(f:code or not(f:value)) and (not(exists(f:system)) or f:system/@value='urn:std:iso:4217')</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0">
<Cell><Data ss:Type="String">CodedQuantity</Data></Cell>
<Cell><Data ss:Type="String">There SHALL be a code if there is a value. If system is present, it SHALL be UCUM.</Data></Cell>
<Cell><Data ss:Type="String">(f:code or not(f:value)) and (not(exists(f:system)) or f:system/@value='http://unitsofmeasure.org')</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="30">
<Cell><Data ss:Type="String">Age</Data></Cell>
<Cell><Data ss:Type="String">There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM. If value is present, it SHALL be positive.</Data></Cell>
<Cell><Data ss:Type="String">(f:code or not(f:value)) and (not(exists(f:system)) or f:system/@value='http://unitsofmeasure.org') and not(contains(f:value/@value, '-'))</Data></Cell>
</Row>
</Table>
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<PageSetup>
<Header x:Margin="0.3"/>
<Footer x:Margin="0.3"/>
<PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
</PageSetup>
<Unsynced/>
<FreezePanes/>
<FrozenNoSplit/>
<SplitHorizontal>1</SplitHorizontal>
<TopRowBottomPane>1</TopRowBottomPane>
<SplitVertical>1</SplitVertical>
<LeftColumnRightPane>1</LeftColumnRightPane>
<ActivePane>0</ActivePane>
<Panes>
<Pane>
<Number>3</Number>
</Pane>
<Pane>
<Number>1</Number>
</Pane>
<Pane>
<Number>2</Number>
</Pane>
<Pane>
<Number>0</Number>
<ActiveRow>5</ActiveRow>
</Pane>
</Panes>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
<Worksheet ss:Name="Bindings">
<Table ss:ExpandedColumnCount="5" ss:ExpandedRowCount="2" x:FullColumns="1"
x:FullRows="1" ss:StyleID="s69" ss:DefaultColumnWidth="120"
ss:DefaultRowHeight="15">
<Column ss:StyleID="s69" ss:Width="75"/>
<Column ss:StyleID="s69" ss:Width="108.75"/>
<Column ss:StyleID="s69" ss:Width="44.25"/>
<Column ss:StyleID="s69" ss:Width="81.75"/>
<Column ss:StyleID="s69" ss:Width="58.5"/>
<Row ss:AutoFitHeight="0" ss:Height="30">
<Cell ss:StyleID="s65"><Data ss:Type="String">Binding Name</Data></Cell>
<Cell ss:StyleID="s65"><Data ss:Type="String">Definition</Data></Cell>
<Cell ss:StyleID="s65"><Data ss:Type="String">Binding</Data></Cell>
<Cell ss:StyleID="s65"><Data ss:Type="String">Reference</Data></Cell>
<Cell ss:StyleID="s65"><Data ss:Type="String">Description</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="45">
<Cell ss:StyleID="s63"><Data ss:Type="String">QuantityCompararator</Data></Cell>
<Cell ss:StyleID="s68"><Data ss:Type="String">How the Quantity should be understood and represented</Data></Cell>
<Cell ss:StyleID="s68"><Data ss:Type="String">code list</Data></Cell>
<Cell ss:StyleID="s68"><Data ss:Type="String">#quantity-comparator</Data></Cell>
</Row>
</Table>
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<PageSetup>
<Header x:Margin="0.3"/>
<Footer x:Margin="0.3"/>
<PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
</PageSetup>
<Unsynced/>
<Panes>
<Pane>
<Number>3</Number>
<ActiveRow>2</ActiveRow>
<ActiveCol>1</ActiveCol>
</Pane>
</Panes>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
<Worksheet ss:Name="quantity-comparator">
<Table ss:ExpandedColumnCount="7" ss:ExpandedRowCount="5" x:FullColumns="1"
x:FullRows="1" ss:DefaultRowHeight="15">
<Column ss:Index="3" ss:AutoFitWidth="0" ss:Width="569.25"/>
<Row ss:AutoFitHeight="0" ss:Height="30">
<Cell><Data ss:Type="String">Id</Data></Cell>
<Cell ss:StyleID="s65"><Data ss:Type="String">Code</Data></Cell>
<Cell ss:StyleID="s65"><Data ss:Type="String">Definition</Data></Cell>
<Cell ss:StyleID="s65"/>
<Cell ss:StyleID="s65"/>
<Cell ss:StyleID="s65"/>
<Cell ss:StyleID="s65"/>
</Row>
<Row ss:AutoFitHeight="0">
<Cell><Data ss:Type="Number">1</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">&lt;</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">The actual value is less than the given value</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0">
<Cell><Data ss:Type="Number">2</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">&lt;=</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">The actual value is less than or equal to the given value</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0">
<Cell><Data ss:Type="Number">3</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">&gt;=</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">The actual value is greater than or equal to the given value</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0">
<Cell><Data ss:Type="Number">4</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">&gt;</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">The actual value is greater than the given value</Data></Cell>
</Row>
</Table>
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<PageSetup>
<Header x:Margin="0.3"/>
<Footer x:Margin="0.3"/>
<PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
</PageSetup>
<Unsynced/>
<Panes>
<Pane>
<Number>3</Number>
<ActiveRow>3</ActiveRow>
</Pane>
</Panes>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
</Workbook>

View File

@ -0,0 +1,23 @@
<ValueSet xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hl7.org/fhir ../../schema/valueset.xsd">
<name value="Administrative Gender Codes"/>
<publisher value="FHIR Project team"/>
<telecom>
<system value="url"/>
<value value="http://hl7.org/fhir"/>
</telecom>
<description value="This value set defines the set of codes that can be used to indicate the administrative gender of a person"/>
<status value="draft"/>
<compose>
<include>
<system value="http://hl7.org/fhir/v3/AdministrativeGender"/>
<code value="F"/>
<code value="M"/>
<code value="UN"/>
</include>
<include>
<system value="http://hl7.org/fhir/v3/NullFlavor"/>
<code value="UNK"/>
</include>
</compose>
</ValueSet>

View File

@ -0,0 +1,39 @@
<ValueSet xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hl7.org/fhir ../../schema/valueset.xsd">
<name value="Marital Status Codes"/>
<publisher value="FHIR Project team"/>
<telecom>
<system value="url"/>
<value value="http://hl7.org/fhir"/>
</telecom>
<description value="This value set defines the set of codes that can be used to indicate the marital status of a person"/>
<status value="draft"/>
<define>
<system value="http://hl7.org/fhir/marital-status"/>
<caseSensitive value="true"/>
<concept>
<!-- work around for missing code in v3 code system - should be temporary, until added in v3 -->
<code value="U"/>
<display value="unmarried"/>
<definition value="The person is not presently married. The marital history is not known or stated"/>
</concept>
</define>
<compose>
<include>
<system value="http://hl7.org/fhir/v3/MaritalStatus"/>
<code value="A"/>
<code value="D"/>
<code value="I"/>
<code value="L"/>
<code value="M"/>
<code value="P"/>
<code value="S"/>
<code value="T"/>
<code value="W"/>
</include>
<include>
<system value="http://hl7.org/fhir/v3/NullFlavor"/>
<code value="UNK"/>
</include>
</compose>
</ValueSet>