Merge pull request #261 from fastenhealth/eob_enhancements
This commit is contained in:
commit
b8cf1c23ad
|
@ -0,0 +1,8 @@
|
||||||
|
import {CodableConceptModel} from './codable-concept-model';
|
||||||
|
|
||||||
|
export interface IdentifierModel {
|
||||||
|
use: string
|
||||||
|
type?: CodableConceptModel
|
||||||
|
system?: string
|
||||||
|
value?: string
|
||||||
|
}
|
|
@ -1,4 +1,7 @@
|
||||||
|
import {IdentifierModel} from './identifier-model';
|
||||||
|
|
||||||
export interface ReferenceModel {
|
export interface ReferenceModel {
|
||||||
reference: string
|
reference: string
|
||||||
display?: string
|
display?: string
|
||||||
|
identifier?: IdentifierModel
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,14 @@ import {fhirVersions, ResourceType} from '../constants';
|
||||||
import {FastenOptions} from '../fasten/fasten-options';
|
import {FastenOptions} from '../fasten/fasten-options';
|
||||||
import * as _ from "lodash";
|
import * as _ from "lodash";
|
||||||
import {CodingModel} from '../datatypes/coding-model';
|
import {CodingModel} from '../datatypes/coding-model';
|
||||||
|
import * as fhirpath from 'fhirpath';
|
||||||
|
|
||||||
export class ExplanationOfBenefitModel extends FastenDisplayModel {
|
export class ExplanationOfBenefitModel extends FastenDisplayModel {
|
||||||
|
code: CodableConceptModel | undefined
|
||||||
|
code_text: string | undefined
|
||||||
|
code_id: string | undefined
|
||||||
|
code_system: string | undefined
|
||||||
|
|
||||||
|
|
||||||
disposition: string | undefined
|
disposition: string | undefined
|
||||||
created: string | undefined
|
created: string | undefined
|
||||||
|
@ -96,6 +102,15 @@ export class ExplanationOfBenefitModel extends FastenDisplayModel {
|
||||||
};
|
};
|
||||||
|
|
||||||
r4DTO(fhirResource){
|
r4DTO(fhirResource){
|
||||||
|
let principalDiagnosis = fhirpath.evaluate(fhirResource, "ExplanationOfBenefit.diagnosis.where(type.coding.code='principal').first().diagnosisCodeableConcept.first()")
|
||||||
|
|
||||||
|
if(principalDiagnosis.length > 0) {
|
||||||
|
this.code = principalDiagnosis[0] as CodableConceptModel
|
||||||
|
this.code_text = principalDiagnosis[0]?.coding?.display
|
||||||
|
this.code_id = principalDiagnosis[0]?.coding?.code
|
||||||
|
this.code_system = principalDiagnosis[0]?.coding?.system
|
||||||
|
}
|
||||||
|
|
||||||
this.type = _.get(fhirResource, 'type.coding', []);
|
this.type = _.get(fhirResource, 'type.coding', []);
|
||||||
this.hasType = Array.isArray(this.type) && this.type.length > 0;
|
this.hasType = Array.isArray(this.type) && this.type.length > 0;
|
||||||
this.resourceStatus = _.get(fhirResource, 'status');
|
this.resourceStatus = _.get(fhirResource, 'status');
|
||||||
|
|
6
go.mod
6
go.mod
|
@ -7,8 +7,8 @@ require (
|
||||||
github.com/dave/jennifer v1.6.1
|
github.com/dave/jennifer v1.6.1
|
||||||
github.com/dominikbraun/graph v0.15.0
|
github.com/dominikbraun/graph v0.15.0
|
||||||
github.com/dop251/goja v0.0.0-20230605162241-28ee0ee714f3
|
github.com/dop251/goja v0.0.0-20230605162241-28ee0ee714f3
|
||||||
github.com/fastenhealth/fasten-sources v0.3.2
|
github.com/fastenhealth/fasten-sources v0.3.3
|
||||||
github.com/fastenhealth/gofhir-models v0.0.5
|
github.com/fastenhealth/gofhir-models v0.0.6
|
||||||
github.com/gin-gonic/gin v1.9.0
|
github.com/gin-gonic/gin v1.9.0
|
||||||
github.com/glebarez/sqlite v1.5.0
|
github.com/glebarez/sqlite v1.5.0
|
||||||
github.com/golang-jwt/jwt/v4 v4.4.2
|
github.com/golang-jwt/jwt/v4 v4.4.2
|
||||||
|
@ -111,3 +111,5 @@ require (
|
||||||
)
|
)
|
||||||
|
|
||||||
//replace github.com/fastenhealth/fasten-sources => ../fasten-sources
|
//replace github.com/fastenhealth/fasten-sources => ../fasten-sources
|
||||||
|
//
|
||||||
|
//replace github.com/fastenhealth/gofhir-models => ../gofhir-models
|
||||||
|
|
8
go.sum
8
go.sum
|
@ -197,10 +197,10 @@ github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi
|
||||||
github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M=
|
github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M=
|
||||||
github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
||||||
github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww=
|
github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww=
|
||||||
github.com/fastenhealth/fasten-sources v0.3.2 h1:AdFayvwu88zO5JmMNhxlZDARZW1q6iBNHl9Ew8BSLHs=
|
github.com/fastenhealth/fasten-sources v0.3.3 h1:JI8fuXd6Cuq21T4aATLDS26Ubdy3foALFrQ/wa1Ylc8=
|
||||||
github.com/fastenhealth/fasten-sources v0.3.2/go.mod h1:KUtpp65GaKlpRvl5i8zWTVZlI1yJaUPkvGVqQVEC21w=
|
github.com/fastenhealth/fasten-sources v0.3.3/go.mod h1:YxgwR6jSEU+edYqEDkm238n7HlvZdW3i04nIh7gSDaM=
|
||||||
github.com/fastenhealth/gofhir-models v0.0.5 h1:wU2Dz+/h9MzZCTRgkQzeq5l0EFuMI6C5xgCbKislFpg=
|
github.com/fastenhealth/gofhir-models v0.0.6 h1:yJYYaV1eJtHiGEfA1rXLsyOm/9hIi6s2cGoZzGfW1tM=
|
||||||
github.com/fastenhealth/gofhir-models v0.0.5/go.mod h1:xB8ikGxu3bUq2b1JYV+CZpHqBaLXpOizFR0eFBCunis=
|
github.com/fastenhealth/gofhir-models v0.0.6/go.mod h1:xB8ikGxu3bUq2b1JYV+CZpHqBaLXpOizFR0eFBCunis=
|
||||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||||
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
|
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
|
||||||
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
||||||
|
|
Loading…
Reference in New Issue