fivews pattern #1901
Unanswered
balteravishay
asked this question in
Q&A
fivews pattern
#1901
Replies: 1 comment 2 replies
-
Not currently. But what would we need to do to introduce that mapping into our POCO's? If I understand this correctly there are two possibilities:
Example of the first: [FhirType("Account","http://hl7.org/fhir/StructureDefinition/Account", IsResource=true)]
public partial class Account : Hl7.Fhir.Model.DomainResource
{
// snip
[FhirElement("subject", InSummary=true, Order=130)]
[References("Patient","Device","Practitioner","Location","HealthcareService","Organization")]
// this would be a new attribute we need to generate
[FiveWs(Category.Subject)]
public Hl7.Fhir.Model.ResourceReference Subject
{
get { return _Subject; }
set { _Subject = value; OnPropertyChanged("Subject"); }
}
} Example of the second: [FhirType("Account","http://hl7.org/fhir/StructureDefinition/Account", IsResource=true)]
// Would now implement FiveW's
public partial class Account : Hl7.Fhir.Model.DomainResource : IFiveWs
{
// snip
[FhirElement("subject", InSummary=true, Order=130)]
[References("Patient","Device","Practitioner","Location","HealthcareService","Organization")]
// this would be a new attribute we need to generate
[FiveWs(Category.Subject)]
public Hl7.Fhir.Model.ResourceReference Subject
{
get { return _Subject; }
set { _Subject = value; OnPropertyChanged("Subject"); }
}
// Map the current Subject to the FiveWs subject
Hl7.Fhir.Model.ResourceReference IFiveWs.Subject => Subject;
} Ideas? What would you want to do with it? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a way to get fivews mappings for types using the SDK?
or at least to which property the "who" maps to in FHIR resource type.
Beta Was this translation helpful? Give feedback.
All reactions